Public Member Functions | Static Public Member Functions | Private Attributes | Static Private Attributes | List of all members
tuw_graph::Segment Class Reference

#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
 

Detailed Description

Definition at line 37 of file segment.h.

Constructor & Destructor Documentation

tuw_graph::Segment::Segment ( const std::vector< Eigen::Vector2d > &  _path,
const float  _min_space 
)

constructor

Parameters
_patha list of points which describes the real shape of the path
_min_spacethe 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

Parameters
_idthe id of the segment
_patha list of points which describes the real shape of the path
_min_spacethe space a robot has at minimum on its space

Definition at line 98 of file segment.cpp.

Member Function Documentation

void tuw_graph::Segment::addPredecessor ( const uint32_t  _predecessor)

adds a predecessor to the object

Parameters
_predecessorthe 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

Parameters
_successorthe 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

Parameters
_idthe 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

Parameters
_predecessorthe id the fctn is lookiing for
Returns
if the segment contains a predecessor

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

Parameters
_successorthe id the fctn is looking for
Returns
if the segment contains this successor

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)

Parameters
_idthe 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

Returns
const ref to endpoint

Definition at line 138 of file segment.cpp.

uint32_t tuw_graph::Segment::getId ( ) const

returns the id

Returns
the id

Definition at line 128 of file segment.cpp.

int tuw_graph::Segment::getLength ( ) const

returns the length of the path

Returns
the path length

Definition at line 213 of file segment.cpp.

float tuw_graph::Segment::getMinPathSpace ( ) const

returns the minimum space in a segment

Returns
the minimum space on this 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

Returns
a reference to opt end

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

Returns
a reference to opt start

Definition at line 218 of file segment.cpp.

std::vector< Eigen::Vector2d > tuw_graph::Segment::getPath ( ) const

returns the path

Returns
a list of points which represents the real 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

Returns
a const reference to the predecessor vector

Definition at line 148 of file segment.cpp.

const Eigen::Vector2d & tuw_graph::Segment::getStart ( ) const

returns const ref to startpoint

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

Returns
a const reference to the successor

Definition at line 153 of file segment.cpp.

void tuw_graph::Segment::resetId ( )
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)

sets endpoint

Parameters
_ptendpoint

Definition at line 118 of file segment.cpp.

void tuw_graph::Segment::setId ( const uint32_t  _id)

set the id

Parameters
_idthe id

Definition at line 133 of file segment.cpp.

void tuw_graph::Segment::setMinPathSpace ( const float  _space)

sets the minimum space of a segment

Parameters
_spacethe 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

Parameters
_patha list of points representing the real path

Definition at line 192 of file segment.cpp.

void tuw_graph::Segment::setStart ( const Eigen::Vector2d &  _pt)

sets the startpoint

Parameters
_ptstartpoint

Definition at line 111 of file segment.cpp.

Member Data Documentation

Eigen::Vector2d tuw_graph::Segment::end_
private

Definition at line 171 of file segment.h.

uint32_t tuw_graph::Segment::id_
private

Definition at line 180 of file segment.h.

float tuw_graph::Segment::length_
private

Definition at line 173 of file segment.h.

float tuw_graph::Segment::min_space_
private

Definition at line 172 of file segment.h.

bool tuw_graph::Segment::optimizedEnd_
private

Definition at line 183 of file segment.h.

bool tuw_graph::Segment::optimizedStart_
private

Definition at line 182 of file segment.h.

std::vector<uint32_t> tuw_graph::Segment::predecessor_
private

Definition at line 176 of file segment.h.

Eigen::Vector2d tuw_graph::Segment::start_
private

Definition at line 171 of file segment.h.

uint32_t tuw_graph::Segment::static_id_ = 0
staticprivate

Definition at line 179 of file segment.h.

std::vector<uint32_t> tuw_graph::Segment::successor_
private

Definition at line 177 of file segment.h.

std::vector<Eigen::Vector2d> tuw_graph::Segment::wayPoints_
private

Definition at line 174 of file segment.h.


The documentation for this class was generated from the following files:


tuw_voronoi_graph
Author(s): Benjamin Binder
autogenerated on Mon Jun 10 2019 15:42:44