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

static transformation publisher

asked 2015-04-27 06:19:32 -0500

RSA_kustar gravatar image

updated 2015-04-27 06:28:03 -0500

I want to do a static transformation

the actual frame is in x forward y right z up the new frame if x forward y left and z up

I want to do transformation from the new to the actual frame using the static publish


 <node pkg="tf" type="static_transform_publisher" name="laser" args="0 0 0 x y z w  /uav/base_link_ENU /laser  100"/>


What should I replace the x y z and w
And do I need to have a listener ??

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2015-04-27 08:16:45 -0500

gvdhoorn gravatar image

x y z w is only used if you want to specify orientation using a quaternion. If you want to use Euler angles, you can use the other parameter order. From the static_transform_publisher:

Usage: static_transform_publisher x y z yaw pitch roll frame_id child_frame_id  period (milliseconds)

Note the order ypr instead of the often used rpy.

edit flag offensive delete link more


Thank you :)

RSA_kustar gravatar image RSA_kustar  ( 2015-04-28 02:44:07 -0500 )edit

Make sure to use radians for the yaw, pitch and roll.

malharjajoo gravatar image malharjajoo  ( 2018-04-10 10:06:18 -0500 )edit

@gvdhoorn Can I know what are the advantages and disadvantages of using Euler over Quaternions?

AM97 gravatar image AM97  ( 2019-09-15 13:49:19 -0500 )edit

This would be a rather broad discussion @AM97.

One of the biggest advantages of quaternions would be they don't suffer from gimbal lock and have a single unique representation and interpretation. Euler angles both suffer from gimbal lock and have at least 12 different orders of rotation (note @malharjajoo's comment about the order of rotations).

For more, I'd refer you to sites like wikipedia (for a quick overview) or the relevant (math) literature.

gvdhoorn gravatar image gvdhoorn  ( 2019-09-16 02:39:02 -0500 )edit

@gvdhoorn I understand why we are using Quaternions. But I would also like to know what are the benefits if I use Eulers?. P.S I know to avoid Gimbal lock is one of the main reason to use Quaternions even though they are little complex. I am just curious to know what will be advantages if we use euler in robotics?

I think we can keep track of when you approach a singularity (gimbal lock). In the singularity, angles may flip instantaneously from 90 to -90 degrees but although it would be difficult in the real world.

AM97 gravatar image AM97  ( 2019-09-16 03:34:10 -0500 )edit

The advance of Euler is: It is easier to imagine rotation around the three axes z y x, than to imagine Quaternions.

Lennart gravatar image Lennart  ( 2020-05-19 05:42:26 -0500 )edit

Question Tools


Asked: 2015-04-27 06:19:32 -0500

Seen: 22,925 times

Last updated: Apr 27 '15