CARLA
 
载入中...
搜索中...
未找到
LibCarla/source/carla/client/Sensor.h
浏览该文件的文档.
1// Copyright (c) 2017 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
10
11#include <functional>
12
13namespace carla {
14namespace sensor { class SensorData; }
15namespace client {
16
17 class Sensor : public Actor {
18 public:
19
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
Represents an actor in the simulation.
virtual void Listen(CallbackFunctionType callback)=0
Register a callback to be executed each time a new measurement is received.
virtual bool IsListening() const =0
Return whether this Sensor instance is currently listening to new data.
virtual void Stop()=0
Stop listening for new measurements.
std::function< void(SharedPtr< sensor::SensorData >)> CallbackFunctionType
This file contains definitions of common data structures used in traffic manager.
Definition Carla.cpp:133
boost::shared_ptr< T > SharedPtr
Use this SharedPtr (boost::shared_ptr) to keep compatibility with boost::python, but it would be nice...
Definition Memory.h:20