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

gmapping : no transform from /map->odom_combined

asked 2013-09-26 03:17:13 -0500

Albert K gravatar image

updated 2014-01-28 17:18:04 -0500

ngrennan gravatar image

I recently try to run SLAM gmapping on PR2. Here's my procedure:

1.roslaunch gmapping slam_gmapping_pr2.launch on PR2. I've set the parameter odom_frame to odom_combined to suit PR2.

2.roslaunch pr2_teleop teleop_joystick.launch on my computer to move the robot around.

3.rosrun rviz rviz on my computer to show the map

However, the gmapping node would not publish the transform from /map->odom_combined. Therefore, if I want to show the Map, I have to manually set the fixed frame to /map, which does not exist. I can show the map and it will expand when I teleop the robot around. Only the transform is missing.

What might the problem be? Thanks for any advise.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2013-09-26 04:11:07 -0500


The way I understand the question is that, gmapping is working fine but to visualize it in rviz u have to manually set fixed frame as "/map".

If the problem is only with visualization then u can save rviz settings once so that u don't have to set fixed frame every single time, but if gmapping is not publishing map frame then its a different problem.

To confirm whether gmapping is publishing frame use following command

rosrun tf tf_echo /map /odom_combined

If u see the tf output then gmapping is working fine.

edit flag offensive delete link more


Yeah, I've tried both view_frame and tf_echo, the frame does not exist. Since the /map->/odom_combined transform is missing, we cannot localize the robot correctly. The SLAM functionality is reduced to only mapping.

Albert K gravatar image Albert K  ( 2013-09-27 03:09:59 -0500 )edit

That seems a little weird. Is gmapping not publishing any frame or it is not publishing map->odom_combined?? In rviz check the tf tree once and confirm whether frame "/map" exists or not??

ayush_dewan gravatar image ayush_dewan  ( 2013-09-27 06:00:51 -0500 )edit

It seems to be the problem of time synchronization problem between c1 and c2 computer on PR2. It is said that the tf is very sensitive to time. After I run the time sync command on basestation, c1, c2, everything gets fine.

Albert K gravatar image Albert K  ( 2013-09-29 20:50:06 -0500 )edit
Albert K gravatar image Albert K  ( 2013-09-29 20:50:27 -0500 )edit

answered 2013-10-07 03:16:39 -0500

psei gravatar image

updated 2013-10-07 03:17:20 -0500

I remember to have had the same problem... Since you are speaking of "odom_combined" I assume that you are using the robot_pose_ekf package.

Here is my launchfile for gmapping:


<!-- slam_gmapping -->  
<node pkg="gmapping" type="slam_gmapping" name="slam_gmapping" output="screen">
   <param name="odom_frame" value="odom_combined"/>
       <remap from="scan" to="hokuyo_scan"/>


I think the interesting part is the remap of the odom_frame. After I did that all needed TFs worked correctly.

edit flag offensive delete link more

Question Tools



Asked: 2013-09-26 03:17:13 -0500

Seen: 6,670 times

Last updated: Oct 07 '13