-
Notifications
You must be signed in to change notification settings - Fork 201
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue when running a custom environment #155
Comments
Unfortunately, this error message from Traci is not very informative :/ Would you mind sharing the code? |
The code is the same as yours, the only thing I added is a definition for my environment in resco_envs.py : def athens100(parallel = True, **kwargs): |
Hi @Mehdi-Inane Does your simulation run without errors when you ran it without sumo-rl? |
Without any tracI interfacing the simulation runs on the SUMO GUI, and also while interfacing with tracI when I control a single traffic light. I could not find a way to debug this : I tried tracking the actions done by the traffic lights and all of them are valid, and I haven't found a bug of this sort on other forums. Did you already have a problem similar to this when running sumo-rl on large traffic scenarios ? |
Hello,
I am running your sarsa_resco.py code with a custom environment, representing downtown Athens so around 30-40 traffic lights. When I added the custom environment to the simulation, I get the following error, right after the first actions are decided :
Error: Invalid empty condition ''06.45UPS, TraCI: 1568ms, vehicles TOT 242 ACT 242 BUF 608
Quitting (on error).
Traceback (most recent call last):
File "/mnt/c/users/inane/Downloads/sumo-rl/experiments/sarsa_resco.py", line 181, in
fire.Fire(run)
File "/home/mehdi_inane/anaconda3/lib/python3.9/site-packages/fire/core.py", line 141, in Fire
component_trace = _Fire(component, args, parsed_flag_args, context, name)
File "/home/mehdi_inane/anaconda3/lib/python3.9/site-packages/fire/core.py", line 475, in _Fire
component, remaining_args = _CallAndUpdateTrace(
File "/home/mehdi_inane/anaconda3/lib/python3.9/site-packages/fire/core.py", line 691, in _CallAndUpdateTrace
component = fn(*varargs, **kwargs)
File "/mnt/c/users/inane/Downloads/sumo-rl/experiments/sarsa_resco.py", line 171, in run
next_obs, r, done,terminated, info = env.step(actions=actions)
File "/home/mehdi_inane/anaconda3/lib/python3.9/site-packages/pettingzoo/utils/conversions.py", line 191, in step
self.aec_env.step(actions[agent])
File "/home/mehdi_inane/anaconda3/lib/python3.9/site-packages/pettingzoo/utils/wrappers/order_enforcing.py", line 81, in step
super().step(action)
File "/home/mehdi_inane/anaconda3/lib/python3.9/site-packages/pettingzoo/utils/wrappers/base.py", line 116, in step
self.env.step(action)
File "/home/mehdi_inane/anaconda3/lib/python3.9/site-packages/pettingzoo/utils/wrappers/assert_out_of_bounds.py", line 29, in step
super().step(action)
File "/home/mehdi_inane/anaconda3/lib/python3.9/site-packages/pettingzoo/utils/wrappers/base.py", line 116, in step
self.env.step(action)
File "/mnt/c/users/inane/Downloads/sumo-rl/sumo_rl/environment/env.py", line 587, in step
self.env._run_steps()
File "/mnt/c/users/inane/Downloads/sumo-rl/sumo_rl/environment/env.py", line 328, in _run_steps
self._sumo_step()
File "/mnt/c/users/inane/Downloads/sumo-rl/sumo_rl/environment/env.py", line 403, in _sumo_step
self.sumo.simulationStep()
File "/home/mehdi_inane/anaconda3/lib/python3.9/site-packages/traci/connection.py", line 366, in simulationStep
result = self._sendCmd(tc.CMD_SIMSTEP, None, None, "D", step)
File "/home/mehdi_inane/anaconda3/lib/python3.9/site-packages/traci/connection.py", line 228, in _sendCmd
return self._sendExact()
File "/home/mehdi_inane/anaconda3/lib/python3.9/site-packages/traci/connection.py", line 137, in _sendExact
raise FatalTraCIError("connection closed by SUMO")
traci.exceptions.FatalTraCIError: connection closed by SUMO
Do you have an idea of where this error came from ? I have a code for a single agent but it works just fine with the parameters I have.
The text was updated successfully, but these errors were encountered: