Ask Your Question

slam gmapping

asked 2011-02-23 18:31:08 -0600

szokei gravatar image

updated 2016-03-06 19:50:02 -0600

130s gravatar image

Hello, I'm trying to build a map from a bag file.

rosrun gmapping slam_gmapping
[ WARN] [1298485439.195475816, 1297352013.562990207]: Message from [/play_1298485437842772645] has a non-fully-qualified frame_id [laser]. Resolved locally to [/laser].  This is will likely not work in multi-robot systems.  This message will only print once.
[ WARN] [1298485454.051371332, 1297352028.420031693]: MessageFilter [target=/odom ]: Dropped 100.00% of messages so far. Please turn the [ros.gmapping.message_notifier] rosconsole logger to DEBUG for more information.

In rxbag I've checked the bag file and there is /pose instead of /odom. How to do the transforms? Thank you!

edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted

answered 2011-02-23 18:53:36 -0600

Chad Rockey gravatar image

updated 2011-02-23 18:56:20 -0600

So the first thing you should do when you see these errors is to load up rxconsole and look at the debugs/warnings/errors being produced by this node. Be sure to specifically change the logger level for gmapping to DEBUG, as your error message says.

It looks like you're actually missing the transform with the target frame of /odom and NOT the /odom message topic. If you look at the gmapping package, you'll see it subscribes to /tf and /scan, not an odom topic.

To figure out what transforms are missing, you should use tf's view_frames function by commanding rosrun tf view_frames This will allow you to see your current transform tree and to make sure that you aren't missing any necessary links. At mininum, you will need /odom to /base_link and /base_link to /laser. If these three are connected to each other in the right way, everything should run fine.

What's the output of rxconsole and tf view_frames? That will let everyone know what the problem actually is so that we can respond more specifically.

edit flag offensive delete link more

answered 2011-02-24 01:29:59 -0600

szokei gravatar image

The cause of the faulty map can be the static_transform?

"node pkg="tf" type="static_transform_publisher" name="link2_broadcaster" args="0 0 0 0 0 0 base_link laser 100" />"

edit flag offensive delete link more


please use the 'comment' feature or edit your original question to provide updates.
kwc gravatar image kwc  ( 2011-02-24 03:13:23 -0600 )edit
Yes, please comment or edit, there's a lot going on here. ^_^ This static transform publisher is telling your gmapping that your laser scanner is directly above the center of rotation on your robot and facing directly forward.
Chad Rockey gravatar image Chad Rockey  ( 2011-02-24 06:18:10 -0600 )edit
You can use the args as: "x y z yaw pitch roll frame_id child_frame_id period_in_ms" Our laser scanner is about 20cm forward of the laser scanner and about 40 cm above the ground, but otherwise faces directly forward (yaw=0.0), so we use: "0.20 0.0 0.40 0.0 0.0 0.0 base_link laser 100"
Chad Rockey gravatar image Chad Rockey  ( 2011-02-24 06:23:18 -0600 )edit
"WARNING The following node subscriptions are unconnected: * /slam_gmapping: * /reset_time WARNING The following nodes are unexpectedly connected: * /slam_gmapping->/rosout (/rosout) * /play_1298647180231813257->/rosout (/rosout) WARNING Received out-of-date/future transforms: * receiving transform from [/play_1298647180231813257] that differed from ROS time by -1295167.46686s"
szokei gravatar image szokei  ( 2011-02-25 01:18:00 -0600 )edit
Thank you for the help! I understand the transform parameters, but i don't know why I'm getting an incorrect map, how can I debug this? Suddenly another error occured with the time in ROS so the transforms from play are not made , using_sim_time is set to true.
szokei gravatar image szokei  ( 2011-02-25 01:19:01 -0600 )edit
So you used "rosparam set use_sim_time true" in your current terminal and then used "rosbag play --clock bagfile.bag"? Also, how incorrect are your maps? Is your laser mounted upside down? If you attach a screenshot of your odom path and the map, and maybe laser scans in RVIZ, that could help.
Chad Rockey gravatar image Chad Rockey  ( 2011-02-25 07:30:50 -0600 )edit
I can't upload the screenshots i need karma>60. The laser is mounted normally. I've fixed the problem with the time, i had to set it in every terminal which had relation with the transform operations.My map is still very weird I've made screenshots with the created map and the laser scans in RViz.
szokei gravatar image szokei  ( 2011-02-27 22:47:49 -0600 )edit
Darn, if you email me the screenshots to chadrockey AT gmail DOT com, then I'll see if I can get them posted to your original question. If not, I'll certainly take a look at them and see if I can figure out what's wrong.
Chad Rockey gravatar image Chad Rockey  ( 2011-02-27 23:04:03 -0600 )edit

answered 2011-02-23 19:34:19 -0600

szokei gravatar image

updated 2011-02-24 03:14:14 -0600

kwc gravatar image

I've set to debug level:

After checking the transforms I've obtained: /map -> /odom -> base_link

edit flag offensive delete link more


Looks like you are missing the transform between base_link and laser. Take a look at and try publishing your transform from base_link to laser. Did you get any information from rxconsole?
Chad Rockey gravatar image Chad Rockey  ( 2011-02-23 19:37:46 -0600 )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

1 follower


Asked: 2011-02-23 18:31:08 -0600

Seen: 5,291 times

Last updated: Mar 06 '16