Edge defining the cost function for limiting the translational and rotational acceleration at the end of the trajectory. More...
#include <edge_acceleration.h>
Public Member Functions | |
void | computeError () |
Actual cost function. | |
EdgeAccelerationGoal () | |
Construct edge. | |
ErrorVector & | getError () |
Compute and return error / cost value. | |
bool | read (std::istream &is) |
Read values from input stream. | |
void | setGoalVelocity (const Eigen::Vector2d &vel_goal) |
Set the goal / final velocity that is taken into account for calculating the acceleration. | |
void | setTebConfig (const TebConfig &cfg) |
Assign the TebConfig class for parameters. | |
bool | write (std::ostream &os) const |
Write values to an output stream. | |
~EdgeAccelerationGoal () | |
Destruct edge. | |
Protected Attributes | |
const TebConfig * | cfg_ |
Store TebConfig class for parameters. |
Edge defining the cost function for limiting the translational and rotational acceleration at the end of the trajectory.
The edge depends on three vertices , an initial velocity defined by setGoalVelocity() and minimizes:
.
a is calculated using the difference quotient (twice) and the position parts of the poses
omegadot is calculated using the difference quotient of the 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 acceleration and the second one the rotational acceleration.
Definition at line 470 of file edge_acceleration.h.
Construct edge.
Definition at line 477 of file edge_acceleration.h.
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 490 of file edge_acceleration.h.
void teb_local_planner::EdgeAccelerationGoal::computeError | ( | ) | [inline] |
Actual cost function.
Definition at line 502 of file edge_acceleration.h.
ErrorVector& teb_local_planner::EdgeAccelerationGoal::getError | ( | ) | [inline] |
Compute and return error / cost value.
This method is called by TebOptimalPlanner::computeCurrentCost to obtain the current cost.
Definition at line 541 of file edge_acceleration.h.
bool teb_local_planner::EdgeAccelerationGoal::read | ( | std::istream & | is | ) | [inline] |
Read values from input stream.
Definition at line 551 of file edge_acceleration.h.
void teb_local_planner::EdgeAccelerationGoal::setGoalVelocity | ( | const Eigen::Vector2d & | vel_goal | ) | [inline] |
Set the goal / final velocity that is taken into account for calculating the acceleration.
vel_goal | 2D vector containing the translational and rotational velocity |
Definition at line 572 of file edge_acceleration.h.
void teb_local_planner::EdgeAccelerationGoal::setTebConfig | ( | const TebConfig & | cfg | ) | [inline] |
Assign the TebConfig class for parameters.
cfg | TebConfig class |
Definition at line 581 of file edge_acceleration.h.
bool teb_local_planner::EdgeAccelerationGoal::write | ( | std::ostream & | os | ) | const [inline] |
Write values to an output stream.
Definition at line 560 of file edge_acceleration.h.
const TebConfig* teb_local_planner::EdgeAccelerationGoal::cfg_ [protected] |
Store TebConfig class for parameters.
Definition at line 588 of file edge_acceleration.h.