0
$\begingroup$

Rosanswers logo

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...

Edit2: link text

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....


Originally posted by Flowers on ROS Answers with karma: 342 on 2012-09-15

Post score: 3


Original comments

Comment by allenh1 on 2012-09-16:
could you post the bagfile? It is hard to tell what's going on without it...

Comment by Flowers on 2012-09-16:
done, thanks for your affords

$\endgroup$

4 Answers 4

0
$\begingroup$

Rosanswers logo

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.


Originally posted by Stefan Kohlbrecher with karma: 24361 on 2012-09-16

This answer was ACCEPTED on the original site

Post score: 2


Original comments

Comment by Flowers on 2012-09-16:
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).

Comment by Harsh2308 on 2017-09-07:
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
$\endgroup$
0
$\begingroup$

Rosanswers logo

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!


Originally posted by allenh1 with karma: 3055 on 2012-09-16

This answer was NOT ACCEPTED on the original site

Post score: 1


Original comments

Comment by Flowers on 2012-09-16:
http://speedy.sh/zVx9p/lasttry.bag

still get the error

$\endgroup$
0
$\begingroup$

Rosanswers logo

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.


Originally posted by Lorenz with karma: 22731 on 2012-09-16

This answer was NOT ACCEPTED on the original site

Post score: 4


Original comments

Comment by Flowers on 2012-09-17:
My odom node is basically http://www.ros.org/wiki/navigation/Tutorials/RobotSetup/Odom , so there should be everything needed?

Comment by Lorenz on 2012-09-17:
In the bag you provide I cannot see the odom->base_link transform. Verify that your odom node is really working.

Comment by Flowers on 2012-09-17:
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)

Comment by Lorenz on 2012-09-17:
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.

Comment by Flowers on 2012-09-17:
Can't thank you enough, finally got everything to work(my maps look like crap, but I suppose thats due to the recorded data).

Comment by Lorenz on 2012-09-17:
Great! If my answer was correct, please mark it so (little check under the up/downvote buttons).

$\endgroup$
0
$\begingroup$

Rosanswers logo

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.


Originally posted by obernoob with karma: 31 on 2019-09-11

This answer was NOT ACCEPTED on the original site

Post score: 1


Original comments

Comment by BesterJester on 2020-11-16:
I was having the same issue, and doing rosbag record -a fixed it. After that, I did some testing and found that the other necessary topic is /tf_static. This has something to do with the change to tf2 that occurred since the Hydro version. http://wiki.ros.org/tf2/Migration#Addition_of_.2BAC8-tf_static_topic

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.