#include <PoseGraph.hpp>
◆ Header
◆ PoseGraphPtr
◆ PoseGraph() [1/2]
navigation_common::PoseGraph::PoseGraph |
( |
| ) |
|
|
default |
◆ PoseGraph() [2/2]
Constructor.
- Parameters
-
poseGraphMsg | ros pose graph message. |
◆ ~PoseGraph()
navigation_common::PoseGraph::~PoseGraph |
( |
| ) |
|
|
default |
◆ addEdge()
void navigation_common::PoseGraph::addEdge |
( |
const EdgePtr & |
edge | ) |
|
Adds an edge to the pose graph.
- Parameters
-
edge | edge to add to pose graph. |
◆ addNode()
void navigation_common::PoseGraph::addNode |
( |
const NodePtr & |
node | ) |
|
Adds a node to the pose graph.
- Parameters
-
node | node to add to pose graph. |
◆ addYawToZ()
void navigation_common::PoseGraph::addYawToZ |
( |
double |
zScale, |
|
|
double |
yawScale |
|
) |
| |
Add the yaw angle to z coordinate for visual debugging purposes. z := zScale*z + yawScale*yaw
- Parameters
-
zScale | scaling of z. |
yawScale | scaling of yaw. |
◆ clear()
void navigation_common::PoseGraph::clear |
( |
| ) |
|
◆ discretizeYaw()
void navigation_common::PoseGraph::discretizeYaw |
( |
unsigned int |
steps, |
|
|
const LocomotionController & |
yawingLocomotionController |
|
) |
| |
Discretize the yaw angle of the pose graph:
- Where the orientation is important, it is projected to the xy-plane.
- Where the orientation is ignored, new nodes with different orientations in the xy-plane are introduced.
- Parameters
-
steps | (preferably even) number of discretization steps. |
turningLocomotionController | locomotion controller which is used for yawing. |
◆ fillDefaultController()
void navigation_common::PoseGraph::fillDefaultController |
( |
const LocomotionController & |
defaultLocomotionController | ) |
|
Fill default controller.
- Parameters
-
defaultLocomotionController | Default locomotion controller |
◆ findNearestNode()
template<enum DimensionType Dim>
NodePtr navigation_common::PoseGraph::findNearestNode |
( |
const PoseStamped & |
poseStamped, |
|
|
double |
maxDistance = std::numeric_limits<double>::infinity() |
|
) |
| const |
|
inline |
Finds the nearest node in the pose graph in the given dimension.
- Parameters
-
[in] | poseStamped | stamped pose to search for. |
[in] | maxDistance | max distance for the nearest node. |
- Returns
- node on the pose graph. empty pointer if not within max distance.
◆ findNode()
template<enum DimensionType Dim>
Finds a node in the pose graph.
- Parameters
-
[in] | poseStamped | stamped pose of the node. |
- Returns
- node on the pose graph. empty pointer if not found.
◆ fromFile()
bool navigation_common::PoseGraph::fromFile |
( |
const std::string & |
absolutePath | ) |
|
Loads the pose graph from a file.
- Parameters
-
absolutePath | absolute path to pose graph file. |
- Returns
- true if successful.
◆ fromRos()
Imports a ros pose graph message.
- Parameters
-
poseGraphMsg | ros pose graph message. |
◆ getDeepCopy()
PoseGraphPtr navigation_common::PoseGraph::getDeepCopy |
( |
| ) |
const |
Create a deep copy of this pose graph.
- Returns
- new pose graph.
◆ getEdges()
const std::vector<EdgePtr>& navigation_common::PoseGraph::getEdges |
( |
| ) |
const |
Gets all edges of the pose graph.
- Returns
- all edges.
◆ getNode()
Gets a node in the pose graph.
- Parameters
-
[in] | poseStamped | pointer to the stamped pose of the node. |
- Returns
- node on the pose graph. empty pointer if not found.
◆ getNodes()
const std::vector<NodePtr>& navigation_common::PoseGraph::getNodes |
( |
| ) |
const |
Gets all nodes of the pose graph.
- Returns
- all nodes.
◆ getNumberOfEdges()
unsigned int navigation_common::PoseGraph::getNumberOfEdges |
( |
| ) |
const |
Gets the number of edges in the pose graph.
- Returns
- number of edges in the pose graph.
◆ getNumberOfNodes()
unsigned int navigation_common::PoseGraph::getNumberOfNodes |
( |
| ) |
const |
Gets the number of nodes in the pose graph.
- Returns
- number of nodes in the pose graph.
◆ removeEdge()
void navigation_common::PoseGraph::removeEdge |
( |
const EdgePtr |
edge | ) |
|
Removes an edge in the pose graph.
- Parameters
-
◆ removeNode()
void navigation_common::PoseGraph::removeNode |
( |
const NodePtr & |
node | ) |
|
Removes a node in the pose graph.
- Parameters
-
◆ removeNodesWithinArea()
void navigation_common::PoseGraph::removeNodesWithinArea |
( |
const double |
lowX, |
|
|
const double |
highX, |
|
|
const double |
lowY, |
|
|
const double |
highY, |
|
|
const double |
lowZ = std::numeric_limits< double >::min() , |
|
|
const double |
highZ = std::numeric_limits< double >::max() |
|
) |
| |
Removes all nodes that are within the specified rectangular area.
- Parameters
-
[in] | lowX | lower bound of rectangle in x-direction. |
[in] | highX | upper bound of rectangle in x-direction. |
[in] | lowY | lower bound of rectangle in y-direction. |
[in] | highY | upper bound of rectangle in y-direction. |
◆ removeUnconnectedNodes()
void navigation_common::PoseGraph::removeUnconnectedNodes |
( |
| ) |
|
Removes all nodes that are not connected to another node.
◆ removeUntraversableEdges()
void navigation_common::PoseGraph::removeUntraversableEdges |
( |
| ) |
|
Removes all edges that are not traversable (zero traversability).
◆ splitLongEdges()
void navigation_common::PoseGraph::splitLongEdges |
( |
double |
maxEdgeLength | ) |
|
Splits long edges by inserting new nodes.
- Parameters
-
maxEdgeLength | maximal length of the edges. |
◆ toFile()
bool navigation_common::PoseGraph::toFile |
( |
const std::string & |
absolutePath | ) |
const |
Saves the pose graph to a file.
- Parameters
-
absolutePath | absolute path to pose graph file. |
- Returns
- true if successful.
◆ toRos()
Exports a ros pose graph message.
- Returns
- ros pose graph message.
◆ edges_
std::vector<EdgePtr> navigation_common::PoseGraph::edges_ |
◆ header_
Header navigation_common::PoseGraph::header_ |
◆ nodes_
std::vector<NodePtr> navigation_common::PoseGraph::nodes_ |
The documentation for this class was generated from the following file: