CARLA
 
载入中...
搜索中...
未找到
SensorRegistry.h
浏览该文件的文档.
1// Copyright (c) 2022 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.
33
34// 2. Add a forward-declaration of the sensor here.
36class ADepthCamera;
37class ANormalsCamera;
38class ADVSCamera;
39class AGnssSensor;
44class ARadar;
46class ARayCastLidar;
50class ARssSensor;
51class FWorldObserver;
54class AV2XSensor;
56
57namespace carla {
58namespace sensor {
59
60 // 3. Register the sensor and its serializer in the SensorRegistry.
61
62 /// Contains a registry of all the sensors available and allows serializing
63 /// and deserializing sensor data for the types registered.
64 ///
65 /// Use s11n::NoopSerializer if the sensor does not send data (sensors that
66 /// work only on client-side).
68 std::pair<ACollisionSensor *, s11n::CollisionEventSerializer>,
69 std::pair<ADepthCamera *, s11n::ImageSerializer>,
70 std::pair<ANormalsCamera *, s11n::NormalsImageSerializer>,
71 std::pair<ADVSCamera *, s11n::DVSEventArraySerializer>,
72 std::pair<AGnssSensor *, s11n::GnssSerializer>,
73 std::pair<AInertialMeasurementUnit *, s11n::IMUSerializer>,
74 std::pair<ALaneInvasionSensor *, s11n::NoopSerializer>,
75 std::pair<AObstacleDetectionSensor *, s11n::ObstacleDetectionEventSerializer>,
76 std::pair<AOpticalFlowCamera *, s11n::OpticalFlowImageSerializer>,
77 std::pair<ARadar *, s11n::RadarSerializer>,
78 std::pair<ARayCastSemanticLidar *, s11n::SemanticLidarSerializer>,
79 std::pair<ARayCastLidar *, s11n::LidarSerializer>,
80 std::pair<ARssSensor *, s11n::NoopSerializer>,
81 std::pair<ASceneCaptureCamera *, s11n::ImageSerializer>,
82 std::pair<ASemanticSegmentationCamera *, s11n::ImageSerializer>,
83 std::pair<AInstanceSegmentationCamera *, s11n::ImageSerializer>,
84 std::pair<FWorldObserver *, s11n::EpisodeStateSerializer>,
85 std::pair<FCameraGBufferUint8 *, s11n::GBufferUint8Serializer>,
86 std::pair<FCameraGBufferFloat *, s11n::GBufferFloatSerializer>,
87 std::pair<AV2XSensor *, s11n::CAMDataSerializer>,
88 std::pair<ACustomV2XSensor *, s11n::CustomV2XDataSerializer>
89
90
91 >;
92
93} // namespace sensor
94} // namespace carla
95
96#endif // LIBCARLA_SENSOR_REGISTRY_INCLUDE_H
97
98#ifdef LIBCARLA_SENSOR_REGISTRY_WITH_SENSOR_INCLUDES
99
100// 4. Include the sensor here.
110#include "Carla/Sensor/Radar.h"
120
121#endif // LIBCARLA_SENSOR_REGISTRY_WITH_SENSOR_INCLUDES
A sensor to register collisions.
Sensor that produce Dynamic Vision Events
Definition DVSCamera.h:44
Sensor that produces "depth" images.
Definition DepthCamera.h:18
Gnss sensor representation The actual position calculation is done one server side
Definition GnssSensor.h:24
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:22
A ray-cast based Lidar sensor.
A ray-cast based Lidar sensor.
RSS sensor representation The actual calculation is done one client side
A sensor that captures images from the scene.
Sensor that produces "semantic segmentation" images.
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.
Definition Carla.cpp:133