Skip to content

Commit

Permalink
Rename vehicle_filepath -> vehicle_dynamics_filepath
Browse files Browse the repository at this point in the history
  • Loading branch information
Gamenot committed Jan 2, 2024
1 parent 44ebe2c commit 496cfa9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Copy and pasting the git commit messages is __NOT__ enough.
- `VehicleIndex.build_agent_vehicle()` no longer has `filename` and `surface_patches` parameters.
- Renamed `vehicle.urdf` to `sedan.urdf`.
- Environment prefix is now configurable for custom `smarts.core.config()` calls.
- `Vehicle.build_agent_vehicle()` argument `vehicle_filepath` now renamed to `vehicle_dynamics_filepath`.
### Deprecated
- Module `smarts.core.models` is now deprecated in favour of `smarts.assets`.
### Fixed
Expand Down
8 changes: 2 additions & 6 deletions smarts/core/vehicle.py
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ def build_agent_vehicle(
vehicle_id: str,
agent_interface: AgentInterface,
plan: Plan,
vehicle_filepath: Optional[str],
vehicle_dynamics_filepath: Optional[str],
tire_filepath: str,
trainable: bool,
surface_patches: List[Dict[str, Any]],
Expand All @@ -331,10 +331,6 @@ def build_agent_vehicle(
"""Create a new vehicle and set up sensors and planning information as required by the
ego agent.
"""
urdf_file = cls.vehicle_urdf_path(
vehicle_type=agent_interface.vehicle_type, override_path=vehicle_filepath
)

mission = plan.mission
chassis_dims = cls.agent_vehicle_dims(
mission, default=agent_interface.vehicle_type
Expand Down Expand Up @@ -365,7 +361,7 @@ def build_agent_vehicle(
chassis = AckermannChassis(
pose=start_pose,
bullet_client=sim.bc,
vehicle_filepath=vehicle_filepath,
vehicle_filepath=vehicle_dynamics_filepath,
tire_parameters_filepath=tire_filepath,
friction_map=surface_patches,
controller_parameters=controller_parameters,
Expand Down
2 changes: 1 addition & 1 deletion smarts/core/vehicle_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -695,7 +695,7 @@ def build_agent_vehicle(
vehicle_id=vehicle_id or agent_id,
agent_interface=agent_interface,
plan=plan,
vehicle_filepath=self.load_vehicle_definition(
vehicle_dynamics_filepath=self.load_vehicle_definition(
agent_interface.vehicle_type
).get("dynamics_model"),
tire_filepath=self.load_vehicle_definition(
Expand Down

0 comments on commit 496cfa9

Please sign in to comment.