Penalize trajectories with move backwards and/or turn too much. More...
#include <prefer_forward.h>
Public Member Functions | |
void | onInit () override |
PreferForwardCritic () | |
double | scoreTrajectory (const dwb_msgs::Trajectory2D &traj) override |
Protected Attributes | |
double | penalty_ |
double | strafe_theta_ |
double | strafe_x_ |
double | theta_scale_ |
Penalize trajectories with move backwards and/or turn too much.
Has three different scoring conditions: 1) If the trajectory's x velocity is negative, return the penalty 2) If the trajectory's x is low and the theta is also low, return the penalty. 3) Otherwise, return a scaled version of the trajectory's theta.
Definition at line 53 of file prefer_forward.h.
Definition at line 56 of file prefer_forward.h.
void dwb_critics::PreferForwardCritic::onInit | ( | ) | [override, virtual] |
Reimplemented from dwb_local_planner::TrajectoryCritic.
Definition at line 44 of file prefer_forward.cpp.
double dwb_critics::PreferForwardCritic::scoreTrajectory | ( | const dwb_msgs::Trajectory2D & | traj | ) | [override, virtual] |
Implements dwb_local_planner::TrajectoryCritic.
Definition at line 52 of file prefer_forward.cpp.
double dwb_critics::PreferForwardCritic::penalty_ [protected] |
Definition at line 61 of file prefer_forward.h.
double dwb_critics::PreferForwardCritic::strafe_theta_ [protected] |
Definition at line 61 of file prefer_forward.h.
double dwb_critics::PreferForwardCritic::strafe_x_ [protected] |
Definition at line 61 of file prefer_forward.h.
double dwb_critics::PreferForwardCritic::theta_scale_ [protected] |
Definition at line 61 of file prefer_forward.h.