CARLA
Toggle main menu visibility
Loading...
Searching...
No Matches
LibCarla
source
carla
client
LibCarla/source/carla/client/Sensor.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
#pragma once
8
9
#include "
carla/client/Actor.h
"
10
11
#include <functional>
12
13
namespace
carla
{
14
namespace
sensor
{
class
SensorData
; }
15
namespace
client
{
16
17
class
Sensor
:
public
Actor
{
18
public
:
19
20
using
CallbackFunctionType
= std::function<void(
SharedPtr<sensor::SensorData>
)>;
21
22
using
Actor::Actor;
23
24
/// Register a @a callback to be executed each time a new measurement is
25
/// received.
26
virtual
void
Listen
(
CallbackFunctionType
callback) = 0;
27
28
/// Stop listening for new measurements.
29
virtual
void
Stop
() = 0;
30
31
/// Return whether this Sensor instance is currently listening to new data.
32
virtual
bool
IsListening
()
const
= 0;
33
};
34
35
}
// namespace client
36
}
// namespace carla
carla::client::Sensor
Definition
LibCarla/source/carla/client/Sensor.h:17
carla::client::Sensor::Listen
virtual void Listen(CallbackFunctionType callback)=0
Register a callback to be executed each time a new measurement is received.
carla::client::Sensor::IsListening
virtual bool IsListening() const =0
Return whether this Sensor instance is currently listening to new data.
carla::client::Sensor::Actor
Actor(ActorInitializer init)
Definition
client/Actor.h:25
carla::client::Sensor::Stop
virtual void Stop()=0
Stop listening for new measurements.
carla::client::Sensor::CallbackFunctionType
std::function< void(SharedPtr< sensor::SensorData >)> CallbackFunctionType
Definition
LibCarla/source/carla/client/Sensor.h:20
carla::sensor::SensorData
Base class for all the objects containing data generated by a sensor.
Definition
SensorData.h:22
Actor.h
carla::client
Definition
BasicAgent.h:24
carla::sensor
Definition
client/detail/Client.h:58
carla
This file contains definitions of common data structures used in traffic manager.
Definition
SignComponent.h:21
carla::SharedPtr
std::shared_ptr< T > SharedPtr
Definition
Memory.h:15
Generated by
1.18.0