smarts.core.sensor module
- class smarts.core.sensor.AccelerometerSensor[source]
Tracks motion changes within the vehicle equipped with this sensor.
- class smarts.core.sensor.CameraSensor(vehicle_state: VehicleState, renderer: RendererBase, name: str, mask: int, width: int, height: int, resolution: float, build_camera: bool = True)[source]
The base for a sensor that renders images.
- property camera_name: str
The name of the camera this sensor is using.
- property name: str
The name of this sensor.
- property serializable: bool
If this sensor can be serialized.
- step(sim_frame: SimulationFrame, **kwargs)[source]
Update sensor state.
- class smarts.core.sensor.CustomRenderSensor(vehicle_state: VehicleState, width: int, height: int, resolution: float, renderer: RendererBase, fragment_shader_path: str, render_dependencies: Tuple[RenderDependencyBase, ...], ogm_sensor: OGMSensor | None, top_down_rgb_sensor: RGBSensor | None, drivable_area_grid_map_sensor: DrivableAreaGridMapSensor | None, occlusion_map_sensor: OcclusionMapSensor | None, name: str)[source]
Defines a configurable image sensor.
- step(sim_frame: SimulationFrame, **kwargs)[source]
Update sensor state.
- class smarts.core.sensor.DrivableAreaGridMapSensor(vehicle_state: VehicleState, width: int, height: int, resolution: float, renderer: RendererBase)[source]
A sensor that renders drivable area from around its target actor.
- class smarts.core.sensor.DrivenPathSensor(max_path_length: int = 500)[source]
Tracks the driven path as a series of positions (regardless if the vehicle is following the route or not). For performance reasons it only keeps the last N=max_path_length path segments.
- class smarts.core.sensor.LanePositionSensor[source]
Tracks lane-relative RefLine (Frenet) coordinates.
- property mutable: bool
If this sensor mutates on call.
- class smarts.core.sensor.LidarSensor(vehicle_state: VehicleState, sensor_params: SensorParams | None = None, lidar_offset=(0, 0, 1))[source]
A lidar sensor.
- follow_vehicle(vehicle_state: VehicleState)[source]
Update the sensor to target the given vehicle.
- property serializable: bool
If this sensor can be serialized.
- class smarts.core.sensor.NeighborhoodVehiclesSensor(radius: float | None = None)[source]
Detects other vehicles around the sensor equipped vehicle.
- property mutable: bool
If this sensor mutates on call.
- property radius: float
Radius to check for nearby vehicles.
- class smarts.core.sensor.OGMSensor(vehicle_state: VehicleState, width: int, height: int, resolution: float, renderer: RendererBase)[source]
A sensor that renders occupancy information from around its target actor.
- class smarts.core.sensor.OcclusionMapSensor(vehicle_state: VehicleState, width: int, height: int, resolution: float, renderer: RendererBase, ogm_sensor: OGMSensor, add_surface_noise: bool)[source]
A sensor that demonstrates only the areas that can be seen by the vehicle.
- class smarts.core.sensor.RGBSensor(vehicle_state: VehicleState, width: int, height: int, resolution: float, renderer: RendererBase)[source]
A sensor that renders color values from around its target actor.
- class smarts.core.sensor.RoadWaypointsSensor(horizon: int = 32)[source]
Detects waypoints from all paths nearby the vehicle.
- property mutable: bool
If this sensor mutates on call.
- class smarts.core.sensor.Sensor[source]
The sensor base class.
- property mutable: bool
If this sensor mutates on call.
- property serializable: bool
If this sensor can be serialized.
- step(sim_frame: SimulationFrame, **kwargs)[source]
Update sensor state.
- class smarts.core.sensor.SignalsSensor(lookahead: float)[source]
Reports state of traffic signals (lights) in the lanes ahead of vehicle.
- class smarts.core.sensor.TripMeterSensor[source]
Tracks distance travelled along the route (in meters). Meters driven while off-route are not counted as part of the total.