Edge defining the cost function for keeping a distance from dynamic (moving) obstacles. More...
#include <edge_dynamic_obstacle.h>
Public Member Functions | |
void | computeError () |
Actual cost function. | |
EdgeDynamicObstacle () | |
Construct edge. | |
EdgeDynamicObstacle (size_t vert_idx) | |
Construct edge and specify the vertex id (neccessary for computeError). | |
ErrorVector & | getError () |
Compute and return error / cost value. | |
virtual bool | read (std::istream &is) |
Read values from input stream. | |
void | setObstacle (const Obstacle *obstacle) |
Set Obstacle for the underlying cost function. | |
void | setTebConfig (const TebConfig &cfg) |
Assign the TebConfig class for parameters. | |
void | setVertexIdx (size_t vert_idx) |
Set the vertex index (position in the pose sequence) | |
virtual bool | write (std::ostream &os) const |
Write values to an output stream. | |
virtual | ~EdgeDynamicObstacle () |
Destruct edge. | |
Protected Attributes | |
const TebConfig * | cfg_ |
Store TebConfig class for parameters. | |
size_t | vert_idx_ |
Store vertex index (position in the pose sequence) |
Edge defining the cost function for keeping a distance from dynamic (moving) obstacles.
The edge depends on two vertices and minimizes:
.
dist2obstacle denotes the minimum distance to the obstacle trajectory (spatial and temporal).
weight can be set using setInformation().
penaltyBelow denotes the penalty function, see penaltyBoundFromBelow().
Definition at line 71 of file edge_dynamic_obstacle.h.
Construct edge.
Definition at line 78 of file edge_dynamic_obstacle.h.
teb_local_planner::EdgeDynamicObstacle::EdgeDynamicObstacle | ( | size_t | vert_idx | ) | [inline] |
Construct edge and specify the vertex id (neccessary for computeError).
vert_idx | Index of the vertex (position in the pose sequence) |
Definition at line 87 of file edge_dynamic_obstacle.h.
virtual teb_local_planner::EdgeDynamicObstacle::~EdgeDynamicObstacle | ( | ) | [inline, virtual] |
Destruct edge.
We need to erase vertices manually, since we want to keep them even if TebOptimalPlanner::clearGraph() is called. This is necessary since the vertices are managed by the Timed_Elastic_Band class.
Definition at line 98 of file edge_dynamic_obstacle.h.
void teb_local_planner::EdgeDynamicObstacle::computeError | ( | ) | [inline] |
Actual cost function.
Definition at line 107 of file edge_dynamic_obstacle.h.
ErrorVector& teb_local_planner::EdgeDynamicObstacle::getError | ( | ) | [inline] |
Compute and return error / cost value.
This method is called by TebOptimalPlanner::computeCurrentCost to obtain the current cost.
Definition at line 141 of file edge_dynamic_obstacle.h.
virtual bool teb_local_planner::EdgeDynamicObstacle::read | ( | std::istream & | is | ) | [inline, virtual] |
Read values from input stream.
Definition at line 150 of file edge_dynamic_obstacle.h.
void teb_local_planner::EdgeDynamicObstacle::setObstacle | ( | const Obstacle * | obstacle | ) | [inline] |
Set Obstacle for the underlying cost function.
Definition at line 178 of file edge_dynamic_obstacle.h.
void teb_local_planner::EdgeDynamicObstacle::setTebConfig | ( | const TebConfig & | cfg | ) | [inline] |
Assign the TebConfig class for parameters.
cfg | TebConfig class |
Definition at line 187 of file edge_dynamic_obstacle.h.
void teb_local_planner::EdgeDynamicObstacle::setVertexIdx | ( | size_t | vert_idx | ) | [inline] |
Set the vertex index (position in the pose sequence)
vert_idx | Index of the vertex |
Definition at line 169 of file edge_dynamic_obstacle.h.
virtual bool teb_local_planner::EdgeDynamicObstacle::write | ( | std::ostream & | os | ) | const [inline, virtual] |
Write values to an output stream.
Definition at line 159 of file edge_dynamic_obstacle.h.
const TebConfig* teb_local_planner::EdgeDynamicObstacle::cfg_ [protected] |
Store TebConfig class for parameters.
Definition at line 194 of file edge_dynamic_obstacle.h.
size_t teb_local_planner::EdgeDynamicObstacle::vert_idx_ [protected] |
Store vertex index (position in the pose sequence)
Definition at line 195 of file edge_dynamic_obstacle.h.