Edge defining the cost function for limiting the translational and rotational velocity. More...
#include <edge_velocity.h>
Public Member Functions | |
| void | computeError () |
| Actual cost function. | |
| EdgeVelocity () | |
| Construct edge. | |
| ErrorVector & | getError () |
| Compute and return error / cost value. | |
| virtual bool | read (std::istream &is) |
| Read values from input stream. | |
| 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 | ~EdgeVelocity () |
| Destruct edge. | |
Protected Attributes | |
| const TebConfig * | cfg_ |
| Store TebConfig class for parameters. | |
Edge defining the cost function for limiting the translational and rotational velocity.
The edge depends on three vertices
and minimizes:
.
v is calculated using the difference quotient and the position parts of both poses.
omega is calculated using the difference quotient of both yaw angles followed by a normalization to [-pi, pi].
weight can be set using setInformation().
penaltyInterval denotes the penalty function, see penaltyBoundToInterval().
The dimension of the error / cost vector is 2: the first component represents the translational velocity and the second one the rotational velocity.
Definition at line 75 of file edge_velocity.h.
| teb_local_planner::EdgeVelocity::EdgeVelocity | ( | ) | [inline] |
Construct edge.
Definition at line 82 of file edge_velocity.h.
| virtual teb_local_planner::EdgeVelocity::~EdgeVelocity | ( | ) | [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 94 of file edge_velocity.h.
| void teb_local_planner::EdgeVelocity::computeError | ( | ) | [inline] |
Actual cost function.
Definition at line 106 of file edge_velocity.h.
| ErrorVector& teb_local_planner::EdgeVelocity::getError | ( | ) | [inline] |
Compute and return error / cost value.
This method is called by TebOptimalPlanner::computeCurrentCost to obtain the current cost.
Definition at line 205 of file edge_velocity.h.
| virtual bool teb_local_planner::EdgeVelocity::read | ( | std::istream & | is | ) | [inline, virtual] |
Read values from input stream.
Definition at line 214 of file edge_velocity.h.
| void teb_local_planner::EdgeVelocity::setTebConfig | ( | const TebConfig & | cfg | ) | [inline] |
Assign the TebConfig class for parameters.
| cfg | TebConfig class |
Definition at line 235 of file edge_velocity.h.
| virtual bool teb_local_planner::EdgeVelocity::write | ( | std::ostream & | os | ) | const [inline, virtual] |
Write values to an output stream.
Definition at line 224 of file edge_velocity.h.
const TebConfig* teb_local_planner::EdgeVelocity::cfg_ [protected] |
Store TebConfig class for parameters.
Definition at line 242 of file edge_velocity.h.