Public Member Functions | Protected Attributes | List of all members
dwb_critics::PreferForwardCritic Class Reference

Penalize trajectories with move backwards and/or turn too much. More...

#include <prefer_forward.h>

Inheritance diagram for dwb_critics::PreferForwardCritic:
Inheritance graph
[legend]

Public Member Functions

void onInit () override
 
 PreferForwardCritic ()
 
double scoreTrajectory (const dwb_msgs::Trajectory2D &traj) override
 
- Public Member Functions inherited from dwb_local_planner::TrajectoryCritic
virtual void addCriticVisualization (sensor_msgs::PointCloud &pc)
 
virtual void debrief (const nav_2d_msgs::Twist2D &cmd_vel)
 
std::string getName ()
 
virtual double getScale () const
 
void initialize (const ros::NodeHandle &planner_nh, std::string name, nav_core2::Costmap::Ptr costmap)
 
virtual bool prepare (const geometry_msgs::Pose2D &pose, const nav_2d_msgs::Twist2D &vel, const geometry_msgs::Pose2D &goal, const nav_2d_msgs::Path2D &global_plan)
 
virtual void reset ()
 
void setScale (const double scale)
 
virtual ~TrajectoryCritic ()
 

Protected Attributes

double penalty_
 
double strafe_theta_
 
double strafe_x_
 
double theta_scale_
 
- Protected Attributes inherited from dwb_local_planner::TrajectoryCritic
nav_core2::Costmap::Ptr costmap_
 
ros::NodeHandle critic_nh_
 
std::string name_
 
ros::NodeHandle planner_nh_
 
double scale_
 

Additional Inherited Members

- Public Types inherited from dwb_local_planner::TrajectoryCritic
typedef std::shared_ptr< dwb_local_planner::TrajectoryCriticPtr
 

Detailed Description

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.

Constructor & Destructor Documentation

dwb_critics::PreferForwardCritic::PreferForwardCritic ( )
inline

Definition at line 56 of file prefer_forward.h.

Member Function Documentation

void dwb_critics::PreferForwardCritic::onInit ( )
overridevirtual

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)
overridevirtual

Implements dwb_local_planner::TrajectoryCritic.

Definition at line 52 of file prefer_forward.cpp.

Member Data Documentation

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.


The documentation for this class was generated from the following files:


dwb_critics
Author(s): David V. Lu!!
autogenerated on Sun Jan 10 2021 04:08:44