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

tf frame_Id active all the time

asked 2019-03-07 07:26:54 -0600

Markus gravatar image

Hey there,

Example:

1) publish tf with frame_id = hallo1

2) stop publishing tf with frame_id hallo1

If I do:

print listener.frameExists("hallo1")

I will always get True as result even if this frame is not published anymore. If I do

 rostopic echo /tf |grep hallo1

I will only see the result for case 1) not for case 2)

How do I check if a tf target_frame is still published using rospy?

edit retag flag offensive close merge delete

Comments

1

Realistically, there is no concept of "still active" in TF, as there is no automatic decay of frames (RViz does something, but does it by itself).

Could you not check the stamp of the last available transform for the frame?

gvdhoorn gravatar image gvdhoorn  ( 2019-03-07 07:55:53 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-03-07 11:21:23 -0600

tfoote gravatar image

updated 2019-03-07 11:29:20 -0600

ahendrix gravatar image

The frame id still exists but the data is older. If you care about the specific time at which a frame is available you can query for a transform between it and its parent using a timestamp of zero. This will return the latest valid transform with the timestamp associated with that value. Then you can test for how old that transform is to determine if you consider it to have been stopped publishing.

The age at which something is determined to be not publishing anymore is application and situation specific.

I don't know your use case, but I suspect that you will be better served using canTransform queries than frameExists

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2019-03-07 07:26:54 -0600

Seen: 218 times

Last updated: Mar 07 '19