Roadmap built by random path planning methods Nodes are configurations, paths are collision-free paths. More...
#include <hpp/core/roadmap.hh>
Public Member Functions | |
virtual void | clear () |
Clear the roadmap by deleting nodes and edges. | |
NodePtr_t | addNode (const ConfigurationPtr_t &config) |
Add a node with given configuration. | |
NodePtr_t | nearestNode (const ConfigurationPtr_t &configuration, value_type &minDistance) |
Get nearest node to a configuration in the roadmap. | |
NodePtr_t | nearestNode (const ConfigurationPtr_t &configuration, const ConnectedComponentPtr_t &connectedComponent, value_type &minDistance) |
Get nearest node to a configuration in a connected component. | |
NodePtr_t | addNodeAndEdges (const NodePtr_t from, const ConfigurationPtr_t &to, const PathPtr_t path) |
Add a node and two edges. | |
void | addGoalNode (const ConfigurationPtr_t &config) |
Add a goal configuration. | |
void | resetGoalNodes () |
void | initNode (const ConfigurationPtr_t &config) |
virtual | ~Roadmap () |
bool | pathExists () const |
Check that a path exists between the initial node and one goal node. | |
const Nodes_t & | nodes () const |
const Edges_t & | edges () const |
NodePtr_t | initNode () const |
const Nodes_t & | goalNodes () const |
const ConnectedComponents_t & | connectedComponents () const |
EdgePtr_t | addEdge (const NodePtr_t &n1, const NodePtr_t &n2, const PathPtr_t &path) |
Add an edge between two nodes. | |
std::ostream & | print (std::ostream &os) const |
Print roadmap in a stream. | |
Distance used for nearest neighbor search | |
Get distance function | |
const DistancePtr_t & | distance () const |
Static Public Member Functions | |
static RoadmapPtr_t | create (const DistancePtr_t &distance, const DevicePtr_t &robot) |
Return shared pointer to new instance. | |
Protected Member Functions | |
Roadmap (const DistancePtr_t &distance, const DevicePtr_t &robot) | |
Constructor. | |
void | addConnectedComponent (const NodePtr_t &node) |
Add a new connected component in the roadmap. | |
bool | canReach (const ConnectedComponentPtr_t &cc) |
Whether nodes of cc can be reached by nodes of this. | |
virtual void | push_node (const NodePtr_t &n) |
Give child class the opportunity to get the event "A node has been added to the roadmap". |
Roadmap built by random path planning methods Nodes are configurations, paths are collision-free paths.
virtual hpp::core::Roadmap::~Roadmap | ( | ) | [virtual] |
hpp::core::Roadmap::Roadmap | ( | const DistancePtr_t & | distance, |
const DevicePtr_t & | robot | ||
) | [protected] |
Constructor.
distance | distance function for nearest neighbor computations |
void hpp::core::Roadmap::addConnectedComponent | ( | const NodePtr_t & | node | ) | [protected] |
Add a new connected component in the roadmap.
node | node pointing to the connected component. |
EdgePtr_t hpp::core::Roadmap::addEdge | ( | const NodePtr_t & | n1, |
const NodePtr_t & | n2, | ||
const PathPtr_t & | path | ||
) |
Add an edge between two nodes.
void hpp::core::Roadmap::addGoalNode | ( | const ConfigurationPtr_t & | config | ) |
Add a goal configuration.
config | configuration If configuration is already in the roadmap, tag corresponding node as goal node. Otherwise create a new node. |
NodePtr_t hpp::core::Roadmap::addNode | ( | const ConfigurationPtr_t & | config | ) |
Add a node with given configuration.
config | configuration |
If configuration is alread in the roadmap, return the node containing the configuration. Otherwise, create a new node and a new connected component with this node.
NodePtr_t hpp::core::Roadmap::addNodeAndEdges | ( | const NodePtr_t | from, |
const ConfigurationPtr_t & | to, | ||
const PathPtr_t | path | ||
) |
Add a node and two edges.
from | node from which the edge starts, |
to | configuration to which the edge stops |
path | path between both configurations |
to
. Add the symmetric edge with reverse path. from
. bool hpp::core::Roadmap::canReach | ( | const ConnectedComponentPtr_t & | cc | ) | [protected] |
Whether nodes of cc can be reached by nodes of this.
cc | a connected component. |
virtual void hpp::core::Roadmap::clear | ( | ) | [virtual] |
Clear the roadmap by deleting nodes and edges.
const ConnectedComponents_t& hpp::core::Roadmap::connectedComponents | ( | ) | const |
static RoadmapPtr_t hpp::core::Roadmap::create | ( | const DistancePtr_t & | distance, |
const DevicePtr_t & | robot | ||
) | [static] |
Return shared pointer to new instance.
const DistancePtr_t& hpp::core::Roadmap::distance | ( | ) | const |
const Edges_t& hpp::core::Roadmap::edges | ( | ) | const [inline] |
const Nodes_t& hpp::core::Roadmap::goalNodes | ( | ) | const [inline] |
void hpp::core::Roadmap::initNode | ( | const ConfigurationPtr_t & | config | ) | [inline] |
NodePtr_t hpp::core::Roadmap::initNode | ( | ) | const [inline] |
NodePtr_t hpp::core::Roadmap::nearestNode | ( | const ConfigurationPtr_t & | configuration, |
value_type & | minDistance | ||
) |
Get nearest node to a configuration in the roadmap.
configuration | configuration |
distance | to the nearest node. |
NodePtr_t hpp::core::Roadmap::nearestNode | ( | const ConfigurationPtr_t & | configuration, |
const ConnectedComponentPtr_t & | connectedComponent, | ||
value_type & | minDistance | ||
) |
Get nearest node to a configuration in a connected component.
configuration | configuration |
connectedComponent | the connected component |
distance | to the nearest node. |
const Nodes_t& hpp::core::Roadmap::nodes | ( | ) | const [inline] |
bool hpp::core::Roadmap::pathExists | ( | ) | const |
Check that a path exists between the initial node and one goal node.
std::ostream& hpp::core::Roadmap::print | ( | std::ostream & | os | ) | const |
Print roadmap in a stream.
virtual void hpp::core::Roadmap::push_node | ( | const NodePtr_t & | n | ) | [inline, protected, virtual] |
Give child class the opportunity to get the event "A node has been added to the roadmap".
void hpp::core::Roadmap::resetGoalNodes | ( | ) | [inline] |