The yaw tags for vehicles and pedestrians, specified in the scenario .osm files, are now used
This is the starting yaw for the vehicle or pedestrian
ScenarioSetup
The yaw tag is checked for in ScenarioSetup.py when loading vehicles and pedestrians
If the yaw isn't specified, then 90 degrees is used
This is because when yaw isn't specified in JOSM, the vehicle points right (0 degrees points right in JOSM and 90 degrees points right in GSS)
The yaw is adjusted in ScenarioSetup.py to be a GSS angle in the range [-180.0, 180.0)
Vehicle, Pedestrian, and Actor Classes
Each type of vehicle and pedestrian takes a separate yaw argument in their constructor
The yaw argument is then passed along to the superclass's constructor and eventually makes its way to the Actor constructor, where self.state.yaw is set
Test Scenarios
Each vehicle's yaw tag was set for all the vehicles in scenarios/test_scenarios
Testing
Make sure both types of scenarios work:
bash scripts/run_scenarios.bash
When running scenarios/test_scenarios/gs_intersection_greenlight.osm, note the yaw value in the table for vehicle 1 (-115 degrees)
Once the vehicle drives, the yaw will be updated to values around -115 degrees
Note: the arrow at the start (in the cartesian plot) points up (0 degrees); this is because the vehicles x and y velocity are used to set the direction of the arrow, and they are 0 at the start
Changes
yaw
tags for vehicles and pedestrians, specified in the scenario.osm
files, are now usedScenarioSetup
yaw
tag is checked for inScenarioSetup.py
when loading vehicles and pedestriansyaw
isn't specified, then 90 degrees is usedyaw
isn't specified in JOSM, the vehicle points right (0 degrees points right in JOSM and 90 degrees points right in GSS)yaw
is adjusted inScenarioSetup.py
to be a GSS angle in the range [-180.0, 180.0)Vehicle, Pedestrian, and Actor Classes
yaw
argument in their constructoryaw
argument is then passed along to the superclass's constructor and eventually makes its way to theActor
constructor, whereself.state.yaw
is setTest Scenarios
yaw
tag was set for all the vehicles inscenarios/test_scenarios
Testing
scenarios/test_scenarios/gs_intersection_greenlight.osm
, note theyaw
value in the table for vehicle 1 (-115 degrees)yaw
will be updated to values around -115 degrees