smarts.core.controllers package
- exception smarts.core.controllers.ControllerOutOfLaneException[source]
Bases:
Exception
Represents an error due to a vehicle straying too far from any available lane.
- class smarts.core.controllers.Controllers[source]
Bases:
object
Handles vehicle controller selection.
- static get_action_shape(action_space: ActionSpaceType)[source]
Describes the shape of actions that are used for standard controllers.
- Parameters:
action_space (ActionSpaceType) – The action space to describe.
- Raises:
NotImplementedError – The action space requested does is not yet implemented.
- Returns:
The action space and the descriptive attribute.
- Return type:
Tuple[Any, str]
- static perform_action(sim, agent_id, vehicle, action, controller_state, sensor_state, action_space)[source]
Calls control for the given vehicle based on a given action space and action.
- Parameters:
sim – A simulation instance.
agent_id – An agent within the simulation that is associated with a vehicle.
vehicle – A vehicle within the simulation that is associated with an agent.
action – The action for the controller to perform.
controller_state – The last vehicle controller state as relates to its action space.
sensor_state – The state of a vehicle sensor as relates to vehicle sensors.
action_space – The action space of the provided action.
- class smarts.core.controllers.LaneAction(value)[source]
Bases:
Enum
The action for lane space actions.
- change_lane_left: str = 'change_lane_left'
- change_lane_right: str = 'change_lane_right'
- keep_lane: str = 'keep_lane'
- slow_down: str = 'slow_down'
- smarts.core.controllers.action_space_type module
- smarts.core.controllers.actuator_dynamic_controller module
- smarts.core.controllers.direct_controller module
- smarts.core.controllers.lane_following_controller module
- smarts.core.controllers.motion_planner_controller module
- smarts.core.controllers.trajectory_interpolation_controller module
- smarts.core.controllers.trajectory_tracking_controller module