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

# Rotation in static transform publisher

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" />


edit retag close merge delete

Sort by ยป oldest newest most voted

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?

more

Oh really, there's no way at all. The idea is to specify the laser frame with respect to the base_link.
( 2012-01-25 20:31:00 -0500 )edit
1
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.
( 2012-01-26 01:41:50 -0500 )edit

## Stats

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

Seen: 2,394 times

Last updated: Jan 25 '12