ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

How to use costmap_2d to build grid map?

asked 2016-10-09 07:01:26 -0500

niubc gravatar image

I'm a beginner. I'm trying to use costmap_2d package to build a grid map. Before this I used slam_gmapping to finish the job, by writing this node to launch file, but in didn't work for costmap_2d. I noticed that there are three nodes in costmap_2d package, so which one should I choose? How should I do to use it to build a map?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2016-10-12 03:38:21 -0500

mgruhler gravatar image

costmap_2d is not meant to do SLAM, this is drive around and actually create a map from sensor data. It is used to provide a means for path planning and obstacle avoidance, by providing an abstraction of the current environment as an occupancy grid map.

However, it is only filled with current sensor data (or other stuff) with respect to a fixed frame (e.g. the robot base frame or a world frame). It does not provide localization and thus cannot do mapping.

slam_gmapping or any other of the many SLAM packages out there is what you should use.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2016-10-09 07:01:26 -0500

Seen: 317 times

Last updated: Oct 12 '16