Skip to content

Commit

Permalink
Remove unique id suffix from agent vehicle name. (#1888)
Browse files Browse the repository at this point in the history
  • Loading branch information
Adaickalavan authored Mar 1, 2023
1 parent eea801f commit 4ac842d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
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

0 comments on commit 4ac842d

Please sign in to comment.