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  {
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
#define DEFINE_SERIALIZABLE_POST_CUSTOM_BASE_LINKAGE(class_name, base_name, _LINKAGE_)
#define DEFINE_SERIALIZABLE(class_name)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
#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.
An observation of the current (cumulative) odometry for a wheeled robot.
int32_t encoderLeftTicks
For odometry only: the ticks count for each wheel in ABSOLUTE VALUE (IT IS NOT INCREMENTAL) (positive...
bool hasEncodersInfo
"true" means that "encoderLeftTicks" and "encoderRightTicks" contain valid values.
bool hasVelocities
"true" means that "velocityLin" and "velocityAng" contain valid values.
poses::CPose2D odometry
The absolute odometry measurement (IT IS NOT INCREMENTAL)
void getDescriptionAsText(std::ostream &o) const MRPT_OVERRIDE
Build a detailed, multi-line textual description of the observation contents and dump it to the outpu...
void getSensorPose(mrpt::poses::CPose3D &out_sensorPose) const MRPT_OVERRIDE
A general method to retrieve the sensor pose on the robot.
void setSensorPose(const mrpt::poses::CPose3D &) MRPT_OVERRIDE
A general method to change the sensor pose on the robot.
A class used to store a 2D pose.
Definition: CPose2D.h:37
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
Definition: CPose3D.h:73
#define MRPT_OVERRIDE
C++11 "override" for virtuals:
Definition: mrpt_macros.h:28
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.



Page generated by Doxygen 1.9.1 for MRPT 1.4.0 SVN: at Sun Mar 7 18:43:46 UTC 2021