33 #include <eigen3/Eigen/Dense> 45 Segment(
const std::vector<Eigen::Vector2d> &_path,
const float _min_space);
52 Segment(
const uint32_t _id,
const std::vector<Eigen::Vector2d> &_points,
const float _min_space);
68 std::vector<Eigen::Vector2d>
getPath()
const;
73 void setPath(
const std::vector<Eigen::Vector2d> &_path);
110 const Eigen::Vector2d &
getStart()
const;
115 const Eigen::Vector2d &
getEnd()
const;
121 void setStart(
const Eigen::Vector2d &_pt);
126 void setEnd(
const Eigen::Vector2d &_pt);
132 uint32_t
getId()
const;
137 void setId(
const uint32_t _id);
187 #endif // PLANNER_NODE_H std::vector< uint32_t > successor_
void addPredecessor(const uint32_t _predecessor)
adds a predecessor to the object
uint32_t getId() const
returns the id
Segment(const std::vector< Eigen::Vector2d > &_path, const float _min_space)
constructor
static void resetId()
resets the id counter (which is used to generate uinique ids)
void setPath(const std::vector< Eigen::Vector2d > &_path)
sets a new path of the robot
void setEnd(const Eigen::Vector2d &_pt)
sets endpoint
static uint32_t static_id_
float getMinPathSpace() const
returns the minimum space in a segment
const Eigen::Vector2d & getEnd() const
returns const ref to endpoint
bool containsPredecessor(const uint32_t _predecessor)
checks if the segment has a predecessor with id _predecessor
bool containsSuccessor(const uint32_t _successor)
checks if the segment has a predecessor with id _successor
void decreaseNeighborIdAbove(uint32_t _id)
decreases the id and all neighbor ids above or equal _id by one (needed to safely remove entities) ...
bool & getOptEnd()
returns a reference to opt end used to save if a segment was allready optimized
void setMinPathSpace(const float _space)
sets the minimum space of a segment
void cleanNeighbors(uint32_t _id)
removing all predecessors or successors with id
void setId(const uint32_t _id)
set the id
void addSuccessor(const uint32_t _successor)
adds a successor to the object
void setStart(const Eigen::Vector2d &_pt)
sets the startpoint
std::vector< uint32_t > predecessor_
std::vector< Eigen::Vector2d > getPath() const
returns the path
int getLength() const
returns the length of the path
const Eigen::Vector2d & getStart() const
returns const ref to startpoint
const std::vector< uint32_t > & getSuccessors() const
returns a const reference to the successor
std::vector< Eigen::Vector2d > wayPoints_
bool & getOptStart()
returns a reference to opt start used to save if a segment was allready optimized ...
const std::vector< uint32_t > & getPredecessors() const
returns a const reference to the predecessors