smarts.core.vehicle_state module

class smarts.core.vehicle_state.Collision(collidee_id: str, collidee_owner_id: str)[source]

Represents a collision by an ego vehicle with another vehicle.

collidee_id: str

The id of the body that was collided with.

collidee_owner_id: str

The id of the controlling agent or other controlling entity.

class smarts.core.vehicle_state.VehicleConfig(vehicle_type: str, color: SceneColors, dimensions: Dimensions, glb_model: str)[source]

Vehicle configuration

color: SceneColors
dimensions: Dimensions
glb_model: str
vehicle_type: str
class smarts.core.vehicle_state.VehicleState(actor_id: str, actor_type: str | None = None, source: str | None = None, role: ActorRole = ActorRole.Unknown, updated: bool = False, vehicle_config_type: str | None = None, pose: Pose | None = None, dimensions: Dimensions | None = None, speed: float = 0.0, steering: float | None = None, yaw_rate: float | None = None, linear_velocity: ndarray | None = None, angular_velocity: ndarray | None = None, linear_acceleration: ndarray | None = None, angular_acceleration: ndarray | None = None)[source]

Vehicle state information.

angular_acceleration: ndarray | None = None
angular_velocity: ndarray | None = None
angular_velocity_tuple() Tuple[float, float, float] | None[source]

Generates a tuple representation of angular velocity with standard python types.

property bbox: Polygon

Returns a bounding box around the vehicle.

property bounding_box_points: Tuple[Tuple[float, float], Tuple[float, float], Tuple[float, float], Tuple[float, float]]

The minimum fitting heading aligned bounding box. Four 2D points representing the minimum fitting box.

dimensions: Dimensions | None = None
get_dimensions() Dimensions | None[source]

Get the dimensions of this actor. Some actors do not have physical dimensions.

get_pose() Pose | None[source]

Get the pose of this actor. Some actors do not have a physical location.

linear_acceleration: ndarray | None = None
linear_velocity: ndarray | None = None
linear_velocity_tuple() Tuple[float, float, float] | None[source]

Generates a tuple representation of linear velocity with standard python types.

pose: Pose | None = None
speed: float = 0.0
steering: float | None = None
vehicle_config_type: str | None = None
yaw_rate: float | None = None
smarts.core.vehicle_state.neighborhood_vehicles_around_vehicle(vehicle_state, vehicle_states, radius: float | None = None)[source]

Determines what vehicles are within the radius (if given).