Skip to content

Remove vehicle type from agent interface - #1294

Open
liu-allan wants to merge 5 commits into
developfrom
remove-vehicle-type
Open

Remove vehicle type from agent interface#1294
liu-allan wants to merge 5 commits into
developfrom
remove-vehicle-type

Conversation

@liu-allan

Copy link
Copy Markdown
Contributor

Comment thread smarts/core/controllers/__init__.py
Comment thread smarts/core/vehicle.py
if mission.vehicle_spec == None:
vehicle_type = "sedan"
else:
vehicle_type = mission.vehicle_spec.veh_config_type

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this the right place to get the vehicle type?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, although I am slightly confused as to why the vehicle_spec is inside the mission rather than in the plan.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where should vehicle_spec be specified then?

Comment thread smarts/core/smarts.py
name=self._agent_manager.agent_name(agent_id),
actor_type=actor_type,
vehicle_type=envision_types.VehicleType.Car,
vehicle_type=veh_type,

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change seems to cause the ego vehicle to be the wrong color (grey instead of red) on SUMO maps

@liu-allan
liu-allan requested review from Gamenot and sah-huawei March 1, 2022 18:53
@liu-allan liu-allan self-assigned this Mar 1, 2022
Comment thread smarts/sstudio/types.py
"""Vehicle specifications"""

veh_id: str
veh_config_type: str

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is problematic because we have been and are still distinguishing in our (core) code between veh_type and veh_config_type, where the latter should eventually be fully encapsulated to just the Sumo types (per Issue #1270). I do not think we should be exposing the "config" (Sumo) types in Scenario Studio, but to just change the variable name here to veh_type would also be a misnomer without further unification in the core. Thus, I suggest we deal with this as part of the more comprehensive solution that issue #1270 requires.

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