This class contains motions and motions tree structures for the hybrid navigation algorithm.
Usage:
Changes history
Definition at line 52 of file TMoveTree.h.
#include <mrpt/nav/planners/TMoveTree.h>
Classes | |
struct | node_t |
Public Types | |
typedef mrpt::graphs::CDirectedTree< EDGE_TYPE > | base_t |
typedef EDGE_TYPE | edge_t |
typedef MAPS_IMPLEMENTATION::template map< mrpt::utils::TNodeID, node_t > | node_map_t |
Map: TNode_ID => Node info. More... | |
typedef std::list< node_t > | path_t |
A topological path up-tree. More... | |
typedef std::list< TEdgeInfo > | TListEdges |
typedef std::map< TNodeID, TListEdges > | TMapNode2ListEdges |
Public Member Functions | |
template<class NODE_TYPE_FOR_METRIC > | |
mrpt::utils::TNodeID | getNearestNode (const NODE_TYPE_FOR_METRIC &query_pt, const PoseDistanceMetric< NODE_TYPE_FOR_METRIC > &distanceMetricEvaluator, double *out_distance=NULL, const std::set< mrpt::utils::TNodeID > *ignored_nodes=NULL) const |
Finds the nearest node to a given pose, using the given metric. More... | |
void | insertNodeAndEdge (const mrpt::utils::TNodeID parent_id, const mrpt::utils::TNodeID new_child_id, const NODE_TYPE_DATA &new_child_node_data, const EDGE_TYPE &new_edge_data) |
void | insertNode (const mrpt::utils::TNodeID node_id, const NODE_TYPE_DATA &node_data) |
Insert a node without edges (should be used only for a tree root node) More... | |
mrpt::utils::TNodeID | getNextFreeNodeID () const |
const node_map_t & | getAllNodes () const |
void | backtrackPath (const mrpt::utils::TNodeID target_node, path_t &out_path) const |
Builds the path (sequence of nodes, with info about next edge) up-tree from a target_node towards the root Nodes are ordered in the direction ROOT -> start_node. More... | |
Utilities | |
void | clear () |
Empty all edge data and set "root" to INVALID_NODEID. More... | |
void | visitDepthFirst (const TNodeID root, Visitor &user_visitor, const size_t root_depth_level=0) const |
Depth-first visit of all children nodes of a given root (itself excluded from the visit), invoking a user-provided function for each node/edge. More... | |
void | visitBreadthFirst (const TNodeID root, Visitor &user_visitor, const size_t root_depth_level=0) const |
Breadth-first visit of all children nodes of a given root (itself excluded from the visit), invoking a user-provided function for each node/edge. More... | |
std::string | getAsTextDescription () const |
Return a text representation of the tree spanned in a depth-first view, as in this example: More... | |
Public Attributes | |
Data | |
TNodeID | root |
The root of the tree. More... | |
TMapNode2ListEdges | edges_to_children |
The edges of each node. More... | |
Private Attributes | |
node_map_t | m_nodes |
Info per node. More... | |
typedef mrpt::graphs::CDirectedTree<EDGE_TYPE> mrpt::nav::TMoveTree< NODE_TYPE_DATA, EDGE_TYPE, MAPS_IMPLEMENTATION >::base_t |
Definition at line 69 of file TMoveTree.h.
typedef EDGE_TYPE mrpt::nav::TMoveTree< NODE_TYPE_DATA, EDGE_TYPE, MAPS_IMPLEMENTATION >::edge_t |
Definition at line 70 of file TMoveTree.h.
typedef MAPS_IMPLEMENTATION::template map<mrpt::utils::TNodeID, node_t> mrpt::nav::TMoveTree< NODE_TYPE_DATA, EDGE_TYPE, MAPS_IMPLEMENTATION >::node_map_t |
Map: TNode_ID => Node info.
Definition at line 71 of file TMoveTree.h.
typedef std::list<node_t> mrpt::nav::TMoveTree< NODE_TYPE_DATA, EDGE_TYPE, MAPS_IMPLEMENTATION >::path_t |
A topological path up-tree.
Definition at line 72 of file TMoveTree.h.
|
inherited |
Definition at line 61 of file CDirectedTree.h.
|
inherited |
Definition at line 62 of file CDirectedTree.h.
|
inline |
Builds the path (sequence of nodes, with info about next edge) up-tree from a target_node
towards the root Nodes are ordered in the direction ROOT -> start_node.
Definition at line 131 of file TMoveTree.h.
References INVALID_NODEID, mrpt::nav::TMoveTree< NODE_TYPE_DATA, EDGE_TYPE, MAPS_IMPLEMENTATION >::m_nodes, and mrpt::nav::TMoveTree< NODE_TYPE_DATA, EDGE_TYPE, MAPS_IMPLEMENTATION >::node_t::parent_id.
Referenced by mrpt::nav::PlannerRRT_SE2_TPS::solve().
|
inlineinherited |
Empty all edge data and set "root" to INVALID_NODEID.
Definition at line 74 of file CDirectedTree.h.
References mrpt::graphs::CDirectedTree< TYPE_EDGES >::edges_to_children, INVALID_NODEID, and mrpt::graphs::CDirectedTree< TYPE_EDGES >::root.
|
inline |
Definition at line 126 of file TMoveTree.h.
References mrpt::nav::TMoveTree< NODE_TYPE_DATA, EDGE_TYPE, MAPS_IMPLEMENTATION >::m_nodes.
Referenced by mrpt::nav::PlannerRRT_SE2_TPS::solve().
|
inlineinherited |
Return a text representation of the tree spanned in a depth-first view, as in this example:
Definition at line 127 of file CDirectedTree.h.
References mrpt::graphs::CDirectedTree< TYPE_EDGES >::TEdgeInfo::id, MRPT_OVERRIDE, mrpt::graphs::CDirectedTree< TYPE_EDGES >::TEdgeInfo::reverse, mrpt::graphs::CDirectedTree< TYPE_EDGES >::root, and mrpt::graphs::CDirectedTree< TYPE_EDGES >::visitDepthFirst().
|
inline |
Finds the nearest node to a given pose, using the given metric.
Definition at line 76 of file TMoveTree.h.
References ASSERT_, INVALID_NODEID, and mrpt::nav::TMoveTree< NODE_TYPE_DATA, EDGE_TYPE, MAPS_IMPLEMENTATION >::m_nodes.
Referenced by mrpt::nav::PlannerRRT_SE2_TPS::solve().
|
inline |
Definition at line 124 of file TMoveTree.h.
References mrpt::nav::TMoveTree< NODE_TYPE_DATA, EDGE_TYPE, MAPS_IMPLEMENTATION >::m_nodes.
Referenced by mrpt::nav::PlannerRRT_SE2_TPS::solve().
|
inline |
Insert a node without edges (should be used only for a tree root node)
Definition at line 119 of file TMoveTree.h.
References INVALID_NODEID, and mrpt::nav::TMoveTree< NODE_TYPE_DATA, EDGE_TYPE, MAPS_IMPLEMENTATION >::m_nodes.
Referenced by mrpt::nav::PlannerRRT_SE2_TPS::solve().
|
inline |
Definition at line 105 of file TMoveTree.h.
References mrpt::graphs::CDirectedTree< EDGE_TYPE >::edges_to_children, and mrpt::nav::TMoveTree< NODE_TYPE_DATA, EDGE_TYPE, MAPS_IMPLEMENTATION >::m_nodes.
Referenced by mrpt::nav::PlannerRRT_SE2_TPS::solve().
|
inlineinherited |
Breadth-first visit of all children nodes of a given root (itself excluded from the visit), invoking a user-provided function for each node/edge.
Definition at line 105 of file CDirectedTree.h.
References mrpt::graphs::CDirectedTree< TYPE_EDGES >::edges_to_children, mrpt::graphs::CDirectedTree< TYPE_EDGES >::root, and mrpt::graphs::CDirectedTree< TYPE_EDGES >::visitDepthFirst().
|
inlineinherited |
Depth-first visit of all children nodes of a given root (itself excluded from the visit), invoking a user-provided function for each node/edge.
Definition at line 91 of file CDirectedTree.h.
References mrpt::graphs::CDirectedTree< TYPE_EDGES >::edges_to_children, mrpt::graphs::CDirectedTree< TYPE_EDGES >::root, and mrpt::graphs::CDirectedTree< TYPE_EDGES >::visitDepthFirst().
|
inherited |
The edges of each node.
Definition at line 67 of file CDirectedTree.h.
Referenced by mrpt::nav::TMoveTree< NODE_TYPE_DATA, EDGE_TYPE, MAPS_IMPLEMENTATION >::insertNodeAndEdge().
|
private |
Info per node.
Definition at line 159 of file TMoveTree.h.
Referenced by mrpt::nav::TMoveTree< NODE_TYPE_DATA, EDGE_TYPE, MAPS_IMPLEMENTATION >::backtrackPath(), mrpt::nav::TMoveTree< NODE_TYPE_DATA, EDGE_TYPE, MAPS_IMPLEMENTATION >::getAllNodes(), mrpt::nav::TMoveTree< NODE_TYPE_DATA, EDGE_TYPE, MAPS_IMPLEMENTATION >::getNearestNode(), mrpt::nav::TMoveTree< NODE_TYPE_DATA, EDGE_TYPE, MAPS_IMPLEMENTATION >::getNextFreeNodeID(), mrpt::nav::TMoveTree< NODE_TYPE_DATA, EDGE_TYPE, MAPS_IMPLEMENTATION >::insertNode(), and mrpt::nav::TMoveTree< NODE_TYPE_DATA, EDGE_TYPE, MAPS_IMPLEMENTATION >::insertNodeAndEdge().
|
inherited |
The root of the tree.
Definition at line 66 of file CDirectedTree.h.
Page generated by Doxygen 1.8.14 for MRPT 1.5.9 Git: 690a4699f Wed Apr 15 19:29:53 2020 +0200 at miƩ abr 15 19:30:12 CEST 2020 |