Main MRPT website > C++ reference
MRPT logo
CObservationOdometry.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 
10 #ifndef CObservationOdometry_H
11 #define CObservationOdometry_H
12 
14 #include <mrpt/slam/CObservation.h>
15 #include <mrpt/poses/CPose2D.h>
16 #include <mrpt/poses/CPose3D.h>
17 
18 namespace mrpt
19 {
20  namespace slam
21  {
22  DEFINE_SERIALIZABLE_PRE_CUSTOM_BASE_LINKAGE( CObservationOdometry, CObservation,OBS_IMPEXP )
23 
24  /** An observation of the current (cumulative) odometry for a wheeled robot.
25  * This kind of observation will only occur in a "observation-only" rawlog file, otherwise
26  * odometry are modeled with actions. Refer to the <a href="http://www.mrpt.org/Rawlog_Format">page on rawlogs</a>.
27  *
28  * \sa CObservation, CActionRobotMovement2D
29  * \ingroup mrpt_obs_grp
30  */
32  {
33  // This must be added to any CSerializable derived class:
35 
36  public:
37  /** Constructor
38  */
40 
41  poses::CPose2D odometry; //!< The absolute odometry measurement (IT IS NOT INCREMENTAL)
42 
43  bool hasEncodersInfo; //!< "true" means that "encoderLeftTicks" and "encoderRightTicks" contain valid values.
44 
45  /** For odometry only: the ticks count for each wheel in ABSOLUTE VALUE (IT IS NOT INCREMENTAL) (positive means FORWARD, for both wheels);
46  * \sa hasEncodersInfo
47  */
48  int32_t encoderLeftTicks,encoderRightTicks;
49 
50  bool hasVelocities; //!< "true" means that "velocityLin" and "velocityAng" contain valid values.
51 
52  /** The velocity of the robot, linear in meters/sec and angular in rad/sec.
53  */
54  float velocityLin, velocityAng;
55 
56 
57  /** A general method to retrieve the sensor pose on the robot.
58  * It has no effects in this class
59  * \sa setSensorPose
60  */
61  void getSensorPose( CPose3D &out_sensorPose ) const { out_sensorPose=CPose3D(0,0,0); }
62 
63  /** A general method to change the sensor pose on the robot.
64  * It has no effects in this class
65  * \sa getSensorPose
66  */
67  void setSensorPose( const CPose3D & ) { }
68 
69  }; // End of class def.
70  DEFINE_SERIALIZABLE_POST_CUSTOM_BASE_LINKAGE( CObservationOdometry, CObservation,OBS_IMPEXP )
71 
72  } // End of namespace
73 } // End of namespace
74 
75 #endif
void setSensorPose(const CPose3D &)
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...
Declares a class that represents any robot's observation.
Definition: CObservation.h:52
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...
An observation of the current (cumulative) odometry for a wheeled robot.
A class used to store a 2D pose.
Definition: CPose2D.h:36
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