opfit.blogg.se

Occupancy grid map
Occupancy grid map






The costmap automatically subscribes to sensors topics over ROS and updates itself accordingly. The details about how the Costmap updates the occupancy grid are described below, along with links to separate pages describing how the individual layers work. The costmap_2d::Costmap2D class implements the basic data structure for storing and accessing the two dimensional costmap. The layers themselves may be compiled individually, allowing arbitrary changes to the costmap to be made through the C++ interface. Each layer is instantiated in the Costmap2DROS using pluginlib and is added to the LayeredCostmap. It contains a costmap_2d::LayeredCostmap which is used to keep track of each of the layers. The main interface is costmap_2d::Costmap2DROS which maintains much of the ROS related functionality. Maintaining 3D obstacle data allows the layer to deal with marking and clearing more intelligently. By default, the obstacle layer maintains information three dimensionally (see voxel_grid). For instance, the static map is one layer, and the obstacles are another layer. Each bit of functionality exists in a layer. This is designed to help planning in planar spaces.Īs of the Hydro release, the underlying methods used to write data to the costmap is fully configurable.

occupancy grid map

For example, a table and a shoe in the same position in the XY plane, but with different Z positions would result in the corresponding cell in the costmap_2d::Costmap2DROS object's costmap having an identical cost value.

occupancy grid map occupancy grid map

The costmap_2d::Costmap2DROS object provides a purely two dimensional interface to its users, meaning that queries about obstacles can only be made in columns. The costmap uses sensor data and information from the static map to store and update information about obstacles in the world through the costmap_2d::Costmap2DROS object. The costmap_2d package provides a configurable structure that maintains information about where the robot should navigate in the form of an occupancy grid. For the robot to avoid collision, the footprint of the robot should never intersect a red cell and the center point of the robot should never cross a blue cell. Note: In the picture above, the red cells represent obstacles in the costmap, the blue cells represent obstacles inflated by the inscribed radius of the robot, and the red polygon represents the footprint of the robot.








Occupancy grid map