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

Using slam_gmapping for an extern simulator

asked 2015-06-12 02:16:08 -0600

GG31 gravatar image


I have my own simulator and I would like to use slam_gmapping package. I understood that I have to publish to two topics /scan and /tf. I understood the data sent to /scan, but /tf is a transformation, I understood how tf works with the ros tutorial but what data, transformation are expected ? a frame_id and a child_frame_id are requiered for each message. How can I decide which frame I need ? How to build the tree ? I saw that may be a basic tree is map -> odom -> base_link but which correspond to what ? I tried to publish to /scan and /tf but the gmapping doesn't initialize at all and answers me with a warning : I tried to figure it out, but I am a little desperate now. What did I miss ?

Thank you,

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2015-06-16 02:05:23 -0600

GG31 gravatar image

To answer to myself, slam_gmapping works with the clock, that means you have to publish to /clock, if not, nothing happens. Now, /tf of /map->/odom publishes 000 and 0001 for the rotation, but when I use slam_gmapping, it publishes nan values only. I think it is related to the first frame who has nan values : update ld=-nan ad=nan Laser Pose= -nan -nan -nan But I don't know why. What is ld? Laser Pose? How can I change this values?

edit flag offensive delete link more


You do not have to publish the clock! This is supposed to be the real time of the system and only published by simulation.

dornhege gravatar image dornhege  ( 2015-06-16 03:28:06 -0600 )edit

answered 2015-06-16 03:30:20 -0600

dornhege gravatar image

You need to provide the /odom -> /base_link transformation, which has to correspond to your robot's odometry. You never want to send /tf message directly. Use a TfBroadcaster instead.

edit flag offensive delete link more


Thank you for your answer, but in this case, there is no initialization of slam node at all and answers this warning : [ WARN] [1434521368.489624858]: MessageFilter [target=odom ]: Dropped 100.00% of messages so far. Please turn the [ros.gmapping.message_notifier] rosconsole logger to DEBUG for more

GG31 gravatar image GG31  ( 2015-06-17 01:12:32 -0600 )edit

Question Tools


Asked: 2015-06-12 02:16:08 -0600

Seen: 115 times

Last updated: Jun 16 '15