# gmapping creates no map

Hey,

I created a bagfile containing the data of a LaserScan and odometry published in /tf.

According to rostopic echo the data is fine, by fine I mean the data is changing and in the right form.

Still, for some reason I don't know, this warning occurs:

[ WARN] [1243531255.142345324]: MessageFilter [target=/odom ]: Dropped 100.00% of messages so far. Please turn the [ros.gmapping.message_notifier] rosconsole logger to DEBUG for more information.

Anyone there, who had the same problem?

P.S.: I know, there warning contains information about what to do, but I haven't figured out, what it wants me to do...so explanations what "turn the rosconsole logger" means and how it is done are also welcome :-)

Edit: According to another question asked here, it might be some issue concerning time stamps, therefore I modified my /scan topic by setting the header.stamp to ros::Time::now(), which is exactly what I do with the /odom's header...

That is one of the bagfiles I recorded :-)

Edit3: testfile here is a file with a static transform publisher - still all odom data is dropped, and I really can't make out the difference to the tutorial's bagfile - at least I've found nothing that should matter....

edit retag close merge delete

could you post the bagfile? It is hard to tell what's going on without it...

( 2012-09-16 05:12:36 -0500 )edit

( 2012-09-16 07:12:50 -0500 )edit

Sort by » oldest newest most voted

Are you sure you have set up everything correctly for using simulation time (so the timestamps from the bagfile are used)? Also see the Clock documentation regarding this. You have start a roscore, set the parameter:

rosparam set use_sim_time true


then start anything else you need and then play your bagfile with the --clock option:

rosbag play [your_bagfile] --clock


As for the rosconsole logger question, you can use the rxconsole tool to set different log levels for different nodes and get more debug output.

more

Short question: Do I have to set use_sim_time before recording the data - because if I follow your instructions still all the odom messages are dropped(rxconsole doesn't really help, seems to be some issue in /tf messagefilter - given codeline is just the output).

( 2012-09-16 21:46:27 -0500 )edit

I am facing the same problem and I am using the use_sim_time parameter correctly. I have added a static transform publisher between- base_link and map, & map and odom. This is what i run-

  rosrun gmapping slam_gmapping scan:=base_scan _odom_frame:=odom _base_frame:=base_link _map_frame:=map

( 2017-09-07 08:05:36 -0500 )edit

Your tf tree is apparently not complete. Have a look at the gmapping wiki page. You can find a section on required tf transforms at the bottom.

First, the system needs to be able to transform from your laser sensor into base link. You seem to publish a transform from base_link to base_laser, but your sensor data on the scan topic is in frame openni_depth_frame, i.e. gmapping will not be able to transform the sensor data correctly. Instead of having a static_transform_publisher from base_link to base_laser, publish the transform from base_link to openni_depth_frame.

Second, you don't seem to have an odom transform. However, gmapping requires valid odometry. Normally, the transform is published by your robot's base driver that also publishes on the /odom topic. Make sure you have that set up correctly, otherwise gmapping won't work.

more

My odom node is basically http://www.ros.org/wiki/navigation/Tutorials/RobotSetup/Odom , so there should be everything needed?

( 2012-09-17 04:30:20 -0500 )edit

In the bag you provide I cannot see the odom->base_link transform. Verify that your odom node is really working.

( 2012-09-17 04:31:59 -0500 )edit

http://speedy.sh/c7p5J/test2.bag <- would you mind looking at this bagfile, I tried to implement your solution. I am pretty sure that my odom node works, especially as it is nearly 1:1 the example code for fake odom data from the navigation stack(which uses gmapping, so that should be fine)

( 2012-09-17 06:18:45 -0500 )edit
1

It looks like your tf tree is somehow messed up. rosrun tf view_frames shows that you seem to have two root,s, base_footprint and odom. I don't know which node publishes the transform base_footprint->base_link but either odom should publish odom->base_footprint or you should get rid of it.

( 2012-09-17 06:24:10 -0500 )edit

Can't thank you enough, finally got everything to work(my maps look like crap, but I suppose thats due to the recorded data).

( 2012-09-17 12:40:06 -0500 )edit

Great! If my answer was correct, please mark it so (little check under the up/downvote buttons).

( 2012-09-17 21:58:06 -0500 )edit

Ok. So, you have the robot's \scan topic publishing on the wrong frame. You need to publish the data on the same frame as the robot. So, try a static transform publisher. This will let gmapping know where the laser is with respect to the robot's coordinate system. Hope this was of use to you!

more

still get the error

( 2012-09-16 08:29:07 -0500 )edit

In my case it didn't work if I had recorded the bagfile with

$rosbag record -O testbag1.bag scan tf  but it did work quick & dirty when I had used $ rosbag record -a


I am very new to ROS and I only assume there is another necessary topic recorded among all topics when using "-a" which is related to tf transform as Lorenz and allenh1 mentioned.

more