Edge defining the cost function for keeping a minimum distance from inflated obstacles. More...
#include <edge_obstacle.h>
Public Member Functions | |
void | computeError () |
Actual cost function. | |
EdgeInflatedObstacle () | |
Construct edge. | |
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 pointer to associated obstacle for the underlying cost function. | |
void | setParameters (const TebConfig &cfg, const BaseRobotFootprintModel *robot_model, const Obstacle *obstacle) |
Set all parameters at once. | |
void | setRobotModel (const BaseRobotFootprintModel *robot_model) |
Set pointer to the robot model. | |
void | setTebConfig (const TebConfig &cfg) |
Assign the TebConfig class for parameters. | |
virtual bool | write (std::ostream &os) const |
Write values to an output stream. | |
virtual | ~EdgeInflatedObstacle () |
Destruct edge. | |
Protected Attributes | |
const TebConfig * | cfg_ |
Store TebConfig class for parameters. | |
const BaseRobotFootprintModel * | robot_model_ |
Store pointer to robot_model. |
Edge defining the cost function for keeping a minimum distance from inflated obstacles.
The edge depends on a single vertex and minimizes:
.
Additional, a second penalty is provided with
. It is assumed that inflation_dist > min_obstacle_dist and weight_inflation << weight_inflation. dist2point denotes the minimum distance to the point obstacle.
penaltyBelow denotes the penalty function, see penaltyBoundFromBelow()
Definition at line 251 of file edge_obstacle.h.
Construct edge.
Definition at line 258 of file edge_obstacle.h.
virtual teb_local_planner::EdgeInflatedObstacle::~EdgeInflatedObstacle | ( | ) | [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 270 of file edge_obstacle.h.
void teb_local_planner::EdgeInflatedObstacle::computeError | ( | ) | [inline] |
Actual cost function.
Definition at line 279 of file edge_obstacle.h.
ErrorVector& teb_local_planner::EdgeInflatedObstacle::getError | ( | ) | [inline] |
Compute and return error / cost value.
This method is called by TebOptimalPlanner::computeCurrentCost to obtain the current cost.
Definition at line 299 of file edge_obstacle.h.
virtual bool teb_local_planner::EdgeInflatedObstacle::read | ( | std::istream & | is | ) | [inline, virtual] |
Read values from input stream.
Definition at line 308 of file edge_obstacle.h.
void teb_local_planner::EdgeInflatedObstacle::setObstacle | ( | const Obstacle * | obstacle | ) | [inline] |
Set pointer to associated obstacle for the underlying cost function.
obstacle | 2D position vector containing the position of the obstacle |
Definition at line 327 of file edge_obstacle.h.
void teb_local_planner::EdgeInflatedObstacle::setParameters | ( | const TebConfig & | cfg, |
const BaseRobotFootprintModel * | robot_model, | ||
const Obstacle * | obstacle | ||
) | [inline] |
Set all parameters at once.
cfg | TebConfig class |
robot_model | Robot model required for distance calculation |
obstacle | 2D position vector containing the position of the obstacle |
Definition at line 356 of file edge_obstacle.h.
void teb_local_planner::EdgeInflatedObstacle::setRobotModel | ( | const BaseRobotFootprintModel * | robot_model | ) | [inline] |
Set pointer to the robot model.
robot_model | Robot model required for distance calculation |
Definition at line 336 of file edge_obstacle.h.
void teb_local_planner::EdgeInflatedObstacle::setTebConfig | ( | const TebConfig & | cfg | ) | [inline] |
Assign the TebConfig class for parameters.
cfg | TebConfig class |
Definition at line 345 of file edge_obstacle.h.
virtual bool teb_local_planner::EdgeInflatedObstacle::write | ( | std::ostream & | os | ) | const [inline, virtual] |
Write values to an output stream.
Definition at line 317 of file edge_obstacle.h.
const TebConfig* teb_local_planner::EdgeInflatedObstacle::cfg_ [protected] |
Store TebConfig class for parameters.
Definition at line 365 of file edge_obstacle.h.
const BaseRobotFootprintModel* teb_local_planner::EdgeInflatedObstacle::robot_model_ [protected] |
Store pointer to robot_model.
Definition at line 366 of file edge_obstacle.h.