Closed patmalcolm91 closed 3 years ago
@Axel1092 are you able to have a look at this please?
Hi @patmalcolm91!
I suspect this can be related to the fact that CARLA vehicles are spawned in SUMO using always the same route. If the spawned vehicle is not allowed to be spawned at that route it may crash. However, I haven't been able to reproduce the issue with the CARLA maps. Are you using a custom map or a modified version of the vtypes,json
file?
Hi, @joel-mb. I should have specified that I'm using a custom map when encountering this issue. To create the map, we started with a custom SUMO net file, generated street geometry from it, and used a dummy XODR (since we don't need the CARLA internal navigation at all for our use case). The SUMO network consists of lanes with various vehicle type allowances (some with allow="all"
, some allowing only passenger vehicles, some allowing only bicycles, etc.). I first encounted the issue when trying to manually spawn a bicycle on a road lane with allow="passenger"
(i.e. no bicycles allowed).
I imagine the reason this is difficult to recreate in the default maps is that in the accompanying SUMO net files, almost all of the lanes allow nearly all vTypes. However, I believe you should be able to recreate it if you try manually spawing a passenger vehicle at a coordinate corresponding to a sidewalk or a parking/shoulder lane (for example, the shoulder of the ring road in Town05).
@patmalcolm91 I've introduced some changes to create a SUMO route per vehicles class. The vehicle won't be spawned if there isn't any allowed edge in the SUMO network. Could you test the changes for your use case? The modifications are in this branch: https://github.com/carla-simulator/carla/tree/joel-mb/fix_sumo_routes Thanks!
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
These changes appear to have resolved the issue. Thanks, @joel-mb!
When running a Sumo co-simulation (e.g. via
run_synchronization.py
), if another carla client (e.g.manual_control.py
) spawns a vehicle in a location corresponding to a lane where the corresponding sumo vType is not allowed (for example a passenger vehicle on a bike lane or any vehicle on a lane withallow="none"
), this causes Sumo to crash without any meaningful error message.Expected behavior: The co-simulation module should insert the Sumo vehicle into the nearest allowed lane, or should catch this exception and print a meaningful error message.
Carla version: 0.9.9 OS: Linux
Error message: