Go to the documentation of this file.
34 #ifndef TRAJECTORY_ROLLOUT_MAP_GRID_H_
35 #define TRAJECTORY_ROLLOUT_MAP_GRID_H_
45 #include <geometry_msgs/PoseStamped.h>
64 MapGrid(
unsigned int size_x,
unsigned int size_y);
73 inline MapCell&
operator() (
unsigned int x,
unsigned int y){
83 inline MapCell
operator() (
unsigned int x,
unsigned int y)
const {
118 void sizeCheck(
unsigned int size_x,
unsigned int size_y);
145 return map_.size() + 1;
153 inline bool updatePathCell(MapCell* current_cell, MapCell* check_cell,
164 std::vector<geometry_msgs::PoseStamped>& global_plan_out,
double resolution);
187 const std::vector<geometry_msgs::PoseStamped>& global_plan);
195 std::vector<MapCell>
map_;
void commonInit()
Utility to share initialization code across constructors.
double unreachableCellCosts()
unsigned int size_y_
The dimensions of the grid.
MapGrid()
Creates a 0x0 map by default.
static void adjustPlanResolution(const std::vector< geometry_msgs::PoseStamped > &global_plan_in, std::vector< geometry_msgs::PoseStamped > &global_plan_out, double resolution)
std::vector< MapCell > map_
Storage for the MapCells.
~MapGrid()
Destructor for a MapGrid.
MapCell & operator()(unsigned int x, unsigned int y)
Returns a map cell accessed by (col, row)
void setLocalGoal(const costmap_2d::Costmap2D &costmap, const std::vector< geometry_msgs::PoseStamped > &global_plan)
Update what cell is considered the next local goal.
bool updatePathCell(MapCell *current_cell, MapCell *check_cell, const costmap_2d::Costmap2D &costmap)
Used to update the distance of a cell in path distance computation.
void resetPathDist()
reset path distance fields for all cells
void computeTargetDistance(std::queue< MapCell * > &dist_queue, const costmap_2d::Costmap2D &costmap)
Compute the distance from each cell in the local map grid to the planned path.
void computeGoalDistance(std::queue< MapCell * > &dist_queue, const costmap_2d::Costmap2D &costmap)
Compute the distance from each cell in the local map grid to the local goal point.
MapCell & getCell(unsigned int x, unsigned int y)
MapGrid & operator=(const MapGrid &mg)
Assignment operator for a MapGrid.
void sizeCheck(unsigned int size_x, unsigned int size_y)
check if we need to resize
double goal_y_
The goal distance was last computed from.
void setTargetCells(const costmap_2d::Costmap2D &costmap, const std::vector< geometry_msgs::PoseStamped > &global_plan)
Update what cells are considered path based on the global plan.
size_t getIndex(int x, int y)
Returns a 1D index into the MapCell array for a 2D index.
Stores path distance and goal distance information used for scoring trajectories.
base_local_planner
Author(s): Eitan Marder-Eppstein, Eric Perko, contradict@gmail.com
autogenerated on Mon Mar 6 2023 03:50:24