ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A answers.ros.org

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

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 close merge delete

Have you tried renormalising the quaternion?

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

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

( 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.

( 2020-01-27 07:44:23 -0600 )edit

Sort by ยป oldest newest most voted

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.

more

Thanks for the clarification. Just a small comment: in linear algebra "homogeneous" means mapping zero to zero. What you mean here is "unitary".

( 2021-07-21 08:07:48 -0600 )edit