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

TF2 Transform Unpublished Frame

asked 2020-01-28 13:25:41 -0600

rklutz gravatar image

updated 2020-01-28 13:35:34 -0600

Pretty basic question regarding TF2. I have a static camera with a known transform from the base of my robot. With the camera I am detecting a marker in my scene and getting a transform from the camera to the marker. Without broadcasting this new transform frame, how do I find the transform from the base to the marker?

Sorry if this is obvious, but all the methods I can find (lookupTransform for example) don't seem to perform this. I realize I could manually write the math to make this transform but it seems that there is a more idiomatic way to accomplish this.

Thanks

edit retag flag offensive close merge delete

Comments

Not an answer, but would publishing the known transform as a static TF not be incredibly useful (and additionally make things like lookupTransform(..) and transformPose(..) work also)? If you're not publishing the transform for efficiency reasons: static transforms are only published once.

gvdhoorn gravatar image gvdhoorn  ( 2020-01-28 13:48:34 -0600 )edit

Well in my case the marker will potentially move during runtime so I can't use a static publisher. And yes, I was looking to avoid publishing for efficiency reasons. Thanks for the help!

rklutz gravatar image rklutz  ( 2020-01-28 14:53:31 -0600 )edit

I was referring to this:

I have a static camera with a known transform from the base of my robot.

but re-reading your question I see you want to avoid publishing the transform from camera to marker. Not from robot to camera.

gvdhoorn gravatar image gvdhoorn  ( 2020-01-28 15:00:12 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2020-01-28 16:55:05 -0600

tfoote gravatar image

If you express that transform in one of the linear math libraries, such as Eigen or Bullet. Then with your known transform from the base to the camera you can use the transform chaining by multiplication to compute the net transform.

Certainly you can do the math yourself too, but using one of the linear math libraries already supported will be much less likely to have errors.

edit flag offensive delete link more

Comments

Ok, so there isn't a more idiomatic way to accomplish this using only the TF2 library? I'm might just have to go that route then...

rklutz gravatar image rklutz  ( 2020-01-28 18:05:53 -0600 )edit

tf's API is designed to provide you with the ability to lookup transforms and interact well with whatever linear math library is of your preference. It's not designed to replace a linear math library.

tfoote gravatar image tfoote  ( 2020-01-28 18:13:12 -0600 )edit

[TF2] is not designed to replace a linear math library.

this is something I see many people assume actually.

It may be something that needs clarification.

gvdhoorn gravatar image gvdhoorn  ( 2020-01-29 03:27:50 -0600 )edit

Question Tools

2 followers

Stats

Asked: 2020-01-28 13:25:41 -0600

Seen: 266 times

Last updated: Jan 28 '20