Main MRPT website > C++ reference for MRPT 1.5.6
obs/CObservationVisualLandmarks.h
Go to the documentation of this file.
1 /* +---------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | http://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2017, Individual contributors, see AUTHORS file |
6  | See: http://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See details in http://www.mrpt.org/License |
8  +---------------------------------------------------------------------------+ */
9 #ifndef CObservationVisualLandmarks_H
10 #define CObservationVisualLandmarks_H
11 
13 #include <mrpt/obs/CObservation.h>
14 #include <mrpt/poses/CPose3D.h>
15 #include <mrpt/poses/CPose2D.h>
17 
18 namespace mrpt
19 {
20 namespace obs
21 {
23 
24  /** Declares a class derived from "CObservation" that stores a Landmarks Map as seen from a stereo camera at a given instant of time.
25  *
26  * \sa CLandmarksMap, CObservation
27  * \ingroup mrpt_vision_grp
28  */
30  {
31  // This must be added to any CSerializable derived class:
33 
34  public:
35  CObservationVisualLandmarks( ); //!< Constructor
36 
37  mrpt::poses::CPose3D refCameraPose; //!< The 3D pose of the reference camera relative to robot coordinates.
38  mrpt::maps::CLandmarksMap landmarks; //!< The landmarks, with coordinates origin in the camera reference system.
39 
40  /** Implements the virtual method in charge of finding the likelihood between this
41  * and another observation, probably only of the same derived class. The operator
42  * may be asymmetric.
43  *
44  * \param anotherObs The other observation to compute likelihood with.
45  * \param anotherObsPose If known, the belief about the robot pose when the other observation was taken can be supplied here, or NULL if it is unknown.
46  *
47  * \return Returns a likelihood measurement, in the range [0,1].
48  * \exception std::exception On any error, as another observation being of an invalid class.
49  */
50  float likelihoodWith( const mrpt::obs::CObservation *anotherObs, const mrpt::poses::CPosePDF *anotherObsPose = NULL ) const;
51 
52  // See base class docs
53  void getSensorPose( mrpt::poses::CPose3D &out_sensorPose ) const MRPT_OVERRIDE { out_sensorPose = refCameraPose; }
54  void setSensorPose( const mrpt::poses::CPose3D &newSensorPose ) MRPT_OVERRIDE { refCameraPose = newSensorPose; }
55  void getDescriptionAsText(std::ostream &o) const MRPT_OVERRIDE;
56 
57  }; // End of class def.
59 
60 
61  } // End of namespace
62 } // End of namespace
63 
64 #endif
#define MRPT_OVERRIDE
C++11 "override" for virtuals:
Declares a class derived from "CObservation" that stores a Landmarks Map as seen from a stereo camera...
void setSensorPose(const mrpt::poses::CPose3D &newSensorPose) MRPT_OVERRIDE
A general method to change the sensor pose on the robot.
#define DEFINE_SERIALIZABLE_PRE_CUSTOM_BASE_LINKAGE(class_name, base_name, _LINKAGE_)
This declaration must be inserted in all CSerializable classes definition, before the class declarati...
mrpt::maps::CLandmarksMap CLandmarksMap
Backward compatible typedef.
mrpt::obs::CObservationVisualLandmarks CObservationVisualLandmarks
Backward compatible typedef.
#define DEFINE_SERIALIZABLE(class_name)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
Definition: CPose3D.h:72
Declares a class that represents any robot's observation.
#define DEFINE_SERIALIZABLE_POST_CUSTOM_BASE_LINKAGE(class_name, base_name, _LINKAGE_)



Page generated by Doxygen 1.8.6 for MRPT 1.5.6 Git: 4c65e84 Tue Apr 24 08:18:17 2018 +0200 at mar abr 24 08:26:17 CEST 2018