selfdriving
MoveEdgeSE2_TPS.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 
10 #include <mpp/data/basic_types.h>
11 #include <mpp/data/ptg_t.h>
12 #include <mrpt/graphs/TNodeID.h>
13 
14 #include <cstdint>
15 
16 namespace mpp
17 {
18 /** An edge for the move tree used for planning in SE2 and TP-space */
20 {
21  MoveEdgeSE2_TPS() = default;
22  ~MoveEdgeSE2_TPS() = default;
23 
24  /** The ID of the parent node in the tree (all edges must have a valid
25  * starting node). */
26  mrpt::graphs::TNodeID parentId = mrpt::graphs::INVALID_NODEID;
27 
29 
30  /** cost associated to each motion, this should be defined by the user
31  * according to a specific cost function */
32  double cost = std::numeric_limits<double>::max();
33 
34  /** indicate the type of trajectory used for this motion */
35  int8_t ptgIndex = -1;
36 
37  /** identify the trajectory number K of the type ptgIndex */
38  int16_t ptgPathIndex = -1;
39 
40  /** identify the PTG "pseudometers" distance of the trajectory for this
41  * motion segment (NOT normalized distances) */
42  distance_t ptgDist = std::numeric_limits<distance_t>::max();
43 
45 
46  mrpt::math::TPose2D ptgFinalRelativeGoal;
48 
50 
51  ptg_t::TNavDynamicState getPTGDynState() const;
52 
53  /** Subsampled path, in coordinates relative to "stateFrom", stored here
54  * for rendering purposes, to avoid having to re-seed the PTG
55  * with the initial velocity state while visualization,
56  * and to estimate the pose at each time.
57  * Minimum length: 2=start and final pose.
58  */
59  std::map<duration_seconds_t, mrpt::math::TPose2D> interpolatedPath;
60 
61  /** For debugging purposes. */
62  std::string asString() const;
63 };
64 
65 } // namespace mpp
distance_t ptgDist
Definition: MoveEdgeSE2_TPS.h:42
SE2_KinState stateTo
Definition: MoveEdgeSE2_TPS.h:28
Definition: bestTrajectory.h:15
double duration_seconds_t
Definition: basic_types.h:36
Definition: SE2_KinState.h:65
int16_t ptgPathIndex
Definition: MoveEdgeSE2_TPS.h:38
double distance_t
Definition: basic_types.h:16
mrpt::graphs::TNodeID parentId
Definition: MoveEdgeSE2_TPS.h:26
ptg_t::TNavDynamicState getPTGDynState() const
int8_t ptgIndex
Definition: MoveEdgeSE2_TPS.h:35
SE2_KinState stateFrom
Definition: MoveEdgeSE2_TPS.h:28
Definition: MoveEdgeSE2_TPS.h:19
double normalized_speed_t
Definition: basic_types.h:33
std::string asString() const
MoveEdgeSE2_TPS()=default
duration_seconds_t estimatedExecTime
Definition: MoveEdgeSE2_TPS.h:49
std::map< duration_seconds_t, mrpt::math::TPose2D > interpolatedPath
Definition: MoveEdgeSE2_TPS.h:59
mrpt::math::TPose2D ptgFinalRelativeGoal
Definition: MoveEdgeSE2_TPS.h:46
normalized_speed_t ptgTrimmableSpeed
Definition: MoveEdgeSE2_TPS.h:44
normalized_speed_t ptgFinalGoalRelSpeed
Definition: MoveEdgeSE2_TPS.h:47
~MoveEdgeSE2_TPS()=default
double cost
Definition: MoveEdgeSE2_TPS.h:32