Ask Your Question

Use Gmapping without a laser

asked 2019-04-07 12:37:46 -0500

Elric gravatar image

updated 2019-04-07 12:42:06 -0500

I'm using ROS Melodic, Gazebo 9.7.0 on an Ubuntu 18.04.2 LTS.

I have to make a map with odometry only. I'm going to teleop the robot to move it around a closed room to make the map. After I have the map, I have to order the robot to move to a goal (the robot will move autonomously).

To make the map I will move the robot from wall to wall using a "snake" pattern but without hitting anything.

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 to store the map and where? Thanks.

edit retag flag offensive close merge delete


What sensors do you have to work with?

stevemacenski gravatar image stevemacenski  ( 2019-04-08 12:04:12 -0500 )edit

I'm not going to use any sensor. I only have odometry data.

Elric gravatar image Elric  ( 2019-04-08 12:17:55 -0500 )edit

Ok, in that case talking about mapping isn't really a meaningful thing if you have no way to view your environment (camera, lidar, depth camera, sonar, radar, bump sensor)

stevemacenski gravatar image stevemacenski  ( 2019-04-08 12:22:05 -0500 )edit

I have to do a map using only odometry. I think I'm talking about mapping.

Elric gravatar image Elric  ( 2019-04-08 12:23:03 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2019-04-08 21:27:20 -0500

janindu gravatar image

If you are not using any exteroceptive sensors such as camera / laser/ sonar etc, then the conventional mapping solutions won't work for you.

Based on your comments, what I understood is that you need to understand where in the environment you can navigate without collisions. This information constitutes a map for you. To create that map you will navigate the robot in a pattern in the open space.

Assuming I have understood your problem correctly, I can see a couple of problems in this approach.

  1. You are entirely dependent on odometry, which will definitely drift while the robot moves
  2. You need to fix your odometry coordinate system's origin somewhere and keep track of it

If your odometry drift is tolerable and you can always initialize the robot accurately in the same place, I propose the following mapping approach.

Initialize map MxN 2D matrix to occupied everywhere

while navigating
    get position x,y from odometry
    convert x,y to corresponding i,j indices of the map (based on map resolution and map origin)
    set map(i,j) free
edit flag offensive delete link more


Yes, you are right. I have to create a map to map where the walls and obstacles are (I will only have one obstacle). Maybe I can use tf to "convert x,y to corresponding i,j indices of the map". What do you think?

Elric gravatar image Elric  ( 2019-04-16 09:09:19 -0500 )edit

With correct implementation, you should be able to. However, note that tf is used for 3D coordinate transformations and map coordinates in your case are 2D.

janindu gravatar image janindu  ( 2019-04-25 20:13:08 -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



Asked: 2019-04-07 12:37:46 -0500

Seen: 237 times

Last updated: Apr 08 '19