Ask Your Question
0

rospy tf get frame_id of trans, rot

asked 2019-03-07 02:44:11 -0600

Markus gravatar image

updated 2019-03-07 02:56:07 -0600

Hey there,

Assume I have three tf's:

1): marker_1 relative to world

2): marker_2 relative to world

3): marker_3 relative to world

Now I want to get the marker name that is closest to marker_1. Is there a direct function in rospy to get this or do I have to iterate over all frame_id of the tf and thereby find it out?

Thanks :)

edit retag flag offensive close merge delete

Comments

2

To the best of my knowledge you'll have to make this function yourself. This is not the primary purpose of the TF system

PeteBlackerThe3rd gravatar image PeteBlackerThe3rd  ( 2019-03-07 03:33:31 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2019-03-19 06:14:56 -0600

fvd gravatar image

updated 2019-03-19 06:20:08 -0600

Pete's comment should have been an answer, so just to take this out of the Unanswered queue: No, you'll have to iterate through them and check the distances yourself.

Note that you can use the tf2 (and tf) data types to calculate the distance and save yourself a little bit of conversion trouble. See here.

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

2 followers

Stats

Asked: 2019-03-07 02:44:11 -0600

Seen: 86 times

Last updated: Mar 19 '19