Skip to content
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

Running minicity error #1786

Closed
SHITIANYU-hue opened this issue Dec 23, 2022 · 2 comments · Fixed by #1788
Closed

Running minicity error #1786

SHITIANYU-hue opened this issue Dec 23, 2022 · 2 comments · Fixed by #1788
Labels
bug Something isn't working

Comments

@SHITIANYU-hue
Copy link

Hi,

I am wondering how to launch a minicity scenario. I followed the document: https://smarts.readthedocs.io/en/latest/sim/visualization.html

build scenarios/sumo/loop

scl scenario build --clean scenarios/sumo/loop

run an experiment

scl run --envision examples/single_agent.py scenarios/sumo/loop

And I changed as:

build scenarios/sumo/minicity

scl scenario build --clean scenarios/sumo/minicity

run an experiment

scl run --envision examples/single_agent.py scenarios/sumo/minicity/

But it will have this error:

Traceback (most recent call last):
File "examples/single_agent.py", line 86, in
main(
File "examples/single_agent.py", line 58, in main
observation = env.reset()
File "/home/tianyu/code/simulator/SMARTS/smarts/env/wrappers/single_agent.py", line 74, in reset
obs = self.env.reset()
File "/home/tianyu/code/simulator/SMARTS/smarts/env/hiway_env.py", line 269, in reset
env_observations = self._smarts.reset(scenario)
File "/home/tianyu/code/simulator/SMARTS/smarts/core/smarts.py", line 408, in reset
raise first_exception
File "/home/tianyu/code/simulator/SMARTS/smarts/core/smarts.py", line 401, in reset
return self._reset(scenario, start_time)
File "/home/tianyu/code/simulator/SMARTS/smarts/core/smarts.py", line 456, in _reset
observations_for_ego, _, _, _ = self.step({})
File "/home/tianyu/code/simulator/SMARTS/smarts/core/smarts.py", line 226, in step
return self._step(agent_actions, time_delta_since_last_step)
File "/home/tianyu/code/simulator/SMARTS/smarts/core/smarts.py", line 281, in _step
provider_state = self._step_providers(all_agent_actions)
File "/home/tianyu/code/simulator/SMARTS/smarts/core/smarts.py", line 1232, in _step_providers
provider_state = self._handle_provider(provider, provider_error)
File "/home/tianyu/code/simulator/SMARTS/smarts/core/smarts.py", line 1147, in _handle_provider
provider_state, recovered = provider.recover(
File "/home/tianyu/code/simulator/SMARTS/smarts/core/sumo_traffic_simulation.py", line 452, in recover
raise error
File "/home/tianyu/code/simulator/SMARTS/smarts/core/smarts.py", line 1226, in _step_providers
provider_state = provider.step(
File "/home/tianyu/code/simulator/SMARTS/smarts/core/sumo_traffic_simulation.py", line 462, in step
self._last_provider_state = self._step(dt)
File "/home/tianyu/code/simulator/SMARTS/smarts/core/sumo_traffic_simulation.py", line 473, in _step
return self._compute_provider_state()
File "/home/tianyu/code/simulator/SMARTS/smarts/core/sumo_traffic_simulation.py", line 746, in _compute_provider_state
self._traffic_light_states()
File "/home/tianyu/code/simulator/SMARTS/smarts/core/sumo_traffic_simulation.py", line 733, in _traffic_light_states
sig_id, self._create_signal_state(sig_id, controlled_links)
File "/home/tianyu/code/simulator/SMARTS/smarts/core/sumo_traffic_simulation.py", line 710, in _create_signal_state
incoming_lane = self._scenario.road_map.lane_by_id(incoming_lane_id)
File "/home/tianyu/code/simulator/SMARTS/smarts/core/sumo_road_network.py", line 632, in lane_by_id
sumo_lane = self.graph.getLane(lane_id)
File "/home/tianyu/code/simulator/SMARTS/.venv/lib/python3.8/site-packages/sumo/tools/sumolib/net/init.py", line 261, in getLane
edge_id, lane_index = laneID.rsplit("
", 1)
AttributeError: 'NoneType' object has no attribute 'rsplit'

@SHITIANYU-hue SHITIANYU-hue added the bug Something isn't working label Dec 23, 2022
@Gamenot Gamenot linked a pull request Dec 23, 2022 that will close this issue
@Gamenot
Copy link
Collaborator

Gamenot commented Dec 23, 2022

Hello @SHITIANYU-hue, I apologise that this example was not working. We are to merge in #1788 to fix it.

It will be up on the develop branch or available through git cherry-pick 376bceb. I may merge the current develop branch into master later today.

@Gamenot
Copy link
Collaborator

Gamenot commented Feb 7, 2023

#1788 should have fixed this issue.

@Gamenot Gamenot closed this as completed Feb 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants