Class GoalDistCritic

Inheritance Relationships

Base Type

Derived Type

Class Documentation

class GoalDistCritic : public dwb_critics::MapGridCritic

Scores trajectories based on how far along the global path they end up.

This trajectory critic helps ensure progress along the global path. It finds the pose from the global path farthest from the robot that is still on the costmap, and aims for that point by assigning the lowest cost to the cell corresponding with that farthest pose.

Subclassed by dwb_critics::GoalAlignCritic

Public Functions

virtual bool prepare(const geometry_msgs::msg::Pose2D &pose, const nav_2d_msgs::msg::Twist2D &vel, const geometry_msgs::msg::Pose2D &goal, const nav_2d_msgs::msg::Path2D &global_plan) override

Protected Functions

bool getLastPoseOnCostmap(const nav_2d_msgs::msg::Path2D &global_plan, unsigned int &x, unsigned int &y)