DI-drive Casezoo consist of two parts: route scenario and single scenario. Route scenario can have individual scenarios defined on the way. They are triggered when hero vehicle passed by and deleted after finishing the route. Route scenario is defined in a xml file with its individual scenarios and trigger location defined in a json file. Single scenario is defined in a python file. If you want to run it individually, the example xml maps scenario in a certain location in a map, with each location a specific name. You can run it by passing its name such as "ChangeLane_1".
DI-drive provides a simple entry to runn Casezoo with AutoPIDPolicy. You can run auto_run_case.py with following command:
# Run route scenario
python auto_run_case.py --host [CARLA HOST] --port [CARLA_PORT] --route [ROUTE_FILE_PATH] [CONFIG_FILE_PATH]
# Run single scenario
python auto_run_case.py --host [CARLA HOST] --port [CARLA_PORT] --scenario [SCENARIO_NAME]
Scenario name | Description | Sample image | File path |
---|---|---|---|
ControlLossNew | Hero vehicle briefly loses control and shakes | control_loss_new.py ControlLoss.xml |
|
CutIn | There is a car behind the side quickly approaches and then cuts into the current lane of the vehicle, and then the speed is reduced to drive at a constant speed | cut_in_new.py CutIn.xml |
|
FollowLeadingVehicleNew | Follow a slower vehicle ahead (turns, straights, ramps) | follow_leading_vehicle_new.py LeadingVehicle.xml |
|
ChangeLane | There is a normal car near the front of the vehicle in the same lane, and a faulty car at a far distance. When the normal car approaches the faulty car, it changes lanes and cuts out (the picture shows a normal driving vehicle cut out) | change_lane.py ChangeLane.xml |
|
OppositeDirection | There are vehicles in the opposite lane | opposite_direction.py OppositeDirection.xml |
|
SignalizedJunctionLeftTurn | The other car turns left at the traffic light (the other car can be in front of the car or on other roads at the intersection, and the car can go straight or turn) | signalized_junction_left_turn.py SignalizedJunctionLeftTurn.xml |
|
SignalizedJunctionRightTurn | The other car turns right at the traffic light (the other car can be in front of the car or on other roads at the intersection, and the car can go straight or turn) | signalized_junction_right_turn.py SignalizedJunctionRightTurn.xml |
|
SignalizedJunctionStraight | The other car goes straight at the traffic light (the other car can be in front of the car or on other roads at the intersection, and the car can go straight or turn) | signalized_junction_straight.py SignalizedJunctionStraight.xml |
You can debug a route by running its xml file with no_scenarios.json. It runs no individual scenarios within the route.