Ask Your Question

Occupancy Grid Map generation using ROS

asked 2017-03-12 15:23:41 -0500

ZainMehdi gravatar image

Hi, I am trying to build occupancy grid map in ros using laser data but have no idea from where to start. I dont want to use completely self built package as I am not allowed to use gmapping or hecor. Can anyone please point me in the right direction.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2017-03-12 16:36:07 -0500

gudjon gravatar image

It seems to me that a good place to start is to look at the occupancy grid map message from the nav_msgs package

Also look at the laser scan message from sensor_msgs

To visualize it you will probably want to use rviz with the map display type

Now assuming you have a stream of LaserScan messages you just need to figure out the math to map each ray to a grid cell. To do this you need to know the pose of the laser scanner. You will have to translate the ray direction from the laser scanners coordinate frame to the world coordinate frame. The tf package might help with that

The hard part will be to handle noise and to properly merge together multiple laser scans over time to get a good probabilistic map.

edit flag offensive delete link more

answered 2017-10-21 10:28:52 -0500

RiccardoGiubilato gravatar image

Hi! Please take a look at how I built an OccupancyGrid from odometry and ultrasonic range data at this repo:

edit flag offensive delete link more


thanks. I will have a look :)

ZainMehdi gravatar image ZainMehdi  ( 2017-10-23 01:42:17 -0500 )edit

Hello! Thanks for ur sharing.. may i know what do u mean by pure mapping instead of SLAM in your ? Thanks in advance!

MsMimi gravatar image MsMimi  ( 2019-05-21 21:25:52 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2017-03-12 15:23:41 -0500

Seen: 11,026 times

Last updated: Oct 21 '17