selfdriving
VehicleLocalizationState.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/CMatrixFixed.h>
10 #include <mrpt/math/TPose2D.h>
11 #include <mrpt/math/TTwist2D.h>
12 #include <mrpt/system/datetime.h>
13 
14 #include <optional>
15 #include <string>
16 
17 namespace mpp
18 {
19 /** Data returned by VehicleMotionInterface::get_localization() */
21 {
22  /** Set to true if data could be retrieved from the robot system
23  * successfully, set to false upon any critical error that made it
24  * impossible to fill in the data fields in this structure. */
25  bool valid = false;
26 
27  /** The current robot pose (typically from a mapping/localization module),
28  * in global map coordinates. (x,y: meters, phi: radians) */
29  mrpt::math::TPose2D pose;
30 
31  /** The timestamp for the read pose.
32  * Use mrpt::system::now() unless you have something more accurate. */
33  mrpt::system::TTimeStamp timestamp = INVALID_TIMESTAMP;
34 
35  /** Optional: if available, place here the (x,y,phi) covariance matrix
36  * representing the uncertainty in the pose localization from the
37  * mapping/particle filter system.
38  * It could be used by the plan executor to take uncertainties into account
39  * or to stop the robot if localization accuracy drops below a certain
40  * required accuracy.
41  */
42  std::optional<mrpt::math::CMatrixDouble33> poseCov;
43 
44  /** ID of the coordinate frame for pose. Default if not
45  modified is "map". [Only for possible future support for submapping] */
46  std::string frame_id = "map";
47 };
48 
49 } // namespace mpp
Definition: bestTrajectory.h:15
mrpt::system::TTimeStamp timestamp
Definition: VehicleLocalizationState.h:33
std::string frame_id
Definition: VehicleLocalizationState.h:46
std::optional< mrpt::math::CMatrixDouble33 > poseCov
Definition: VehicleLocalizationState.h:42
bool valid
Definition: VehicleLocalizationState.h:25
mrpt::math::TPose2D pose
Definition: VehicleLocalizationState.h:29
Definition: VehicleLocalizationState.h:20