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

Make a map of a room using odometry

asked 2018-09-08 10:02:02 -0600

Elric gravatar image

I have installed the latest version of ROS Lunar on an Ubuntu 16.04.5 LTS.

I need to construct a closed room with an obstacle inside, put a robot and make a map using odometry. How can I do it?

I don't know how to make a map with a robot. Do I need to make it move around the room avoiding the walls and the obstacle? Maybe there is a controller that do that or maybe I need to program it.

After doing the map and I have to use it to move the robot to a goal.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2018-09-08 11:06:13 -0600

alsora gravatar image

Odometry is a proprioceptive measure, i.e. it gives you information about the state of the robot not about the external world.

SLAM algorithms (Simultaneous Localization and Mapping) are what you need, but they always rely on exteroceptive sensors (lidar, camera, sonar...).

If you don't know what's surrounding your robot it's almost impossible to build a map. From the odometry you can only build the path the robot has followed so far. Moreover also obstacle avoidance becomes problematic.

If you need to map an environment using standard SLAM techniques there are examples in ROS.

On the other hand, if what you need is really to build a map using ONLY odometry, the only solution is to cover all the environment with the robot. Just make an algorithm to move the robot from wall to wall using a "snake" pattern. Note that the robot will not be able to asses where obstacles are until it bumps into them. So you will need at least a bumper or another additional sensor which tells you that the wheels are spinning but the robot is not moving forward (because it's against a wall). In this case you could look for "wall following" algorithms and "environment coverage" ones. But I strongly suggest to think about you really need to map using odometry.

edit flag offensive delete link more


Thanks a lot. It's an exercise that I have to do in my robotic's subject.

Elric gravatar image Elric  ( 2018-09-08 12:39:39 -0600 )edit

Do I need to use Navigation Stack? I want to use Gazebo also.

Elric gravatar image Elric  ( 2019-01-22 12:07:04 -0600 )edit

The navigation stack is a "collection" of standard nodes used for navigation. You should look at it to get an idea of which components do you need. Then you can either use the included nodes or other similar ones. There are no requirements between using Gazebo and the navigation stack

alsora gravatar image alsora  ( 2019-01-22 12:35:13 -0600 )edit

I'm going to teleop the robot with the keyboard to make the map. I had thought to use gmapping to store the map but it seems that it needs a laser and I can't use it. Any suggestion about how and where to store the map? Thanks.

Elric gravatar image Elric  ( 2019-04-07 12:32:42 -0600 )edit

Question Tools

1 follower


Asked: 2018-09-08 10:02:02 -0600

Seen: 1,028 times

Last updated: Sep 08 '18