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

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
3

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 http://docs.ros.org/api/nav_msgs/html...

Also look at the laser scan message from sensor_msgs http://docs.ros.org/api/sensor_msgs/h...

To visualize it you will probably want to use rviz with the map display type http://wiki.ros.org/rviz/DisplayTypes...

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 http://wiki.ros.org/tf

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
3

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: https://github.com/RiccardoGiubilato/...

edit flag offensive delete link more

Comments

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 laser-to-occupancy-grid.py ? Thanks in advance!

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

Question Tools

1 follower

Stats

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

Seen: 15,228 times

Last updated: Oct 21 '17