|
hpp-core
6.0.0
Implement basic classes for canonical path planning for kinematic chains.
|
#include <hpp/core/roadmap.hh>
Public Member Functions | |
| virtual void | clear () |
| Clear the roadmap by deleting nodes and edges. More... | |
| NodePtr_t | addNode (ConfigurationIn_t config) |
| NodePtr_t | nearestNode (ConfigurationIn_t configuration, value_type &minDistance, bool reverse=false) |
| NodePtr_t | nearestNode (ConfigurationIn_t configuration, const ConnectedComponentPtr_t &connectedComponent, value_type &minDistance, bool reverse=false) |
| Nodes_t | nearestNodes (ConfigurationIn_t configuration, size_type k) |
| Nodes_t | nearestNodes (ConfigurationIn_t configuration, const ConnectedComponentPtr_t &connectedComponent, size_type k) |
| NodeVector_t | nodesWithinBall (ConfigurationIn_t configuration, const ConnectedComponentPtr_t &connectedComponent, value_type maxDistance) |
| NodePtr_t | addNodeAndEdges (const NodePtr_t from, ConfigurationIn_t to, const PathPtr_t path) |
| NodePtr_t | addNodeAndEdge (const NodePtr_t from, ConfigurationIn_t to, const PathPtr_t path) |
| NodePtr_t | addNodeAndEdge (ConfigurationIn_t from, const NodePtr_t to, const PathPtr_t path) |
| EdgePtr_t | addEdge (const NodePtr_t &n1, const NodePtr_t &n2, const PathPtr_t &path) |
| Add an edge between two nodes. More... | |
| void | addEdges (const NodePtr_t from, const NodePtr_t &to, const PathPtr_t &path) |
| void | merge (const RoadmapPtr_t &other) |
| Add the nodes and edges of a roadmap into this one. More... | |
| void | insertPathVector (const PathVectorPtr_t &path, bool backAndForth) |
| NodePtr_t | addGoalNode (ConfigurationIn_t config) |
| void | resetGoalNodes () |
| void | initNode (ConfigurationIn_t config) |
| virtual | ~Roadmap () |
| bool | pathExists () const |
| Check that a path exists between the initial node and one goal node. More... | |
| const Nodes_t & | nodes () const |
| const Edges_t & | edges () const |
| NodePtr_t | initNode () const |
| const NodeVector_t & | goalNodes () const |
| const ConnectedComponents_t & | connectedComponents () const |
| Get list of connected component of the roadmap. More... | |
| NearestNeighborPtr_t | nearestNeighbor () |
| Get nearestNeighbor object. More... | |
| void | nearestNeighbor (NearestNeighborPtr_t nearestNeighbor) |
| Set new NearestNeighbor (roadmap must be empty) More... | |
| std::ostream & | print (std::ostream &os) const |
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. More... | |
Protected Member Functions | |
| Roadmap (const DistancePtr_t &distance, const DevicePtr_t &robot) | |
| Roadmap () | |
| void | addConnectedComponent (const NodePtr_t &node) |
| virtual void | push_node (const NodePtr_t &n) |
| virtual void | impl_addEdge (const EdgePtr_t &e) |
| virtual NodePtr_t | createNode (ConfigurationIn_t configuration) const |
| void | init (RoadmapWkPtr_t weak) |
| Store weak pointer to itself. More... | |
Roadmap built by random path planning methods Nodes are configurations, paths are collision-free paths.
|
virtual |
|
protected |
Constructor
| distance | distance function for nearest neighbor computations |
|
inlineprotected |
|
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::addEdges | ( | const NodePtr_t | from, |
| const NodePtr_t & | to, | ||
| const PathPtr_t & | path | ||
| ) |
Add two edges between two nodes
| from | first node |
| to | second node |
| path | path going from from to to. the reverse edge is added with the reverse path. |
| NodePtr_t hpp::core::Roadmap::addGoalNode | ( | ConfigurationIn_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 | ( | ConfigurationIn_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::addNodeAndEdge | ( | ConfigurationIn_t | from, |
| const NodePtr_t | to, | ||
| const PathPtr_t | path | ||
| ) |
Add a node and one edge
| from | configuration from which the edge starts, |
| to | node to which the edge stops |
| path | path between both configurations |
from. Add the oriented edge (from -> to) to. | NodePtr_t hpp::core::Roadmap::addNodeAndEdge | ( | const NodePtr_t | from, |
| ConfigurationIn_t | to, | ||
| const PathPtr_t | path | ||
| ) |
Add a node and one edge
| from | node from which the edge starts, |
| to | configuration to which the edge stops |
| path | path between both configurations |
to. Add the oriented edge (from -> to) from. | NodePtr_t hpp::core::Roadmap::addNodeAndEdges | ( | const NodePtr_t | from, |
| ConfigurationIn_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.
|
virtual |
Clear the roadmap by deleting nodes and edges.
| const ConnectedComponents_t& hpp::core::Roadmap::connectedComponents | ( | ) | const |
Get list of connected component of the roadmap.
|
static |
Return shared pointer to new instance.
|
protectedvirtual |
| const DistancePtr_t& hpp::core::Roadmap::distance | ( | ) | const |
|
inline |
|
inline |
|
protectedvirtual |
Give child class the opportunity to get the event "An edge has been added to the roadmap"
|
protected |
Store weak pointer to itself.
|
inline |
|
inline |
| void hpp::core::Roadmap::insertPathVector | ( | const PathVectorPtr_t & | path, |
| bool | backAndForth | ||
| ) |
Add a PathVector instance in the roadmap Waypoints are inserted as nodes, each elementary path is inserted as an edge
| backAndForth | whether to insert the reverse path as well. |
| void hpp::core::Roadmap::merge | ( | const RoadmapPtr_t & | other | ) |
Add the nodes and edges of a roadmap into this one.
| NearestNeighborPtr_t hpp::core::Roadmap::nearestNeighbor | ( | ) |
Get nearestNeighbor object.
| void hpp::core::Roadmap::nearestNeighbor | ( | NearestNeighborPtr_t | nearestNeighbor | ) |
Set new NearestNeighbor (roadmap must be empty)
| NodePtr_t hpp::core::Roadmap::nearestNode | ( | ConfigurationIn_t | configuration, |
| const ConnectedComponentPtr_t & | connectedComponent, | ||
| value_type & | minDistance, | ||
| bool | reverse = false |
||
| ) |
Get nearest node to a configuration in a connected component.
| configuration | configuration |
| connectedComponent | the connected component |
| reverse | if true, compute distance from given configuration to nodes in roadmap, if false from nodes in roadmap to given configuration |
| distance | to the nearest node. |
| NodePtr_t hpp::core::Roadmap::nearestNode | ( | ConfigurationIn_t | configuration, |
| value_type & | minDistance, | ||
| bool | reverse = false |
||
| ) |
Get nearest node to a configuration in the roadmap.
| configuration | configuration |
| reverse | if true, compute distance from given configuration to nodes in roadmap, if false from nodes in roadmap to given configuration |
| distance | to the nearest node. |
| Nodes_t hpp::core::Roadmap::nearestNodes | ( | ConfigurationIn_t | configuration, |
| const ConnectedComponentPtr_t & | connectedComponent, | ||
| size_type | k | ||
| ) |
Get nearest node to a configuration in a connected component.
| configuration | configuration |
| connectedComponent | the connected component |
| k | number of nearest nodes to return if false from nodes in roadmap to given configuration |
| Nodes_t hpp::core::Roadmap::nearestNodes | ( | ConfigurationIn_t | configuration, |
| size_type | k | ||
| ) |
Get nearest node to a configuration in the roadmap.
| configuration | configuration |
| k | number of nearest nodes to return if false from nodes in roadmap to given configuration |
|
inline |
| NodeVector_t hpp::core::Roadmap::nodesWithinBall | ( | ConfigurationIn_t | configuration, |
| const ConnectedComponentPtr_t & | connectedComponent, | ||
| value_type | maxDistance | ||
| ) |
Neighbor search.
maxDistance to configuration within connectedComponent. | 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
|
inlineprotectedvirtual |
Give child class the opportunity to get the event "A node has been added to the roadmap"
|
inline |