Node.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <memory>
4
#include <vector>
5
6
#include <Eigen/Geometry>
7
8
#include <VirtualRobot/VirtualRobot.h>
9
10
namespace
armarx::navigation::algorithm::astar
11
{
12
class
Node;
13
using
NodePtr
= std::shared_ptr<Node>;
14
15
/**
16
* A Node can store data to all valid neighbors (successors) and a precessor.
17
* It offers methods to determine the complete path to the starting point.
18
*/
19
class
Node
20
{
21
public
:
22
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
23
24
Node
(
const
Eigen::Vector2f&
position
,
float
obstacleDistance
);
25
26
Eigen::Vector2f
position
;
27
/// All nodes that are adjacent to this one.
28
std::vector<NodePtr>
successors
;
29
/// For traversal.
30
NodePtr
predecessor
;
31
32
float
obstacleDistance
;
33
34
/// Collects all predecessors in order to generate path to starting point.
35
std::vector<Eigen::Vector2f>
traversePredecessors
()
const
;
36
};
37
38
}
// namespace armarx::navigation::algorithm::astar
armarx::navigation::algorithm::astar::Node::Node
EIGEN_MAKE_ALIGNED_OPERATOR_NEW Node(const Eigen::Vector2f &position, float obstacleDistance)
Definition:
Node.cpp:6
armarx::navigation::algorithm::astar::Node
A Node can store data to all valid neighbors (successors) and a precessor.
Definition:
Node.h:19
armarx::navigation::algorithm::astar::Node::successors
std::vector< NodePtr > successors
All nodes that are adjacent to this one.
Definition:
Node.h:28
armarx::navigation::algorithm::astar::Node::obstacleDistance
float obstacleDistance
Definition:
Node.h:32
armarx::navigation::algorithm::astar::Node::traversePredecessors
std::vector< Eigen::Vector2f > traversePredecessors() const
Collects all predecessors in order to generate path to starting point.
Definition:
Node.cpp:12
armarx::navigation::algorithm::astar::Node::position
Eigen::Vector2f position
Definition:
Node.h:26
armarx::navigation::algorithm::astar::NodePtr
std::shared_ptr< Node > NodePtr
Definition:
Node.h:13
armarx::navigation::algorithm::astar
Definition:
AStarPlanner.cpp:29
armarx::navigation::algorithm::astar::Node::predecessor
NodePtr predecessor
For traversal.
Definition:
Node.h:30
armarx
navigation
algorithms
astar
Node.h
Generated on Sat Oct 12 2024 09:14:15 for armarx_documentation by
1.8.17