|
bitrl & cuberl Documentation
Simulation engine for reinforcement learning agents
|
The RRT class models a Rapidly-Exploring Random Tree see: http://msl.cs.uiuc.edu/~lavalle/papers/Lav98c.pdf The NodeData most frequently will represent the state type modeled. It corresponds to the types of \(x_{rand}\) and \(x_{new}\) from the paper cited above. The EdgeData type corresponds to the type of \(u\) in the paper. It is the input that should subsequently be applied to reach from one state to another and this is what the applications most often will use. More...
#include <rapidly_exploring_random_tree.h>


Public Types | |
| typedef NodeData | vertex_data_t |
| vertex_data_t The type of node data | |
| typedef EdgeData | edge_data_t |
| edge_data_t The type of the edge data | |
| typedef kernel::BoostSerialGraph< vertex_data_t, edge_data_t >::vertex_t | vertex_t |
| vertex_t the vertex type | |
| typedef kernel::BoostSerialGraph< vertex_data_t, edge_data_t >::edge_t | edge_t |
| edge_t The edge type | |
| typedef kernel::BoostSerialGraph< vertex_data_t, edge_data_t >::edge_iterator | edge_iterator |
| edge_iterator Edge iterator | |
| typedef kernel::BoostSerialGraph< vertex_data_t, edge_data_t >::adjacency_iterator | adjacency_iterator |
| adjacency_iterator Adjacency iterator | |
Public Member Functions | |
| RRT () | |
| RRT Default constructor. Creates an empty tree. | |
| vertex_t & | get_vertex (uint_t v) |
| get_vertex Returns the v-th vertex | |
| const vertex_t & | get_vertex (uint_t v) const |
| get_vertex Returns the v-th vertex | |
| vertex_t & | get_vertex (adjacency_iterator itr) |
| Access the vertex given the vertex descriptor This is needed when accessing the vertices using the adjacency_iterator. | |
| const vertex_t & | get_vertex (adjacency_iterator itr) const |
| Access the vertex given the vertex descriptor This is needed when accessing the vertices using the adjacency_iterator. | |
| std::pair< adjacency_iterator, adjacency_iterator > | get_vertex_neighbors (uint_t id) const |
| Returns the neighboring vertices for the given vertex id. | |
| std::pair< adjacency_iterator, adjacency_iterator > | get_vertex_neighbors (const vertex_t &v) const |
| Returns the neighboring vertices for the given vertex id. | |
| vertex_t & | add_vertex (const vertex_t &node) |
| add_vertex Add a new vertex to the tree | |
| vertex_t & | add_vertex (const vertex_data_t &data) |
| Add a new vertex in the tree that has the given data. | |
| edge_t & | get_edge (uint_t v1, uint_t v2) |
| get_edge Returns the edge between the vertices v1 and v2 | |
| const edge_t & | get_edge (uint_t v1, uint_t v2) const |
| get_edge Returns the edge between the vertices v1 and v2 | |
| std::pair< edge_iterator, edge_iterator > | edges () const |
| edges Access the edges of the tree | |
| edge_t & | add_edge (uint_t v1, uint_t v2) |
| add_edge Add a new edge between the vertices v1 and v2 | |
| template<typename MetricTp > | |
| const vertex_t & | find_nearest_neighbor (const vertex_t &other, const MetricTp &metric) const |
| find_nearest_neighbor find the nearest neighbor of other node in this tree | |
| template<typename MetricTp > | |
| const vertex_t & | find_nearest_neighbor (const vertex_data_t &other, const MetricTp &metric) const |
| find_nearest_neighbor find the nearest neighbor of other node in this tree | |
| void | clear () |
| clear Clear the underlying tree | |
| uint_t | n_vertices () const |
| n_vertices. Returns the number of vertices of the tree | |
| uint_t | n_edges () const |
| n_edges. Returns the number of edges of the tree | |
| void | set_show_iterations_flag (bool val) |
| set_show_iterations_flag Set the show_iterations_ flag | |
| template<typename StateSelector , typename MetricTp , typename DynamicsTp > | |
| void | build (uint_t nitrs, const vertex_t &xinit, const StateSelector &state_selector, const MetricTp &metric, DynamicsTp &dynamics) |
| Build the tree. | |
| template<typename StateSelector , typename MetricTp , typename DynamicsTp > | |
| std::tuple< bool, uint_t, uint_t > | build (uint_t nitrs, const vertex_t &xinit, const vertex_t &goal, const StateSelector &state_selector, const MetricTp &metric, DynamicsTp &dynamics, real_t goal_radius) |
| Build the tree by using the given goal. The tree expands as long as the specified number of nodes has not been reached or the goal is not found yet. The algorithm terminates when either the number of nodes specified is built or the goal is found. | |
The RRT class models a Rapidly-Exploring Random Tree see: http://msl.cs.uiuc.edu/~lavalle/papers/Lav98c.pdf The NodeData most frequently will represent the state type modeled. It corresponds to the types of \(x_{rand}\) and \(x_{new}\) from the paper cited above. The EdgeData type corresponds to the type of \(u\) in the paper. It is the input that should subsequently be applied to reach from one state to another and this is what the applications most often will use.
| typedef kernel::BoostSerialGraph<vertex_data_t,edge_data_t>::adjacency_iterator cengine::search::RRT< NodeData, EdgeData >::adjacency_iterator |
adjacency_iterator Adjacency iterator
| typedef EdgeData cengine::search::RRT< NodeData, EdgeData >::edge_data_t |
edge_data_t The type of the edge data
| typedef kernel::BoostSerialGraph<vertex_data_t,edge_data_t>::edge_iterator cengine::search::RRT< NodeData, EdgeData >::edge_iterator |
edge_iterator Edge iterator
| typedef kernel::BoostSerialGraph<vertex_data_t,edge_data_t>::edge_t cengine::search::RRT< NodeData, EdgeData >::edge_t |
edge_t The edge type
| typedef NodeData cengine::search::RRT< NodeData, EdgeData >::vertex_data_t |
vertex_data_t The type of node data
| typedef kernel::BoostSerialGraph<vertex_data_t,edge_data_t>::vertex_t cengine::search::RRT< NodeData, EdgeData >::vertex_t |
vertex_t the vertex type
| cengine::search::RRT< NodeData, EdgeData >::RRT | ( | ) |
RRT Default constructor. Creates an empty tree.
|
inline |
add_edge Add a new edge between the vertices v1 and v2
| v1 | Vertex 1 |
| v2 | Vertex 2 |
| RRT< NodeData, EdgeData >::vertex_t & cengine::search::RRT< NodeData, EdgeData >::add_vertex | ( | const vertex_data_t & | data | ) |
Add a new vertex in the tree that has the given data.
|
inline |
add_vertex Add a new vertex to the tree
| node | The new vertex to add |
| void cengine::search::RRT< NodeTp, EdgeTp >::build | ( | uint_t | nitrs, |
| const vertex_t & | xinit, | ||
| const StateSelector & | state_selector, | ||
| const MetricTp & | metric, | ||
| DynamicsTp & | dynamics | ||
| ) |
Build the tree.
| std::tuple< bool, uint_t, uint_t > cengine::search::RRT< NodeData, EdgeData >::build | ( | uint_t | nitrs, |
| const vertex_t & | xinit, | ||
| const vertex_t & | goal, | ||
| const StateSelector & | state_selector, | ||
| const MetricTp & | metric, | ||
| DynamicsTp & | dynamics, | ||
| real_t | goal_radius | ||
| ) |
Build the tree by using the given goal. The tree expands as long as the specified number of nodes has not been reached or the goal is not found yet. The algorithm terminates when either the number of nodes specified is built or the goal is found.
|
inline |
clear Clear the underlying tree
|
inline |
edges Access the edges of the tree
| const RRT< NodeData, EdgeData >::vertex_t & cengine::search::RRT< NodeData, EdgeData >::find_nearest_neighbor | ( | const vertex_data_t & | other, |
| const MetricTp & | metric | ||
| ) | const |
find_nearest_neighbor find the nearest neighbor of other node in this tree
| other | The node for which to find the nearest neighbor |
| const RRT< NodeData, EdgeData >::vertex_t & cengine::search::RRT< NodeData, EdgeData >::find_nearest_neighbor | ( | const vertex_t & | other, |
| const MetricTp & | metric | ||
| ) | const |
find_nearest_neighbor find the nearest neighbor of other node in this tree
| other | The node for which to find the nearest neighbor |
|
inline |
get_edge Returns the edge between the vertices v1 and v2
| v1 | Vertex 1 |
| v2 | Vertex 2 |
|
inline |
get_edge Returns the edge between the vertices v1 and v2
| v1 | Vertex 1 |
| v2 | Vertex 2 |
|
inline |
Access the vertex given the vertex descriptor This is needed when accessing the vertices using the adjacency_iterator.
|
inline |
Access the vertex given the vertex descriptor This is needed when accessing the vertices using the adjacency_iterator.
|
inline |
get_vertex Returns the v-th vertex
|
inline |
get_vertex Returns the v-th vertex
|
inline |
Returns the neighboring vertices for the given vertex id.
|
inline |
Returns the neighboring vertices for the given vertex id.
|
inline |
n_edges. Returns the number of edges of the tree
|
inline |
n_vertices. Returns the number of vertices of the tree
|
inline |
set_show_iterations_flag Set the show_iterations_ flag