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

Can not create a map with gmapping

asked 2013-04-11 19:18:34 -0500

Astronaut gravatar image

updated 2013-04-17 00:08:28 -0500

dornhege gravatar image


Im trying to create a map from a bag file using the gmapping. I have done everything using the tutorial but when I tried to save the map with the map server it was just waited for the map and nothing happened. My bag file has camera, imu and laser scans. The topics are imu/data and scan.

Here is my launch file


<param name="/use_sim_time" value="true"/>

<node name="rosplay" pkg="rosbag" type="play" args="/home/2011-04-01-14-19-39.bag  --clock"/>

    <node pkg="tf" type="static_transform_publisher" name="baselink_laser" args="0 0 0 0 0 0 /scanmatcher_frame /laser 10"/>
    <node pkg="tf" type="static_transform_publisher" name="laser_imu" args="0 0 0 0 0 0 /laser /base_imu 10"/>

    <node pkg="gmapping" type="slam_gmapping" name="slam_gmapping" output="screen">
    <param name="base_frame" value="scanmatcher_frame"/>
        <param name="odom_frame" value="scanmatcher_frame"/>
    <param name="map_frame" value="map"/>


<!-- Start an rviz node with a custom configuration for the viewpoint, map_server, trajectory, laser scans, etc -->
<node pkg="rviz" type="rviz" output="screen" name="rviz" args="-d $(find pow_analyzer)/launch/pow_rviz.vcg"/>


Any help

edit retag flag offensive close merge delete


Does your gmapping work? What output does it give?

felix k gravatar image felix k  ( 2013-04-12 01:13:01 -0500 )edit

No . I can not get work . I attached the launch file.

Astronaut gravatar image Astronaut  ( 2013-04-16 23:53:49 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2013-04-17 00:11:23 -0500

dornhege gravatar image

You are missing odometry in the bag file. gmapping requires that to work.

You can try hector_mapping for a SLAM approach that works without odometry or provide some to gmapping.

edit flag offensive delete link more


so I need like virtual odometry. I can provide virtual odometry from hector_mapping and feed that to gmapping or??

Astronaut gravatar image Astronaut  ( 2013-04-17 00:15:50 -0500 )edit

Ideally you need real odometry. If you already have hector_mapping, you shouldn't need to run gmapping on top of that?

dornhege gravatar image dornhege  ( 2013-04-17 01:33:46 -0500 )edit

Yes, I already have hector_mapping. So What do you mean to run gmapping on the top of that?? So what do I need??

Astronaut gravatar image Astronaut  ( 2013-04-17 02:13:07 -0500 )edit

Only one of those. They solve the same problem.

dornhege gravatar image dornhege  ( 2013-04-17 02:26:07 -0500 )edit

I do not understand how to run gmapping on the top of hector_mapping. Please can you tell me that??

Astronaut gravatar image Astronaut  ( 2013-04-17 06:14:58 -0500 )edit

My point is that you should NOT need to do that, unless you know what you want to achieve. The default is to use either one.

dornhege gravatar image dornhege  ( 2013-04-17 08:43:12 -0500 )edit

I just wont to compare the two maps from gmapping and hector_mapping and use AMCL and robot_pose_ekf with both of them and also compare the estimated pose. OK?

Astronaut gravatar image Astronaut  ( 2013-04-17 14:25:23 -0500 )edit

The easiest would be to run them one after another on the same log.

dornhege gravatar image dornhege  ( 2013-04-18 00:08:22 -0500 )edit

Question Tools


Asked: 2013-04-11 19:18:34 -0500

Seen: 2,220 times

Last updated: Apr 17 '13