rodrigoqueiroz / geoscenarioserver

8 stars 1 forks source link

Connecting gsclient to gss #35

Closed mchlswyr closed 3 years ago

mchlswyr commented 3 years ago

Goal

Changes

Test 1

GSS="${HOME}/anm_unreal_sim/submodules/geoscenarioserver" SIM="${HOME}/anm_unreal_sim/src/anm_sim_platform/"

cleanup_and_exit() { killall python3.8 killall roslaunch

# Cleanup Shared Memory
ipcrm -M 0x0001e240 # 123456
ipcrm -M 0x00051877 # 333943

# Cleanup Semaphores
ipcrm -S 0x000549c5 # 346565
ipcrm -S 0x000e3e39 # 933433

exit 0

}

keyboard_int() { echo "" echo "Press ENTER to exit." }

trap keyboard_int SIGINT

source "${GSS}/catkin_ws/install/devel/setup.bash" python3.8 "${GSS}/GSServer.py" -s 'scenarios/test_scenarios/gs_ringroad_stress_loop.osm' > gsslog.log & bash "${SIM}/scripts/launch.bash" 'ring_road_ccw' > simlog.log &

read -p "Press ENTER to exit." cleanup_and_exit

- The ego should turn left at the stop sign, onto ringroad; after going around the first bend you should see all of the vehicles (from gss) driving in the other lane; their movement will probably look very laggy

### Test 2
- We can test that `GSServer.py` can still run all of the test scenarios with this script (make sure you're in `geoscenarioserver`):
```sh
#!/bin/bash
scenarios=$(ls scenarios/test_scenarios)

source "catkin_ws/devel/setup.bash"

kill_python38()
{
    killall python3.8
}

for scenario in $scenarios; do
    read -p "Press ENTER to run next scenario:"
    trap kill_python38 SIGINT
    python3.8 GSServer.py -s "scenarios/test_scenarios/${scenario}"
    trap - SIGINT
done