selfdriving
VehicleOdometryState.h
Go to the documentation of this file.
1 /* -------------------------------------------------------------------------
2  * SelfDriving C++ library based on PTGs and mrpt-nav
3  * Copyright (C) 2019-2022 Jose Luis Blanco, University of Almeria
4  * See LICENSE for license information.
5  * ------------------------------------------------------------------------- */
6 
7 #pragma once
8 
9 #include <mrpt/math/TPose2D.h>
10 #include <mrpt/math/TTwist2D.h>
11 #include <mrpt/system/datetime.h>
12 
13 #include <string>
14 
15 namespace mpp
16 {
17 /** Data returned by VehicleMotionInterface::get_odometry() */
19 {
20  /** Set to true if data could be retrieved from the robot system
21  * successfully, set to false upon any critical error that made it
22  * impossible to fill in the data fields in this structure. */
23  bool valid = false;
24 
25  /** The latest robot raw odometry pose.
26  * (x,y: meters, phi: radians).
27  * Axes: +x=forward, +y=vehicle left, +phi=CCW rotation. */
28  mrpt::math::TPose2D odometry;
29 
30  /** The latest robot velocity, in its own body local frame of reference.
31  * (vx,vy: m/s, omega: rad/s)
32  * Axes: +vx=forward, +vy=vehicle left, +omega=CCW rotation. */
33  mrpt::math::TTwist2D odometryVelocityLocal;
34 
35  /** The timestamp for the read pose and velocity values. Use
36  * mrpt::system::now() unless you have something more accurate. */
37  mrpt::system::TTimeStamp timestamp;
38 
39  /** There exists an action waiting for execution after the current
40  * under-execution one.
41  * See: VehicleMotionInterface::motion_execute() for a discussion.
42  */
43  bool pendedActionExists = false;
44 };
45 
46 } // namespace mpp
Definition: VehicleOdometryState.h:18
Definition: bestTrajectory.h:15
bool valid
Definition: VehicleOdometryState.h:23
mrpt::math::TTwist2D odometryVelocityLocal
Definition: VehicleOdometryState.h:33
bool pendedActionExists
Definition: VehicleOdometryState.h:43
mrpt::system::TTimeStamp timestamp
Definition: VehicleOdometryState.h:37
mrpt::math::TPose2D odometry
Definition: VehicleOdometryState.h:28