Ask Your Question

displaying point cloud in rviz from .bag files, error

asked 2011-08-15 12:43:19 -0500

vincent gravatar image

I am trying to read .bag files, display the point cloud data in rviz.

rosbag play -l refined_point_clouds.bag 
[ INFO] [1313454488.757094980]: Opening refined_point_clouds.bag

Waiting 0.2 seconds after advertising topics... done.

Hit space to toggle paused, or 's' to step.
 [RUNNING]  Bag Time: 1284056763.769318   Duration: 1.105802 / 4.917923

But I got the following error, image description

saying that

For frame [narrow_stereo_optical_frame]: No transform to fixed frame [/base_link]. TF error: [You requested a transform that is -1284043982668.005 miliseconds in the past, but the most recent transform in the tf buffer is -1284043980431.589 miliseconds old. ]

The coordinate frame in rviz was set as

image description

The point cloud would appear correctly if i changed the fixed frame to /narrow_stereo_optical_frame.

The error seems related with the tf conversion time longer than the buffer can take.Confused... Could someone explain it to me? How can I avoid this problem, 'cuz I always stuck in this kind of problem... Thanks~

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2011-08-15 16:33:02 -0500

Zack gravatar image

updated 2011-08-15 16:37:50 -0500

Does the tf exists between the /base_link frame and /narrow_stereo_optical_frame?

You can verify this by adding "tf" in the rviz display, and checking the tf tree.

They should appear cascaded

/base_link (parent)

/narrow_stereo_optical_frame (child)

If it does exists try adding playing the rosbag with the clock command:

rosbag play -l refined_point_clouds.bag --clock

If that doesn't work, you might need to look at the actual setup from which the data was recorded.

edit flag offensive delete link more


i checked the tf tree, don't know why, but now there is no /narrow_stereo_optical_frame anymore, actually just 2 frames: /base_footprint and /odom_combined. I had to use another similar bag file, it showed that /base_link wasn't the parent frame, changed it to /base_footprint, worked. Thanks
vincent gravatar image vincent  ( 2011-08-16 01:16:33 -0500 )edit

answered 2011-08-15 18:38:34 -0500

Marco gravatar image

updated 2011-08-15 18:39:30 -0500

Did you record /tf in the bag? This is needed. The fact the timestamps are inconsistent could indicate some node is broadcasting a new /tf at the moment of playing. Might wanna kill nodes broadcasting /tf and then play the bag file (which should have of course recorded /tf besides your data).

edit flag offensive delete link more


i was using the bag files from grasp playpen dataset, which was well recorded and have /tf in it. And no other nodes was broadcasting /tf in my case
vincent gravatar image vincent  ( 2011-08-16 00:56:00 -0500 )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


Asked: 2011-08-15 12:43:19 -0500

Seen: 2,886 times

Last updated: Aug 15 '11