Closed mchlswyr closed 3 years ago
scenarios/test_scenarios/gs_ringroad_single.osm
doesn't seem to work (the road, franet frame, cartesian plot, etc. are all blank). I removed line 9 (<tag k='plotvid' v='5' />
) in gs_ringroad_single.osm
, and it seems to work.scenarios/test_scenarios/gs_ringroad_stress_loop.osm
does not even launch:
$ python3.8 GSServer.py -s scenarios/test_scenarios/gs_ringroad_stress_loop.osm
I0209 17:22:03.168443 15153 GSServer.py:21] GeoScenario server START
I0209 17:22:03.168551 15153 ScenarioSetup.py:25] Loading GeoScenario file: scenarios/test_scenarios/gs_ringroad_stress_loop.osm
E0209 17:22:03.193989 15153 ScenarioSetup.py:93] Route generation failed for route north_route.
Traceback (most recent call last):
File "GSServer.py", line 97, in <module>
start_server(args)
File "GSServer.py", line 33, in start_server
res = load_geoscenario_from_file(args.gsfile, traffic, sim_config, lanelet_map)
File "/home/ms/anm_unreal_sim/submodules/geoscenarioserver/ScenarioSetup.py", line 94, in load_geoscenario_from_file
raise e
File "/home/ms/anm_unreal_sim/submodules/geoscenarioserver/ScenarioSetup.py", line 90, in load_geoscenario_from_file
sim_config.lanelet_routes[vid] = lanelet_map.get_route_via(lanelets_in_route)
File "/home/ms/anm_unreal_sim/submodules/geoscenarioserver/mapping/LaneletMap.py", line 110, in get_route_via
assert route
AssertionError
scenarios/test_scenarios
) run, but most crash with:
Log all trajectories:
Traceback (most recent call last):
File "GSServer.py", line 97, in <module>
start_server(args)
File "GSServer.py", line 76, in start_server
traffic.stop_all()
File "/home/ms/anm_unreal_sim/submodules/geoscenarioserver/SimTraffic.py", line 83, in stop_all
self.write_log_trajectories()
File "/home/ms/anm_unreal_sim/submodules/geoscenarioserver/SimTraffic.py", line 239, in write_log_trajectories
with open(filename,mode='w') as csv_file:
FileNotFoundError: [Errno 2] No such file or directory: 'eval/trajlog/_1.csv'
About the crash with SimTraffic 239. It is trying to log the trajectories after the simulation run. It crashes because it can't find the folder eval/trajlog/ This is supposed to happen only for evaluation. Change this flag to False in the SimConfig. WRITE_TRAJECTORIES = False
E0209 17:22:03.193989 15153 ScenarioSetup.py:93] Route generation failed for route north_route. Traceback (most recent call last): File "GSServer.py", line 97, in
start_server(args) File "GSServer.py", line 33, in start_server res = load_geoscenario_from_file(args.gsfile, traffic, sim_config, lanelet_map) File "/home/ms/anm_unreal_sim/submodules/geoscenarioserver/ScenarioSetup.py", line 94, in load_geoscenario_from_file raise e File "/home/ms/anm_unreal_sim/submodules/geoscenarioserver/ScenarioSetup.py", line 90, in load_geoscenario_from_file sim_config.lanelet_routes[vid] = lanelet_map.get_route_via(lanelets_in_route) File "/home/ms/anm_unreal_sim/submodules/geoscenarioserver/mapping/LaneletMap.py", line 110, in get_route_via assert route AssertionError
This is a common error. The lanelet library is trying to build a route based on the vehicle location + every point along the route. Usually it fails because one of the points is outside a valid lanelet, or there is not a valid connection between lanelets (either there is no route or the map does not have the tags right)
Our ringroad map was converted from lanelet1 to lanelet2. and it is not fully compatible. Different versions of the library can be more or less strict to some of these problems.
SimConfig.py
change WRITE_TRAJECTORIES = False
(to fix the third error mentioned here)vid = 5
, which doesn't exist)ringroad.osm
map that was being usedREADME.md
at the end)scenarios/test_scenarios/gs_intersection_greenlight.osm
, scenarios/test_scenarios/gs_ringroad_single.osm
, scenarios/test_scenarios/gs_ringroad_stress_loop.osm
all have really long timeouts (the others are only either 10 or 20 seconds), so you may want to Ctrl + C
to end them
LaneletMap()
from aRoute
object, you now need to useLaneletSubmap().LaneletMap()
.lanelet2_standalone
toLanelet2
, that affectsGSServer.py
Testing
ego_start
, e.g.)scenarios/test_scenarios
should workscenarios/test_scenarios
(make sure you are in thegeoscenarioserver
directory):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