selfdriving
EnqueuedMotionCmd.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/kinematics/CVehicleVelCmd.h>
10 #include <mrpt/math/TPose2D.h>
11 
12 namespace mpp
13 {
14 /** An odometry position condition used in EnqueuedMotionCmd */
16 {
17  /** The center of the (x,y,phi) "pose volume" that will trigger the next
18  * motion command, in *odometry* frame of reference. */
19  mrpt::math::TPose2D position;
20 
21  /** The three lengths of the "pose volume" described above.
22  * Only possitive numbers in all (x,y,phi) fields.
23  *
24  * Example:
25  * - position = [-2.0, 3.0, 45.0_deg]
26  * - tolerance = [0.10, 0.10, 2.0_deg]
27  * means the next command will be triggered when the robot odometry enters
28  * the volume:
29  * - x ∈ [-2.05, -1.95]
30  * - y ∈ [ 2.95, 3.05]
31  * - phi ∈ [ 44_deg, 46_deg]
32  *
33  */
34  mrpt::math::TPose2D tolerance;
35 
36  /** In seconds. This should hold a larger time than the ETA to the given
37  * position. */
38  double timeout = 10.0;
39 };
40 
41 /** A "pending" motion command to be used in
42  * VehicleMotionInterface::motion_execute() */
44 {
45  mrpt::kinematics::CVehicleVelCmd::Ptr nextCmd;
47 };
48 
49 } // namespace mpp
Definition: EnqueuedMotionCmd.h:15
Definition: bestTrajectory.h:15
Definition: EnqueuedMotionCmd.h:43
EnqueuedCondition nextCondition
Definition: EnqueuedMotionCmd.h:46
mrpt::math::TPose2D position
Definition: EnqueuedMotionCmd.h:19
mrpt::kinematics::CVehicleVelCmd::Ptr nextCmd
Definition: EnqueuedMotionCmd.h:45
double timeout
Definition: EnqueuedMotionCmd.h:38
mrpt::math::TPose2D tolerance
Definition: EnqueuedMotionCmd.h:34