22 "sensor object went out of the scope but the sensor is still alive",
33 }
catch (
const std::exception &e) {
42 GetEpisode().
Lock()->SubscribeToSensor(*
this, std::move(callback));
50 "attempting to unsubscribe from stream but sensor wasn't listening:",
62 log_warning(
"Send methods are not supported on non-V2x sensors (sensor.other.v2x_custom).");
73 log_warning(
"GBuffer methods are not supported on non-RGB sensors (sensor.camera.rgb).");
76 GetEpisode().
Lock()->SubscribeToGBuffer(*
this, GBufferId, std::move(callback));
86 log_warning(
"GBuffer methods are not supported on non-RGB sensors (sensor.camera.rgb).");
115 return Actor::Destroy();
#define RELEASE_ASSERT(pred)
constexpr size_t GBufferTextureCount
static bool IsValid(const ACarlaWheeledVehicle *Vehicle)
std::function< void(SharedPtr< sensor::SensorData >)> CallbackFunctionType
bool IsEnabledForROS()
Return if the sensor is publishing for ROS2
void EnableForROS()
Enable this sensor for ROS2 publishing
std::bitset< 16 > listening_mask
void ListenToGBuffer(uint32_t GBufferId, CallbackFunctionType callback)
Listen fr
void Send(std::string message)
Send data via this sensor
void Stop() override
Stop listening for new measurements.
void DisableForROS()
Disable this sensor for ROS2 publishing
bool IsListening() const override
Return whether this Sensor instance is currently listening to the associated sensor in the simulator.
void Listen(CallbackFunctionType callback) override
Register a callback to be executed each time a new measurement is received.
void StopGBuffer(uint32_t GBufferId)
Stop listening for a specific gbuffer stream.
EpisodeProxy & GetEpisode()
const rpc::Actor & GetActorDescription() const
const std::string & GetDisplayId() const
SharedPtrType Lock() const
Same as TryLock but never return nullptr.
This file contains definitions of common data structures used in traffic manager.
static void log_error(Args &&... args)
static void log_warning(Args &&... args)
static void log_debug(Args &&... args)