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

Remove unique id suffix from agent vehicle name #1888

Merged
merged 1 commit into from
Mar 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Copy and pasting the git commit messages is __NOT__ enough.
## [Unreleased]
### Added
### Changed
- Unique id suffix is removed from vehicle name while building agent vehicle in `VehicleIndex.build_agent_vehicle()` function.
### Deprecated
### Fixed
- Missing neighborhood vehicle ids are now added to the `highway-v1` formatted observations.
Expand Down
19 changes: 9 additions & 10 deletions smarts/core/vehicle_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -607,17 +607,16 @@ def build_agent_vehicle(
boid=False,
):
"""Build an entirely new vehicle for an agent."""
vehicle_id = f"{agent_id}-{gen_id()}"
vehicle = Vehicle.build_agent_vehicle(
sim,
vehicle_id,
agent_interface,
plan,
filepath,
tire_filepath,
trainable,
surface_patches,
initial_speed,
sim=sim,
vehicle_id=agent_id,
agent_interface=agent_interface,
plan=plan,
vehicle_filepath=filepath,
tire_filepath=tire_filepath,
trainable=trainable,
surface_patches=surface_patches,
initial_speed=initial_speed,
)

sensor_state = SensorState(
Expand Down