Ask Your Question
0

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

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

Dmitry gravatar image

Hi! I want to transform set of points according to formula s*R.dot(xyz) + 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

Comments

Have you tried renormalising the quaternion?

gvdhoorn gravatar imagegvdhoorn ( 2020-01-27 07:03:22 -0600 )edit

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

Dmitry gravatar imageDmitry ( 2020-01-27 07:04:44 -0600 )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 imageDmitry ( 2020-01-27 07:44:23 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
1

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

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

Stats

Asked: 2020-01-27 06:51:21 -0600

Seen: 26 times

Last updated: Jan 27