Ask Your Question

RViz show /cloud in xx.bag with outside /tf

asked 2019-07-20 23:16:30 -0600

wlsdx gravatar image

updated 2019-07-23 19:54:05 -0600

Hi, I want to display the /cloud in a bag file with an outside /tf topic. The frame_id of the cloud message is "laser". /tf describes a rotation of "laser" around the y axis of "base_link". "base_link" is designed to be the fixed frame.

In RViz, either /tf or /cloud can be displayed correctly alone. But when running tf node along with xx.bag and setting the fixed frame to be "base_link", only the tf movement is displayed. I've tried setting the fixed frame to be "laser". The cloud and tf can be displayed in that case, but it's different from what is designed.

When the fixed frame is "base_link", there's an error in transform:

Transform [sender=unknown_publisher]

For frame [laser]:No transform to fixed frame [base_link]. TF error:[Lookup would require extrapolation into the future. Requested time 1562899456.147298211 but the latest data is at time 0.000000000, when looking up transform from frame [laser] to frame [base_link]]

The param use_sim_time was set to be true. And the bag file was played in rosbag play --clock xx.bag. But the error didn't change. The time stamp I use in tf is rospy.Time(0)

It seems like a problem of time, but when the fixed frame is "laser", tf and cloud can be displayed simultaneously. What's the problem here? Thanks for any help.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2019-07-25 09:23:16 -0600

wlsdx gravatar image

updated 2019-07-25 09:23:39 -0600

It's a silly problem. The time stamp I used for every tf msg was rospy.Time(0). It should be rospy.get_rostime().

edit flag offensive delete link more

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: 2019-07-20 23:16:30 -0600

Seen: 142 times

Last updated: Jul 25 '19