Main MRPT website > C++ reference
MRPT logo
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-2014, 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/slam/CObservation.h>
14 #include <mrpt/poses/CPose3D.h>
15 #include <mrpt/poses/CPose2D.h>
17 
18 namespace mrpt
19 {
20 namespace slam
21 {
22  DEFINE_SERIALIZABLE_PRE_CUSTOM_BASE_LINKAGE( CObservationVisualLandmarks , CObservation, VISION_IMPEXP )
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  /** Constructor
36  */
38 
39  /** The 3D pose of the reference camera relative to robot coordinates.
40  */
41  CPose3D refCameraPose;
42 
43  /** The landmarks, with coordinates origin in the camera reference system.
44  */
45  CLandmarksMap landmarks;
46 
47  /** Implements the virtual method in charge of finding the likelihood between this
48  * and another observation, probably only of the same derived class. The operator
49  * may be asymmetric.
50  *
51  * \param anotherObs The other observation to compute likelihood with.
52  * \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.
53  *
54  * \return Returns a likelihood measurement, in the range [0,1].
55  * \exception std::exception On any error, as another observation being of an invalid class.
56  */
57  float likelihoodWith( const CObservation *anotherObs, const CPosePDF *anotherObsPose = NULL ) const;
58 
59  /** A general method to retrieve the sensor pose on the robot.
60  * Note that most sensors will return a full (6D) CPose3D, but see the derived classes for more details or special cases.
61  * \sa setSensorPose
62  */
63  void getSensorPose( CPose3D &out_sensorPose ) const { out_sensorPose = refCameraPose; }
64 
65 
66  /** A general method to change the sensor pose on the robot.
67  * Note that most sensors will use the full (6D) CPose3D, but see the derived classes for more details or special cases.
68  * \sa getSensorPose
69  */
70  void setSensorPose( const CPose3D &newSensorPose ) { refCameraPose = newSensorPose; }
71 
72 
73  }; // End of class def.
74  DEFINE_SERIALIZABLE_POST_CUSTOM_BASE_LINKAGE( CObservationVisualLandmarks , CObservation, VISION_IMPEXP )
75 
76 
77  } // End of namespace
78 } // End of namespace
79 
80 #endif
A class for storing a map of 3D probabilistic landmarks.
Definition: CLandmarksMap.h:63
void setSensorPose(const CPose3D &newSensorPose)
A general method to change the sensor pose on the robot.
Declares a class derived from "CObservation" that stores a Landmarks Map as seen from a stereo camera...
#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...
Declares a class that represents any robot's observation.
Definition: CObservation.h:52
Declares a class that represents a probability density function (pdf) of a 2D pose (x...
Definition: CPosePDF.h:39
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
#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:69
#define DEFINE_SERIALIZABLE_POST_CUSTOM_BASE_LINKAGE(class_name, base_name, _LINKAGE_)



Page generated by Doxygen 1.8.8 for MRPT 1.2.2 SVN:Unversioned directory at Tue Oct 14 02:14:08 UTC 2014