selfdriving
PlannerOutput.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/PlannerInput.h>
11 #include <mrpt/graphs/TNodeID.h>
12 
13 #include <optional>
14 #include <set>
15 
16 namespace mpp
17 {
18 /** The output of the path planner */
20 {
21  PlannerOutput() = default;
22  ~PlannerOutput() = default;
23 
25 
26  bool success = false;
27 
28  /** Time spent (in secs) */
29  double computationTime = 0;
30 
31  // Distance from best found path to goal
32  // double goalDistance = std::numeric_limits<double>::max();
33 
34  /** Total cost of the best found path.
35  * Cost is the Euclidean distance, modified by the additional cost map
36  * layers.
37  */
38  double pathCost = std::numeric_limits<double>::max();
39 
40  /** The tree node ID for the goal pose */
41  std::optional<TNodeID> goalNodeId;
42 
43  /** The tree node with the smallest cost-to-goal. This will be
44  * identical to goalNodeId for successful plans reaching the desired
45  * goal state, or something different for unfinished or unsuccessful
46  * plans.
47  */
48  std::optional<TNodeID> bestNodeId;
49  cost_t bestNodeIdCostToGoal = std::numeric_limits<cost_t>::max();
50 
51  /** The generated motion tree that explores free space starting at "start"
52  */
54 };
55 
56 } // namespace mpp
double cost_t
Definition: basic_types.h:25
Definition: bestTrajectory.h:15
double computationTime
Definition: PlannerOutput.h:29
Definition: PlannerInput.h:18
PlannerInput originalInput
Definition: PlannerOutput.h:24
double pathCost
Definition: PlannerOutput.h:38
Definition: PlannerOutput.h:19
MotionPrimitivesTreeSE2 motionTree
Definition: PlannerOutput.h:53
PlannerOutput()=default
std::optional< TNodeID > bestNodeId
Definition: PlannerOutput.h:48
cost_t bestNodeIdCostToGoal
Definition: PlannerOutput.h:49
~PlannerOutput()=default
std::optional< TNodeID > goalNodeId
Definition: PlannerOutput.h:41
bool success
Definition: PlannerOutput.h:26