43 const geometry_msgs::Pose2D& goal,
44 const nav_2d_msgs::Path2D& global_plan)
49 bool started_path =
false;
53 if (adjusted_global_plan.poses.size() != global_plan.poses.size())
55 ROS_DEBUG_NAMED(
"PathDistCritic",
"Adjusted global plan resolution, added %zu points",
56 adjusted_global_plan.poses.size() - global_plan.poses.size());
61 for (i = 0; i < adjusted_global_plan.poses.size(); ++i)
63 double g_x = adjusted_global_plan.poses[i].x;
64 double g_y = adjusted_global_plan.poses[i].y;
65 unsigned int map_x, map_y;
69 queue_->enqueueCell(map_x, map_y);
72 else if (started_path)
80 "None of the %d first of %zu (%zu) points of the global plan were in the local costmap and free",
81 i, adjusted_global_plan.poses.size(), global_plan.poses.size());
void reset() override
Clear the queue and set cell_values_ to the appropriate number of unreachableCellScore.
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) override
nav_core2::BasicCostmap costmap
void propogateManhattanDistances()
Go through the queue and set the cells to the Manhattan distance from their parents.
static const unsigned char NO_INFORMATION
#define ROS_DEBUG_NAMED(name,...)
Scores trajectories based on how far from the global path they end up.
nav_core2::Costmap::Ptr costmap_
void setValue(const unsigned int x, const unsigned int y, const T &value) override
nav_2d_msgs::Path2D adjustPlanResolution(const nav_2d_msgs::Path2D &global_plan_in, double resolution)
#define ROS_ERROR_NAMED(name,...)
std::shared_ptr< MapGridQueue > queue_
nav_grid::VectorNavGrid< double > cell_values_
#define PLUGINLIB_EXPORT_CLASS(class_type, base_class_type)
bool worldToGridBounded(const NavGridInfo &info, double wx, double wy, unsigned int &mx, unsigned int &my)