co simulation with SUMO simulator #8195
goosebuums
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I am trying to co -simulate CARLA simulator with SUMO, which is traffic simulator made by eclipse.
However, I am reading the Document of SUMO-CARLA Co-simulation, which is written in:https://carla.readthedocs.io/en/latest/adv_sumo/
However, I am trying to spawn vehicles in both sumo and CARLA server, and tried to execute this line:
~/CARLA_0.9.13/Co-Simulation/Sumo$ python3 spawn_npc_sumo.py -n 10 --tls-manager carla --sumo-gui
and then press the play button in sumo, and no cars seems to appear and this thing appears in the terminal:
WARNING: Different landmarks controlling the same connection. Only one will be included.
WARNING: Different landmarks controlling the same connection. Only one will be included.
INFO: Starting new sumo server...
INFO: Remember to press the play button to start the simulation
Retrying in 1 seconds
/home/a/CARLA_0.9.13/Co-Simulation/Sumo/sumo_integration/sumo_simulation.py:297: FutureWarning: This search incorrectly ignores the root element, and will be fixed in a future version. If you rely on the current behaviour, change it to './/net-file'
tag = tree.find('//net-file')
/usr/lib/python3/dist-packages/requests/init.py:89: RequestsDependencyWarning: urllib3 (2.2.3) or chardet (3.0.4) doesn't match a supported version!
warnings.warn("urllib3 ({}) or chardet ({}) doesn't match a supported "
Traceback (most recent call last):
File "spawn_npc_sumo.py", line 300, in
main(args)
File "spawn_npc_sumo.py", line 117, in main
sumo_simulation = SumoSimulation(cfg_file,
File "/home/a/CARLA_0.9.13/Co-Simulation/Sumo/sumo_integration/sumo_simulation.py", line 336, in init
self.net = _get_sumo_net(cfg_file)
File "/home/a/CARLA_0.9.13/Co-Simulation/Sumo/sumo_integration/sumo_simulation.py", line 304, in _get_sumo_net
sumo_net = traci.sumolib.net.readNet(net_file)
AttributeError: module 'traci' has no attribute 'sumolib'
The last error word:module traci has no attribute sumolib..
how can I solve this prob?
my build environment is 20.04 ubuntu and carla0.9.13.
I have build SUMO by source. So, this should work if I have done everything properly.
I wonder how to fix this problem.
Thankyou.
Beta Was this translation helpful? Give feedback.
All reactions