#include <segment.h>
Public Member Functions | |
void | addPredecessor (const uint32_t _predecessor) |
adds a predecessor to the object More... | |
void | addSuccessor (const uint32_t _successor) |
adds a successor to the object More... | |
void | cleanNeighbors (uint32_t _id) |
removing all predecessors or successors with id More... | |
bool | containsPredecessor (const uint32_t _predecessor) |
checks if the segment has a predecessor with id _predecessor More... | |
bool | containsSuccessor (const uint32_t _successor) |
checks if the segment has a predecessor with id _successor More... | |
void | decreaseNeighborIdAbove (uint32_t _id) |
decreases the id and all neighbor ids above or equal _id by one (needed to safely remove entities) More... | |
const Eigen::Vector2d & | getEnd () const |
returns const ref to endpoint More... | |
uint32_t | getId () const |
returns the id More... | |
int | getLength () const |
returns the length of the path More... | |
float | getMinPathSpace () const |
returns the minimum space in a segment More... | |
bool & | getOptEnd () |
returns a reference to opt end used to save if a segment was allready optimized More... | |
bool & | getOptStart () |
returns a reference to opt start used to save if a segment was allready optimized More... | |
std::vector< Eigen::Vector2d > | getPath () const |
returns the path More... | |
const std::vector< uint32_t > & | getPredecessors () const |
returns a const reference to the predecessors More... | |
const Eigen::Vector2d & | getStart () const |
returns const ref to startpoint More... | |
const std::vector< uint32_t > & | getSuccessors () const |
returns a const reference to the successor More... | |
Segment (const std::vector< Eigen::Vector2d > &_path, const float _min_space) | |
constructor More... | |
Segment (const uint32_t _id, const std::vector< Eigen::Vector2d > &_points, const float _min_space) | |
constructor More... | |
void | setEnd (const Eigen::Vector2d &_pt) |
sets endpoint More... | |
void | setId (const uint32_t _id) |
set the id More... | |
void | setMinPathSpace (const float _space) |
sets the minimum space of a segment More... | |
void | setPath (const std::vector< Eigen::Vector2d > &_path) |
sets a new path of the robot More... | |
void | setStart (const Eigen::Vector2d &_pt) |
sets the startpoint More... | |
Static Public Member Functions | |
static void | resetId () |
resets the id counter (which is used to generate uinique ids) More... | |
Private Attributes | |
Eigen::Vector2d | end_ |
uint32_t | id_ |
float | length_ |
float | min_space_ |
bool | optimizedEnd_ |
bool | optimizedStart_ |
std::vector< uint32_t > | predecessor_ |
Eigen::Vector2d | start_ |
std::vector< uint32_t > | successor_ |
std::vector< Eigen::Vector2d > | wayPoints_ |
Static Private Attributes | |
static uint32_t | static_id_ = 0 |
tuw_graph::Segment::Segment | ( | const std::vector< Eigen::Vector2d > & | _path, |
const float | _min_space | ||
) |
constructor
_path | a list of points which describes the real shape of the path |
_min_space | the space a robot has at minimum on its space |
Definition at line 85 of file segment.cpp.
tuw_graph::Segment::Segment | ( | const uint32_t | _id, |
const std::vector< Eigen::Vector2d > & | _points, | ||
const float | _min_space | ||
) |
constructor
_id | the id of the segment |
_path | a list of points which describes the real shape of the path |
_min_space | the space a robot has at minimum on its space |
Definition at line 98 of file segment.cpp.
void tuw_graph::Segment::addPredecessor | ( | const uint32_t | _predecessor | ) |
adds a predecessor to the object
_predecessor | the id of the predecessor |
Definition at line 77 of file segment.cpp.
void tuw_graph::Segment::addSuccessor | ( | const uint32_t | _successor | ) |
adds a successor to the object
_successor | the id of the successor |
Definition at line 81 of file segment.cpp.
void tuw_graph::Segment::cleanNeighbors | ( | uint32_t | _id | ) |
removing all predecessors or successors with id
_id | the id to remove |
Definition at line 36 of file segment.cpp.
bool tuw_graph::Segment::containsPredecessor | ( | const uint32_t | _predecessor | ) |
checks if the segment has a predecessor with id _predecessor
_predecessor | the id the fctn is lookiing for |
Definition at line 158 of file segment.cpp.
bool tuw_graph::Segment::containsSuccessor | ( | const uint32_t | _successor | ) |
checks if the segment has a predecessor with id _successor
_successor | the id the fctn is looking for |
Definition at line 170 of file segment.cpp.
void tuw_graph::Segment::decreaseNeighborIdAbove | ( | uint32_t | _id | ) |
decreases the id and all neighbor ids above or equal _id by one (needed to safely remove entities)
_id | the minimum id to decrease the id by one |
Definition at line 55 of file segment.cpp.
const Eigen::Vector2d & tuw_graph::Segment::getEnd | ( | ) | const |
returns const ref to endpoint
Definition at line 138 of file segment.cpp.
uint32_t tuw_graph::Segment::getId | ( | ) | const |
int tuw_graph::Segment::getLength | ( | ) | const |
float tuw_graph::Segment::getMinPathSpace | ( | ) | const |
returns the minimum space in a segment
Definition at line 203 of file segment.cpp.
bool & tuw_graph::Segment::getOptEnd | ( | ) |
returns a reference to opt end used to save if a segment was allready optimized
Definition at line 223 of file segment.cpp.
bool & tuw_graph::Segment::getOptStart | ( | ) |
returns a reference to opt start used to save if a segment was allready optimized
Definition at line 218 of file segment.cpp.
std::vector< Eigen::Vector2d > tuw_graph::Segment::getPath | ( | ) | const |
returns the path
Definition at line 187 of file segment.cpp.
const std::vector< uint32_t > & tuw_graph::Segment::getPredecessors | ( | ) | const |
returns a const reference to the predecessors
Definition at line 148 of file segment.cpp.
const Eigen::Vector2d & tuw_graph::Segment::getStart | ( | ) | const |
returns const ref to startpoint
Definition at line 143 of file segment.cpp.
const std::vector< uint32_t > & tuw_graph::Segment::getSuccessors | ( | ) | const |
returns a const reference to the successor
Definition at line 153 of file segment.cpp.
|
static |
resets the id counter (which is used to generate uinique ids)
Definition at line 182 of file segment.cpp.
void tuw_graph::Segment::setEnd | ( | const Eigen::Vector2d & | _pt | ) |
void tuw_graph::Segment::setId | ( | const uint32_t | _id | ) |
void tuw_graph::Segment::setMinPathSpace | ( | const float | _space | ) |
sets the minimum space of a segment
_space | the minimum space on this segemtn |
Definition at line 208 of file segment.cpp.
void tuw_graph::Segment::setPath | ( | const std::vector< Eigen::Vector2d > & | _path | ) |
sets a new path of the robot
_path | a list of points representing the real path |
Definition at line 192 of file segment.cpp.
void tuw_graph::Segment::setStart | ( | const Eigen::Vector2d & | _pt | ) |
|
private |
|
private |
|
private |