Ask Your Question

What is the best way to send transform (with scale)?

asked 2020-01-27 07:00:08 -0500

Dmitry gravatar image

Hi! I want to transform set of points according to formula s* + t

Because of implementation details i want to make multiplication s*R and send "scaled" rotation via /tf.

But while converting "scaled" rotation (s*R) to quaternions i'm getting TF_DENORMALIZED_QUATERNION error So, the question is: how to scale R properly? Or what is the best way to send transform with scale? P.S. s is a scalar

edit retag flag offensive close merge delete


Have you tried renormalising the quaternion?

gvdhoorn gravatar image gvdhoorn  ( 2020-01-27 07:03:22 -0500 )edit

Oh, no. I'll try that. Thank you!

Dmitry gravatar image Dmitry  ( 2020-01-27 07:04:44 -0500 )edit

I did it. After renormalizing (via transformations.union_vector) i'm getting wrong result when applying rotation. For now, I decided to created new message type (StampedFloat) and send it separately from R and t transformation.

Dmitry gravatar image Dmitry  ( 2020-01-27 07:44:23 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2020-01-27 16:25:28 -0500

tfoote gravatar image

You cannot send non-normalized transforms (rotations or translations) via tf. It's designed to keep track of coordinate frames in space and apply transforms to data. A scaling operation is not generally applicable to transforming between coordinate frames where we keep all data in units of meters according to REP 103. So we limit the system to homogeneous transformations.

Since your scaling operation is semantically significant you should do that before or after you operate on the data and then make sure that the data is then observably different between the two states.

To your direct question if you want to send a transform with scale you can create a message to capture any sort of transform representation that you want and send it through a topic.

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: 2020-01-27 06:51:21 -0500

Seen: 167 times

Last updated: Jan 27 '20