From 496cfa9f7cd65a7bb0eb34aee93c14131052fac5 Mon Sep 17 00:00:00 2001 From: Montgomery Alban Date: Tue, 2 Jan 2024 17:00:26 +0000 Subject: [PATCH] Rename vehicle_filepath -> vehicle_dynamics_filepath --- CHANGELOG.md | 1 + smarts/core/vehicle.py | 8 ++------ smarts/core/vehicle_index.py | 2 +- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 491f903cf1..0bffc7840d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/smarts/core/vehicle.py b/smarts/core/vehicle.py index 84afd59ea4..64aab3681f 100644 --- a/smarts/core/vehicle.py +++ b/smarts/core/vehicle.py @@ -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]], @@ -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 @@ -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, diff --git a/smarts/core/vehicle_index.py b/smarts/core/vehicle_index.py index 5a0469a3da..cb587e4ece 100644 --- a/smarts/core/vehicle_index.py +++ b/smarts/core/vehicle_index.py @@ -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(