35 template<
class MOVE_TYPE>
60 treeInitialized =
true;
66 inline void setReverse (
bool _reverse) { reverse_=_reverse; }
78 void addEdge (
const MOVE_TYPE &parent_,
const MOVE_TYPE &new_motion )
80 ASSERTMSG_(treeInitialized ==
true,
"The tree is not initialized!")
83 typename TMoveTree::TEdgeInfo my_edge (id_child, reverse_, new_motion );
84 my_list_of_edges.push_back(my_edge);
98 MRPT_TODO (
"WRITE searchIDinTree function, here of in CDirectedTree.h?")
108 MRPT_TODO (
"WRITE getNearestMove function, here of in CDirectedTree.h?")
bool initializeMoveTree()
Initialize variables and the list of edges for the tree.
mrpt::poses::TPose2D state
state in SE2 as 2D pose (x, y, phi) -
TMapNode2ListEdges edges_to_children
The edges of each node.
mrpt::poses::TPose2D state
state in SE2 as 2D pose (x, y, phi) -
< Make available this typedef in this namespace too
void addEdge(const MOVE_TYPE &parent_, const MOVE_TYPE &new_motion)
addEdge (from, to) have to be implemented in the following way: IN-> from MOVE_TYPE parent_ to MOVE_T...
mrpt::utils::TNodeID id_child
child id will change according to the parent level
TNodeID searchIDinTree(const MOVE_TYPE &mov)
return the Node_ID of a specific motion.
std::list< TEdgeInfo > TListEdges
uint64_t TNodeID
The type for node IDs in graphs of different types.
TMoveTree< TMoveSE2_TP > TMoveTreeSE2_TP
tree datastructure for planning RRT in SE2 with TP-space
TMoveSE2_TP(mrpt::poses::TPose2D POSE_)
TMoveTree< TMoveSE3 > TMoveTreeSE3
tree datastructure for planning RRT in SE3
This class contains motions and motions tree structures for the hybrid navigation algorithm...
double ptg_dist
identify the lenght of the trajectory for this motion
int ptg_index
indicate the type of trajectory used for this motion
mrpt::poses::TPose3D state
state in SE3 as 3D pose (x, y, z, yaw, pitch, roll) -
TMoveSE2(mrpt::poses::TPose2D POSE_)
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
static const mrpt::utils::TNodeID id_root
set ID of the root node always 0
uint64_t TNodeID
The type for node IDs in graphs of different types.
TMoveSE3(mrpt::poses::TPose3D POSE_)
double cost
cost associated to each motion, this should be defined by the user according to a spefic cost functio...
void setReverse(bool _reverse)
this allow the user to set the reverse mode in the tree - false as default
int ptg_K
identify the trajectory number K of the type ptg_index
TMoveTree< TMoveSE2 > TMoveTreeSE2
tree datastructure for planning RRT in SE2
TNodeID getNearestMove(const MOVE_TYPE &TMove_)
return the TEdgeInfo of the nearest neighbor to a specific motion.
bool reverse_
flag for forward of backward tree exploration - default = false i.e. forward
double cost
cost associated to each motion, this should be defined by the user according to a spefic cost functio...
#define ASSERTMSG_(f, __ERROR_MSG)
TMoveTree::TListEdges my_list_of_edges
structure for the list of edges
double cost
cost associated to each motion, this should be defined by the user according to a spefic cost functio...
bool treeInitialized
flag for checking if the tree is correctly initialized