|
RTAB-Map 0.23.10
Real-Time Appearance-Based Mapping
|
Event class for sensor data communication in RTAB-Map's event system. More...
#include <SensorEvent.h>


Public Types | |
| enum | Code { kCodeData , kCodeNoMoreImages } |
| Event codes for SensorEvent. More... | |
Public Member Functions | |
| SensorEvent (const cv::Mat &image, int seq=0, double stamp=0.0, const std::string &cameraName=std::string()) | |
| Constructor from a single image. | |
| SensorEvent () | |
| Constructor for end-of-stream event. | |
| SensorEvent (const SensorData &data) | |
| Constructor from SensorData. | |
| SensorEvent (const SensorData &data, const std::string &cameraName) | |
| Constructor from SensorData with camera name. | |
| SensorEvent (const SensorData &data, const SensorCaptureInfo &sensorCaptureInfo) | |
| Constructor from SensorData with full capture info. | |
| const SensorData & | data () const |
| Returns the sensor data contained in this event. | |
| const std::string & | cameraName () const |
| Returns the camera name. | |
| const SensorCaptureInfo & | info () const |
| Returns the sensor capture information. | |
| virtual | ~SensorEvent () |
| Virtual destructor. | |
| virtual std::string | getClassName () const |
| Returns the class name for event identification. | |
Public Member Functions inherited from UEvent | |
| int | getCode () const |
Additional Inherited Members | |
Protected Member Functions inherited from UEvent | |
| UEvent (int code=0) | |
Event class for sensor data communication in RTAB-Map's event system.
SensorEvent is an event class that extends UEvent and is used to communicate sensor data (images, depth, laser scans, etc.) through RTAB-Map's event-driven architecture. It is typically posted by sensor capture threads and handled by event handlers (e.g., RtabmapThread, DataRecorder, CalibrationDialog).
The class supports two event codes:
SensorEvent carries:
Definition at line 63 of file SensorEvent.h.
Event codes for SensorEvent.
| Enumerator | |
|---|---|
| kCodeData | Event code indicating new sensor data is available. |
| kCodeNoMoreImages | Event code indicating the sensor stream has ended. |
Definition at line 71 of file SensorEvent.h.
|
inline |
Constructor from a single image.
Creates a SensorEvent with kCodeData containing a single image. This is a convenience constructor for simple image-only sensor data.
| image | The image to include in the sensor data |
| seq | Sequence number (default: 0) |
| stamp | Timestamp in seconds (default: 0.0) |
| cameraName | Optional camera name identifier (default: empty) |
Definition at line 88 of file SensorEvent.h.
|
inline |
Constructor for end-of-stream event.
Creates a SensorEvent with kCodeNoMoreImages to signal that the sensor stream has ended (e.g., end of file, camera disconnected).
Definition at line 103 of file SensorEvent.h.
|
inline |
Constructor from SensorData.
Creates a SensorEvent with kCodeData containing the provided SensorData.
| data | The sensor data to include in the event |
Definition at line 115 of file SensorEvent.h.
|
inline |
Constructor from SensorData with camera name.
Creates a SensorEvent with kCodeData containing the provided SensorData and camera name.
| data | The sensor data to include in the event |
| cameraName | Camera name identifier |
Definition at line 130 of file SensorEvent.h.
|
inline |
Constructor from SensorData with full capture info.
Creates a SensorEvent with kCodeData containing the provided SensorData and complete sensor capture information (camera name, timing, odometry, etc.).
| data | The sensor data to include in the event |
| sensorCaptureInfo | Complete sensor capture information |
Definition at line 146 of file SensorEvent.h.
|
inlinevirtual |
Virtual destructor.
Definition at line 185 of file SensorEvent.h.
|
inline |
Returns the sensor data contained in this event.
Returns the SensorData object containing images, depth, laser scans, camera models, and other sensor information.
Definition at line 161 of file SensorEvent.h.
|
inline |
Returns the camera name.
Returns the camera name identifier from the sensor capture info.
Definition at line 170 of file SensorEvent.h.
|
inline |
Returns the sensor capture information.
Returns the complete sensor capture information including camera name, timing information, odometry pose, covariance, and other metadata.
Definition at line 180 of file SensorEvent.h.
|
inlinevirtual |
Returns the class name for event identification.
Returns "SensorEvent" to allow event handlers to identify this event type.
Implements UEvent.
Definition at line 194 of file SensorEvent.h.