CARLA
Loading...
Searching...
No Matches
SensorRegistry.h
Go to the documentation of this file.
1// Copyright (c) 2026 Computer Vision Center (CVC) at the Universitat Autonoma
2// de Barcelona (UAB).
3//
4// This work is licensed under the terms of the MIT license.
5// For a copy, see <https://opensource.org/licenses/MIT>.
6
7#ifndef LIBCARLA_SENSOR_REGISTRY_INCLUDE_H
8#define LIBCARLA_SENSOR_REGISTRY_INCLUDE_H
9
11
12// =============================================================================
13// Follow the 4 steps to register a new sensor.
14// =============================================================================
15
16// 1. Include the serializer here.
35
36// 2. Add a forward-declaration of the sensor here.
38class ADepthCamera;
39class ANormalsCamera;
40class ADVSCamera;
41class AGnssSensor;
46class ARadar;
48class ARayCastLidar;
55class ARssSensor;
56class FWorldObserver;
63class AHSSLidar;
64class AV2XSensor;
66class AVehicleStatusSensor; // Autoware
67class AAutowareGnssSensor; // Autoware
68
69namespace carla {
70namespace sensor {
71
72 // 3. Register the sensor and its serializer in the SensorRegistry.
73
74 /// Contains a registry of all the sensors available and allows serializing
75 /// and deserializing sensor data for the types registered.
76 ///
77 /// Use s11n::NoopSerializer if the sensor does not send data (sensors that
78 /// work only on client-side).
80 std::pair<ACollisionSensor *, s11n::CollisionEventSerializer>,
81 std::pair<ADepthCamera *, s11n::ImageSerializer>,
82 std::pair<ANormalsCamera *, s11n::NormalsImageSerializer>,
83 std::pair<ADVSCamera *, s11n::DVSEventArraySerializer>,
84 std::pair<AGnssSensor *, s11n::GnssSerializer>,
85 std::pair<AInertialMeasurementUnit *, s11n::IMUSerializer>,
86 std::pair<ALaneInvasionSensor *, s11n::NoopSerializer>,
87 std::pair<AObstacleDetectionSensor *, s11n::ObstacleDetectionEventSerializer>,
88 std::pair<AOpticalFlowCamera *, s11n::OpticalFlowImageSerializer>,
89 std::pair<ARadar *, s11n::RadarSerializer>,
90 std::pair<ARayCastSemanticLidar *, s11n::SemanticLidarSerializer>,
91 std::pair<ARayCastLidar *, s11n::LidarSerializer>,
92 std::pair<ARssSensor *, s11n::NoopSerializer>,
93 std::pair<ASceneCaptureCamera *, s11n::ImageSerializer>,
94 std::pair<ASceneCaptureCamera_RayTracedLens *, s11n::ImageSerializer>,
95 std::pair<ASemanticSegmentationCamera *, s11n::ImageSerializer>,
96 std::pair<AInstanceSegmentationCamera *, s11n::ImageSerializer>,
97 std::pair<FWorldObserver *, s11n::EpisodeStateSerializer>,
98 std::pair<ASceneCaptureCamera_WideAngleLens *, s11n::ImageSerializer>,
99 std::pair<ADepthCamera_WideAngleLens *, s11n::ImageSerializer>,
100 std::pair<AInstanceSegmentationCamera_WideAngleLens *, s11n::ImageSerializer>,
101 std::pair<ASemanticSegmentationCamera_WideAngleLens *, s11n::ImageSerializer>,
102 std::pair<FCameraGBufferUint8 *, s11n::GBufferUint8Serializer>,
103 std::pair<FCameraGBufferFloat *, s11n::GBufferFloatSerializer>,
104 std::pair<AHSSLidar *, s11n::LidarSerializer>,
105 std::pair<AV2XSensor *, s11n::CAMDataSerializer>,
106 std::pair<ACustomV2XSensor *, s11n::CustomV2XDataSerializer>,
107 std::pair<AVehicleStatusSensor *, s11n::VehicleStatusSerializer>, // Autoware
108 std::pair<AAutowareGnssSensor *, s11n::GnssSerializer>, // Autoware
109 // Appended at the end on purpose: the position in this list IS the wire type id,
110 // so inserting anywhere else would renumber every sensor after it.
111 std::pair<ASceneCaptureCamera_RayTracedLensDistance *, s11n::DistanceImageSerializer>,
112 // Tag AOV: the byte layout is the one sensor.camera.instance_segmentation already
113 // uses (R = label, G/B = 16-bit actor id), so it ships as a plain image.
114 std::pair<ASceneCaptureCamera_RayTracedLensInstance *, s11n::ImageSerializer>
115 >;
116
117} // namespace sensor
118} // namespace carla
119
120#endif // LIBCARLA_SENSOR_REGISTRY_INCLUDE_H
121
122#ifdef LIBCARLA_SENSOR_REGISTRY_WITH_SENSOR_INCLUDES
123
124// 4. Include the sensor here.
134#include "Carla/Sensor/Radar.h"
154
155#endif // LIBCARLA_SENSOR_REGISTRY_WITH_SENSOR_INCLUDES
Autoware GNSS sensor ("sensor.other.autoware_gnss"): streams GeoLocation to the client like the regul...
A sensor to register collisions.
Sensor that produce Dynamic Vision Events.
Definition DVSCamera.h:47
Sensor that produces "depth" images.
Sensor that produces "depth" images.
Definition DepthCamera.h:16
Gnss sensor representation The actual position calculation is done one server side.
Definition GnssSensor.h:24
A fixed-sweep ray-cast Lidar approximating a Hybrid Solid-State LiDAR (e.g.
Definition HSSLidar.h:28
Sensor that produces "Instance segmentation" images.
Sensor that produces "Instance segmentation" images.
LaneInvasion sensor representation The actual position calculation is done one client side.
Sensor that produces "normals" images.
A sensor to register collisions.
Sensor that produces "optical flow" images.
A ray-cast based Radar sensor.
Definition Radar.h:21
A ray-cast based Lidar sensor.
A ray-cast based Lidar sensor.
RSS sensor representation The actual calculation is done one client side.
A path-traced distance sensor ("sensor.camera.rt_lens_distance"): the geometric twin of sensor....
A path-traced instance/semantic sensor ("sensor.camera.rt_lens_instance"): the labelling twin of sens...
A path-traced camera sensor ("sensor.camera.rt_lens") that renders through a configurable lens model ...
A sensor that captures images from the scene.
A sensor that captures images from the scene.
Sensor that produces "semantic segmentation" images.
Sensor that produces "semantic segmentation" images.
Vehicle status sensor ("sensor.other.vehicle_status"): attached to a vehicle, streams a packed kinema...
Serializes and sends all the actors in the current UCarlaEpisode.
Compile-time map for mapping sensor objects to serializers.
This file contains definitions of common data structures used in traffic manager.