Ask Your Question
0

how to rotate before translate

asked 2018-09-18 10:21:55 -0500

lanlan gravatar image

hi, i am new to ros, tf new i need to build a transformation, the parameter for the rotation and translation has already been known, but i wonder how to rotate the frame before translate it, will sendTransform() consider the order? Thank you very much!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2018-09-18 17:12:23 -0500

lucasw gravatar image

updated 2018-09-18 17:17:06 -0500

You'll need two transforms instead of one, the first with the rotation and then a child one with the translation, and sendTransform them both.

Instead of parent -> child frame you'll have parent -> intermediate rotated child -> child frame, but any tf lookup can ignore the intermediate frame by looking up from parent to child and they'll see the combined proper rotation-then-translation transform.

Or you could do some matrix math to transform the translation in the rotated frame into the parent frame.

edit flag offensive delete link more

Comments

that's exactly what i did finally, thank you very much!

lanlan gravatar imagelanlan ( 2018-09-18 19:03:23 -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

2 followers

Stats

Asked: 2018-09-18 10:21:55 -0500

Seen: 100 times

Last updated: Sep 18 '18