Edge defining the cost function for satisfying the non-holonomic kinematics of a differential drive mobile robot. More...
#include <edge_kinematics.h>
Public Member Functions | |
void | computeError () |
Actual cost function. | |
EdgeKinematicsDiffDrive () | |
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 | ~EdgeKinematicsDiffDrive () |
Destruct edge. | |
Protected Attributes | |
const TebConfig * | cfg_ |
Store TebConfig class for parameters. |
Edge defining the cost function for satisfying the non-holonomic kinematics of a differential drive mobile robot.
The edge depends on two vertices and minimizes a geometric interpretation of the non-holonomic constraint:
The weight can be set using setInformation(): Matrix element 1,1: (Choose a very high value: ~1000).
A second equation is implemented to penalize backward motions (second element of the error /cost vector).
The weight can be set using setInformation(): Matrix element 2,2: (A value ~1 allows backward driving, but penalizes it slighly).
The dimension of the error / cost vector is 2: the first component represents the nonholonomic constraint cost, the second one backward-drive cost.
Definition at line 74 of file edge_kinematics.h.
Construct edge.
Definition at line 81 of file edge_kinematics.h.
virtual teb_local_planner::EdgeKinematicsDiffDrive::~EdgeKinematicsDiffDrive | ( | ) | [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 93 of file edge_kinematics.h.
void teb_local_planner::EdgeKinematicsDiffDrive::computeError | ( | ) | [inline] |
Actual cost function.
Definition at line 105 of file edge_kinematics.h.
ErrorVector& teb_local_planner::EdgeKinematicsDiffDrive::getError | ( | ) | [inline] |
Compute and return error / cost value.
This method is called by TebOptimalPlanner::computeCurrentCost to obtain the current cost.
Definition at line 176 of file edge_kinematics.h.
virtual bool teb_local_planner::EdgeKinematicsDiffDrive::read | ( | std::istream & | is | ) | [inline, virtual] |
Read values from input stream.
Definition at line 185 of file edge_kinematics.h.
void teb_local_planner::EdgeKinematicsDiffDrive::setTebConfig | ( | const TebConfig & | cfg | ) | [inline] |
Assign the TebConfig class for parameters.
cfg | TebConfig class |
Definition at line 207 of file edge_kinematics.h.
virtual bool teb_local_planner::EdgeKinematicsDiffDrive::write | ( | std::ostream & | os | ) | const [inline, virtual] |
Write values to an output stream.
Definition at line 196 of file edge_kinematics.h.
const TebConfig* teb_local_planner::EdgeKinematicsDiffDrive::cfg_ [protected] |
Store TebConfig class for parameters.
Definition at line 214 of file edge_kinematics.h.