Class GoalAlignCritic

Inheritance Relationships

Base Type

Class Documentation

class GoalAlignCritic : public dwb_critics::GoalDistCritic

Scores trajectories based on whether the robot ends up pointing toward the eventual goal.

Similar to GoalDistCritic, this critic finds the pose from the global path farthest from the robot that is still on the costmap and then evaluates how far the front of the robot is from that point. This works as a proxy to calculating which way the robot should be pointing.

Public Functions

inline GoalAlignCritic()
void onInit() override
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
virtual double scorePose(const geometry_msgs::msg::Pose2D &pose) override

Retrieve the score for a single pose.

Parameters:

pose – The pose to score, assumed to be in the same frame as the costmap

Returns:

The score associated with the cell of the costmap where the pose lies

Protected Attributes

double forward_point_distance_