Main MRPT website > C++ reference for MRPT 1.4.0
obs/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-2016, 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/obs/CObservation.h>
15 #include <mrpt/poses/CPose2D.h>
16 #include <mrpt/poses/CPose3D.h>
17 
18 namespace mrpt
19 {
20  namespace obs
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  // See base class docs
58  void getSensorPose( mrpt::poses::CPose3D &out_sensorPose ) const MRPT_OVERRIDE { out_sensorPose=mrpt::poses::CPose3D(0,0,0); }
60  void getDescriptionAsText(std::ostream &o) const MRPT_OVERRIDE;
61 
62  }; // End of class def.
64 
65  } // End of namespace
66 } // End of namespace
67 
68 #endif
poses::CPose2D odometry
The absolute odometry measurement (IT IS NOT INCREMENTAL)
#define MRPT_OVERRIDE
C++11 "override" for virtuals:
bool hasEncodersInfo
"true" means that "encoderLeftTicks" and "encoderRightTicks" contain valid values.
void getSensorPose(mrpt::poses::CPose3D &out_sensorPose) const MRPT_OVERRIDE
A general method to retrieve the sensor pose on the robot.
float velocityLin
The velocity of the robot, linear in meters/sec and angular in rad/sec.
#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...
void setSensorPose(const mrpt::poses::CPose3D &) MRPT_OVERRIDE
A general method to change the sensor pose on the robot.
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 2D pose.
Definition: CPose2D.h:36
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&#39;s observation.
An observation of the current (cumulative) odometry for a wheeled robot.
#define DEFINE_SERIALIZABLE_POST_CUSTOM_BASE_LINKAGE(class_name, base_name, _LINKAGE_)
bool hasVelocities
"true" means that "velocityLin" and "velocityAng" contain valid values.



Page generated by Doxygen 1.8.13 for MRPT 1.4.0 SVN: at Sat Sep 2 18:44:07 UTC 2017