
Hey,
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.
Originally posted by ayush_dewan with karma: 1610 on 2013-09-26
This answer was ACCEPTED on the original site
Post score: 2
Original comments
Comment by Albert K on 2013-09-27:
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.
Comment by ayush_dewan on 2013-09-27:
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??
Comment by Albert K on 2013-09-29:
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.
Comment by Albert K on 2013-09-29:
The clock sync command can be found here: http://pr2support.willowgarage.com/wiki/PR2%20Manual/Chapter13#Clock_Synchronization