Closed mchlswyr closed 3 years ago
Are we wrapping yaw between -180..180?
Yes, Python's atan2
function outputs in that range.
Is it correct that when the yaw arrow points up (North) the value is 0? Shouldn't we have 0 yaw pointing right (at East)?
Is it correct that when the yaw arrow points up (North) the value is 0? Shouldn't we have 0 yaw pointing right (at East)?
Yes, that is correct. We could, but I'm not sure if Rodrigo relies on the current setup. There is even a yaw -= 90
in GSClient.cpp
to account for this.
Wait, so in GeoScenario .osm file, when you set a vehicle with yaw=0 it points right but in the dash it'll still point right or north?
Wait, so in GeoScenario .osm file, when you set a vehicle with yaw=0 it points right but in the dash it'll still point right or north?
Oh, I haven't checked that. With the SDV vehicles (the ones that use btrees), their yaw is calculated from their velocity. Initially it is 0, but then it is updated after the first tick.
I don't think GSS even checks the yaw tag for vehicles: SDVs calculate their yaw, EVs (external vehicles) get their yaw from the client, and TVs (trajectory following vehicles) get their yaw from the trajectory nodes.
It all depends how the map display is oriented in dash. If it's East points top of screen, then we're fine. However, I'd prefer to have it North points to top and East points to the right.
Changes
sv
variable in the first for loop inwrite_traffic_state()
(inTrafficSim.py
) was being assignedvehicle.state.get_state_vector() + vehicle.state.get_frenet_state_vector()
, butget_state_vector()
's return value already contains the value returned byget_frenet_state_vector()
vehicle.state.get_frenet_state_vector()
, was removedlen(sv)
is now 13len(sv)
is 13, then, inread_traffic_state()
, it should bestate_vector = traffic_state_sharr[ i+3 : i+16 ]
(instead ofi+17
, ori+18
)set_state_vector()
(inActor.py
),arr[0]
toarr[2]
,arr[3]
toarr[6]
, ...,arr[9]
toarr[11]
were all set, so it should bearr[12]
, notarr[13]
arr
tab
indash/Dashboard.py
id
column to be removedTesting
Test 1
GSS="${HOME}/anm_unreal_sim/submodules/geoscenarioserver"
test_scenarios=$(find "${GSS}/scenarios/test_scenarios" -name ".osm") pedestrian_scenarios=$(find "${GSS}/scenarios/pedestrian_scenarios" -name ".osm") scenarios="$test_scenarios $pedestrian_scenarios"
source "${GSS}/catkin_ws/install/opt/ros/lanelet2/setup.bash" --extend
kill_python38() { killall python3.8 }
for scenario in $scenarios; do read -p "Press ENTER to run ${scenario}:" trap kill_python38 SIGINT python3.8 GSServer.py -s $scenario trap - SIGINT done