Main MRPT website > C++ reference for MRPT 1.5.7
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-2017, 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>
18 
19 namespace mrpt
20 {
21  namespace obs
22  {
23  DEFINE_SERIALIZABLE_PRE_CUSTOM_BASE_LINKAGE( CObservationOdometry, CObservation,OBS_IMPEXP )
24 
25  /** An observation of the current (cumulative) odometry for a wheeled robot.
26  * This kind of observation will only occur in a "observation-only" rawlog file, otherwise
27  * odometry are modeled with actions. Refer to the <a href="http://www.mrpt.org/Rawlog_Format">page on rawlogs</a>.
28  *
29  * \sa CObservation, CActionRobotMovement2D
30  * \ingroup mrpt_obs_grp
31  */
33  {
34  // This must be added to any CSerializable derived class:
36 
37  public:
38  CObservationOdometry(); //!< Default ctor
39 
40  mrpt::poses::CPose2D odometry; //!< The absolute odometry measurement (IT IS NOT INCREMENTAL)
41 
42  bool hasEncodersInfo; //!< "true" means that "encoderLeftTicks" and "encoderRightTicks" contain valid values.
43  /** For differential-driven robots: The ticks count for each wheel in ABSOLUTE VALUE (IT IS NOT INCREMENTAL) (positive means FORWARD, for both wheels); \sa hasEncodersInfo */
44  int32_t encoderLeftTicks,encoderRightTicks;
45 
46  bool hasVelocities; //!< "true" means that `velocityLocal` contains valid values.
47  mrpt::math::TTwist2D velocityLocal; //!< Velocity, in the robot (local) frame of reference (+X=forward).
48 
49  // See base class docs
50  void getSensorPose( mrpt::poses::CPose3D &out_sensorPose ) const MRPT_OVERRIDE { out_sensorPose=mrpt::poses::CPose3D(0,0,0); }
52  void getDescriptionAsText(std::ostream &o) const MRPT_OVERRIDE;
53 
54  }; // End of class def.
55  DEFINE_SERIALIZABLE_POST_CUSTOM_BASE_LINKAGE( CObservationOdometry, CObservation,OBS_IMPEXP )
56 
57  } // End of namespace
58 } // End of namespace
59 
60 #endif
#define MRPT_OVERRIDE
C++11 "override" for virtuals:
mrpt::poses::CPose2D odometry
The absolute odometry measurement (IT IS NOT INCREMENTAL)
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.
2D twist: 2D velocity vector (vx,vy) + planar angular velocity (omega)
#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...
mrpt::math::TTwist2D velocityLocal
Velocity, in the robot (local) frame of reference (+X=forward).
void setSensorPose(const mrpt::poses::CPose3D &) MRPT_OVERRIDE
A general method to change the sensor pose on the robot.
__int32 int32_t
Definition: rptypes.h:48
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, including the 2D coordinate point and a heading (phi) angle...
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 velocityLocal contains valid values.



Page generated by Doxygen 1.8.14 for MRPT 1.5.7 Git: 5902e14cc Wed Apr 24 15:04:01 2019 +0200 at lun oct 28 01:39:17 CET 2019