Main MRPT website > C++ reference
MRPT logo
CObservationVisualLandmarks.h
Go to the documentation of this file.
1 /* +---------------------------------------------------------------------------+
2  | The Mobile Robot Programming Toolkit (MRPT) C++ library |
3  | |
4  | http://www.mrpt.org/ |
5  | |
6  | Copyright (C) 2005-2012 University of Malaga |
7  | |
8  | This software was written by the Machine Perception and Intelligent |
9  | Robotics Lab, University of Malaga (Spain). |
10  | Contact: Jose-Luis Blanco <jlblanco@ctima.uma.es> |
11  | |
12  | This file is part of the MRPT project. |
13  | |
14  | MRPT is free software: you can redistribute it and/or modify |
15  | it under the terms of the GNU General Public License as published by |
16  | the Free Software Foundation, either version 3 of the License, or |
17  | (at your option) any later version. |
18  | |
19  | MRPT is distributed in the hope that it will be useful, |
20  | but WITHOUT ANY WARRANTY; without even the implied warranty of |
21  | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
22  | GNU General Public License for more details. |
23  | |
24  | You should have received a copy of the GNU General Public License |
25  | along with MRPT. If not, see <http://www.gnu.org/licenses/>. |
26  | |
27  +---------------------------------------------------------------------------+ */
28 #ifndef CObservationVisualLandmarks_H
29 #define CObservationVisualLandmarks_H
30 
32 #include <mrpt/slam/CObservation.h>
33 #include <mrpt/poses/CPose3D.h>
34 #include <mrpt/poses/CPose2D.h>
36 
37 namespace mrpt
38 {
39 namespace slam
40 {
42 
43  /** Declares a class derived from "CObservation" that stores a Landmarks Map as seen from a stereo camera at a given instant of time.
44  *
45  * \sa CLandmarksMap, CObservation
46  * \ingroup mrpt_vision_grp
47  */
49  {
50  // This must be added to any CSerializable derived class:
52 
53  public:
54  /** Constructor
55  */
57 
58  /** The 3D pose of the reference camera relative to robot coordinates.
59  */
60  CPose3D refCameraPose;
61 
62  /** The landmarks, with coordinates origin in the camera reference system.
63  */
64  CLandmarksMap landmarks;
65 
66  /** Implements the virtual method in charge of finding the likelihood between this
67  * and another observation, probably only of the same derived class. The operator
68  * may be asymmetric.
69  *
70  * \param anotherObs The other observation to compute likelihood with.
71  * \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.
72  *
73  * \return Returns a likelihood measurement, in the range [0,1].
74  * \exception std::exception On any error, as another observation being of an invalid class.
75  */
76  float likelihoodWith( const CObservation *anotherObs, const CPosePDF *anotherObsPose = NULL ) const;
77 
78  /** A general method to retrieve the sensor pose on the robot.
79  * Note that most sensors will return a full (6D) CPose3D, but see the derived classes for more details or special cases.
80  * \sa setSensorPose
81  */
82  void getSensorPose( CPose3D &out_sensorPose ) const { out_sensorPose = refCameraPose; }
83 
84 
85  /** A general method to change the sensor pose on the robot.
86  * Note that most sensors will use the full (6D) CPose3D, but see the derived classes for more details or special cases.
87  * \sa getSensorPose
88  */
89  void setSensorPose( const CPose3D &newSensorPose ) { refCameraPose = newSensorPose; }
90 
91 
92  }; // End of class def.
93 
94 
95  } // End of namespace
96 } // End of namespace
97 
98 #endif



Page generated by Doxygen 1.8.3 for MRPT 0.9.6 SVN: at Fri Feb 15 22:05:02 EST 2013