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

Problems while visualizing rosbag laserScans on Rviz

asked 2012-03-07 00:36:30 -0500

Gonzalo gravatar image

updated 2012-03-07 20:10:19 -0500

A brief summarize of the settings under ROS electric on ubuntu: We are running a rosbag file on loop mode and while trying to visualize the data on Rviz, it disappears at the beginning of each loop.

We have recorded all the tf frames, odometry and laserScan topics on the rosbag file. Using the rostopic echo tool, we have checked that data was being published all the time, but we can't visualize anything during the first 10 seconds or so of each loop. After a certain amount of time, it seems like everything runs fine again, but we have no idea what might be wrong, any idea?

EDITED: well, I guess there are some problems on the tf, as the laser scans are showed as usual if I fix the frame to the laser frame, but happens as described above if the fixed frame is any other (ie: base link).

on response to the first answer, the behavior is the same playing the rosbag either on loop or normal mode.

edit retag flag offensive close merge delete

Comments

Does the error still happen if you restart rviz and the log file? Maybe the tf buffers just need to fill. If you set the frame to laser frame there is no need for tf, which is why that works.

dornhege gravatar image dornhege  ( 2012-03-07 02:55:47 -0500 )edit

yes, the error repeats systematically on several rosbags recorded this morning, as well as real-time visualization. Right now I'm using tf_monitor to check that everything is well connected...

Gonzalo gravatar image Gonzalo  ( 2012-03-07 03:07:55 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
2

answered 2012-03-07 07:36:13 -0500

Gonzalo gravatar image

Ok, at the end it was a sync problem... we were publishing tf's from two different machines and there was a 10 seconds delay between them, which I guess is not good at all.

Once synchronized, the rviz shows data correctly, although I am afraid I can move to trash the old rosbags

Thank you!

edit flag offensive delete link more

Comments

Depending on how good synchronization has to be and how much effort it is to generate a new dataset, you could try changing the timestamps in one bag file to match the others using the rosbag API (see http://www.ros.org/wiki/rosbag/Code%20API)

Stefan Kohlbrecher gravatar image Stefan Kohlbrecher  ( 2012-03-07 21:48:30 -0500 )edit
1

answered 2012-03-07 01:12:31 -0500

dornhege gravatar image

I'm not sure how tf works under the hood, but my suspicion would be that tf really doesn't like the loop skip. That would mean that you are jumping back in time and it might get very confused.

Tf's default buffer length is 10s, so if you run it for 10s after the start you have now filled the buffer with only consistent data again, which would explain why it works again after 10s.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2012-03-07 00:36:30 -0500

Seen: 1,179 times

Last updated: Mar 07 '12