Ask Your Question

Rotation in static transform publisher

asked 2012-01-25 18:43:16 -0600

alfa_80 gravatar image

updated 2012-01-25 19:00:29 -0600

This is a basic question. I'm a little bit confused how should I assign one of my last three argument below in order to flip or rotate by 180 degree of the z-axis of the parent frame while the other axis remains unchanged. I mean, the z-axis of the frames are opposite in their directions. I wonder if, there is any possibility that I can simply negate the value of the z-axis. The problem I'm currently having is that, if I apply/set a rotation of 180 deg(in which 3.142) about y-axis, then, x-axis will be negated and the same goes to if a apply it about x-axis.

<node pkg="tf" type="static_transform_publisher" name="base_link_to_laser"  
  args="0.0 0.0 0.0 0.0 0.0 0.0 /base_link /laser  40" />

Thanks in advance.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2012-01-25 19:29:20 -0600

dornhege gravatar image

You cannot do that.

The reason is that when you just flip the z-axis you will transform a right-handed into a left-handed coordinate system, thus not having a simple euclidian transform, but actually a mirroring.

The other question would be: Why do you want to do that? Judging from the name, you just want a base link to laser transform, which shouldn't require this. Maybe you just got the wrong idea about how you want to transform?

edit flag offensive delete link more


Oh really, there's no way at all. The idea is to specify the laser frame with respect to the base_link.
alfa_80 gravatar image alfa_80  ( 2012-01-25 20:31:00 -0600 )edit
Yes, but I think you have the wrong idea of what you want to do. Switching only one axis would mean that the physical laser is mirrored, which is impossible. If you have a photo or drawing of your robot/the frames involved, it should be simple to give you the correct transform.
dornhege gravatar image dornhege  ( 2012-01-26 01:41:50 -0600 )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


Asked: 2012-01-25 18:43:16 -0600

Seen: 1,794 times

Last updated: Jan 25 '12