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

Ensure ego observation road, lane, lane index fields are filled. #1574

Merged
merged 3 commits into from
Aug 23, 2022

Conversation

Gamenot
Copy link
Collaborator

@Gamenot Gamenot commented Aug 19, 2022

This addresses an issue where there are values in the ego observation that are not optional but return None.

@Adaickalavan
Copy link
Member

While running a Waymo scenario, the following error popped up. Error message is truncated for brevity.

  File "/home/adai/workspace/SMARTS/competition/evaluation/.venv/lib/python3.8/site-packages/smarts/env/wrappers/format_obs.py", line 291, in observation
    val = func(getattr(agent_obs, self._stdob_to_ob[stdob]))
  File "/home/adai/workspace/SMARTS/competition/evaluation/.venv/lib/python3.8/site-packages/smarts/env/wrappers/format_obs.py", line 568, in _std_neighbors
    lane_index = np.array(lane_index, dtype=np.int8)
TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'
Exception ignored in: <function SMARTS.__del__ at 0x7f960ffb7c10>

The VehicleObservation.lane_index in obs.neighborhood_vehicle_states appears to be None. We have to make the same fix to the neighbours, as was made to the ego, to ensure neighbour vehicles don't have a lane_index=None.

@Gamenot Gamenot merged commit d702bad into develop Aug 23, 2022
@Gamenot Gamenot deleted the tucker/bugfix-match_observation_interface branch August 23, 2022 14:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants