Class CObservation
Defined in File CObservation.h
Inheritance Relationships
Base Types
public mrpt::serialization::CSerializablepublic mrpt::Stringifyable
Derived Types
public mrpt::obs::CObservation2DRangeScan(Class CObservation2DRangeScan)public mrpt::obs::CObservation3DRangeScan(Class CObservation3DRangeScan)public mrpt::obs::CObservation3DScene(Class CObservation3DScene)public mrpt::obs::CObservation6DFeatures(Class CObservation6DFeatures)public mrpt::obs::CObservationBatteryState(Class CObservationBatteryState)public mrpt::obs::CObservationBeaconRanges(Class CObservationBeaconRanges)public mrpt::obs::CObservationBearingRange(Class CObservationBearingRange)public mrpt::obs::CObservationCANBusJ1939(Class CObservationCANBusJ1939)public mrpt::obs::CObservationComment(Class CObservationComment)public mrpt::obs::CObservationGPS(Class CObservationGPS)public mrpt::obs::CObservationGasSensors(Class CObservationGasSensors)public mrpt::obs::CObservationIMU(Class CObservationIMU)public mrpt::obs::CObservationImage(Class CObservationImage)public mrpt::obs::CObservationOdometry(Class CObservationOdometry)public mrpt::obs::CObservationRFID(Class CObservationRFID)public mrpt::obs::CObservationRGBD360(Class CObservationRGBD360)public mrpt::obs::CObservationRange(Class CObservationRange)public mrpt::obs::CObservationRawDAQ(Class CObservationRawDAQ)public mrpt::obs::CObservationReflectivity(Class CObservationReflectivity)public mrpt::obs::CObservationRobotPose(Class CObservationRobotPose)public mrpt::obs::CObservationRotatingScan(Class CObservationRotatingScan)public mrpt::obs::CObservationSkeleton(Class CObservationSkeleton)public mrpt::obs::CObservationStereoImages(Class CObservationStereoImages)public mrpt::obs::CObservationStereoImagesFeatures(Class CObservationStereoImagesFeatures)public mrpt::obs::CObservationVelodyneScan(Class CObservationVelodyneScan)public mrpt::obs::CObservationWindSensor(Class CObservationWindSensor)public mrpt::obs::CObservationWirelessPower(Class CObservationWirelessPower)
Class Documentation
-
class CObservation : public mrpt::serialization::CSerializable, public mrpt::Stringifyable
Subclassed by mrpt::obs::CObservation2DRangeScan, mrpt::obs::CObservation3DRangeScan, mrpt::obs::CObservation3DScene, mrpt::obs::CObservation6DFeatures, mrpt::obs::CObservationBatteryState, mrpt::obs::CObservationBeaconRanges, mrpt::obs::CObservationBearingRange, mrpt::obs::CObservationCANBusJ1939, mrpt::obs::CObservationComment, mrpt::obs::CObservationGPS, mrpt::obs::CObservationGasSensors, mrpt::obs::CObservationIMU, mrpt::obs::CObservationImage, mrpt::obs::CObservationOdometry, mrpt::obs::CObservationRFID, mrpt::obs::CObservationRGBD360, mrpt::obs::CObservationRange, mrpt::obs::CObservationRawDAQ, mrpt::obs::CObservationReflectivity, mrpt::obs::CObservationRobotPose, mrpt::obs::CObservationRotatingScan, mrpt::obs::CObservationSkeleton, mrpt::obs::CObservationStereoImages, mrpt::obs::CObservationStereoImagesFeatures, mrpt::obs::CObservationVelodyneScan, mrpt::obs::CObservationWindSensor, mrpt::obs::CObservationWirelessPower
Data common to any observation
-
mrpt::system::TTimeStamp timestamp = {mrpt::Clock::now()}
The associated UTC time-stamp. Where available, this should contain the accurate satellite-based timestamp of the sensor reading.
See also
-
std::string sensorLabel
An arbitrary label that can be used to identify the sensor.
-
inline mrpt::system::TTimeStamp getTimeStamp() const
Returns CObservation::timestamp for all kind of observations
See also
-
inline virtual mrpt::system::TTimeStamp getOriginalReceivedTimeStamp() const
By default, returns CObservation::timestamp but in sensors capable of satellite (or otherwise) accurate UTC timing of readings, this contains the computer-based timestamp of reception, which may be slightly different than timestamp
See also
Delayed-load manual control methods.
-
inline virtual void load_impl() const
-
inline void load() const
Makes sure all images and other fields which may be externally stored are loaded in memory. Note that for all CImages, calling load() is not required since the images will be automatically loaded upon first access, so load() shouldn’t be needed to be called in normal cases by the user. If all the data were alredy loaded or this object has no externally stored data fields, calling this method has no effects.
See also
Export to TXT/CSV API (see the rawlog-edit app)
-
inline virtual bool exportTxtSupported() const
Must return true if the class is exportable to TXT/CSV files, in which case the other virtual methods in this group must be redefined too.
-
inline virtual std::string exportTxtHeader() const
Returns the description of the data columns. Timestamp is automatically included as the first column, do not list it. See example implementations if interested in enabling this in custom CObservation classes. Do not include newlines.
-
inline virtual std::string exportTxtDataRow() const
Returns one row of data with the data stored in this particular object. Do not include newlines.
Public Functions
-
CObservation() = default
Constructor: It sets the initial timestamp to current time
-
template<class METRICMAP>
inline bool insertObservationInto(METRICMAP &theMap, const std::optional<const mrpt::poses::CPose3D> &robotPose = std::nullopt) const This method is equivalent to:
See: maps_observationsmap->insertObservation(this, robotPose)
See also
CMetricMap, CMetricMap::insertObservation
- Parameters:
theMap – The map where this observation is to be inserted: the map will be updated.
robotPose – The pose of the robot base for this observation, relative to the target metric map. Set to nullptr (default) to use (0,0,0deg)
- Returns:
Returns true if the map has been updated, or false if this observations has nothing to do with a metric map (for example, a sound observation).
-
virtual void getSensorPose(mrpt::poses::CPose3D &out_sensorPose) const = 0
A general method to retrieve the sensor pose on the robot. Note that most sensors will return a full (6D) CPose3D, but see the derived classes for more details or special cases.
See also
-
void getSensorPose(mrpt::math::TPose3D &out_sensorPose) const
A general method to retrieve the sensor pose on the robot. Note that most sensors will return a full (6D) CPose3D, but see the derived classes for more details or special cases.
See also
-
inline mrpt::math::TPose3D sensorPose() const
synonym with getSensorPose()
See also
Note
(New in MRPT 2.3.1)
-
virtual void setSensorPose(const mrpt::poses::CPose3D &newSensorPose) = 0
A general method to change the sensor pose on the robot. Note that most sensors will use the full (6D) CPose3D, but see the derived classes for more details or special cases.
See also
-
void setSensorPose(const mrpt::math::TPose3D &newSensorPose)
A general method to change the sensor pose on the robot. Note that most sensors will use the full (6D) CPose3D, but see the derived classes for more details or special cases.
See also
-
virtual void getDescriptionAsText(std::ostream &o) const
Build a detailed, multi-line textual description of the observation contents and dump it to the output stream.
Note
If overried by derived classes, call base CObservation::getDescriptionAsText() first to show common information.
Note
This is the text that appears in RawLogViewer when selecting an object in the dataset
-
virtual std::string asString() const override
Return by value version of getDescriptionAsText(std::ostream&).
Protected Functions
-
void swap(CObservation &o)
Swap with another observation, ONLY the data defined here in the base class CObservation. It’s protected since it’ll be only called from child classes that should know what else to swap appart from these common data.
-
mrpt::system::TTimeStamp timestamp = {mrpt::Clock::now()}