Robotics StackExchange | Archived questions

relationship between tf rotation and translation ?

 $rosrun tf tf_echo /map /odom
 At time 1263248513.809
 - Translation: [2.398, 6.783, 0.000]
 - Rotation: in Quaternion [0.000, 0.000, -0.707, 0.707]
             in RPY [0.000, -0.000, -1.570]

<node pkg="tf" type="static_transform_publisher" name="link_broadcaster" args="0.1 0 0.3 -1.571 0 1.571 base_link laser 25" />,

can I break it down into two statictransformpublisher as fellows:

<node pkg="tf" type="static_transform_publisher" name="link1_broadcaster" args="0.1 0 0.3 0 0 0 temp_link laser 25" />

<node pkg="tf" type="static_transform_publisher" name="link2_broadcaster" args="0 0 0 -1.571 0 1.571 base_link temp_link 25" />

Is that a right decomposition?

And how about :

<node pkg="tf" type="static_transform_publisher" name="link1_broadcaster" args="0 0 0 -1.571 0 1.571 temp_link laser 25" />

<node pkg="tf" type="static_transform_publisher" name="link2_broadcaster" args="0.1 0 0.3 0 0 0 base_link temp_link 25" />

Any help is appreciated. Thank you in advance.

Asked by chengwei on 2016-08-28 22:11:35 UTC

Comments

The translation is applied first, then the rotation (as it would be in a standard 4x4 transformation matrix in homogeneous coordinates). Rather than use static_transform_publisher, why not create a URDF and then run robot_state_publisher and joint_state_publisher to publish the transforms?

Asked by Mark Rose on 2016-08-31 10:51:56 UTC

Hi, Mark Rose, Thanks for your reply ! I'll take a look at URDF,but I still don't understand the defference between overall and decomposition about static_transform_publisher as above. If you know the difference ,would you tell me something about it.Thank you in advance!

Asked by chengwei on 2016-09-08 02:01:15 UTC

If you create a URDF model, you then use robot_state_publisher and joint_state_publisher to jointly publish the status transforms. You don't need static_transform_publisher unless you have some other transform that isn't reflected in the URDF. The standard frame is X forward, Y left, Z up.

Asked by Mark Rose on 2016-09-08 02:48:05 UTC

Hi,Mark Rose,I have tried to use robot_state_publisher in stead of static_transform_publisher . I learned the urdf tutorial, but I have some question about the robot_state_publisher .

Asked by chengwei on 2016-09-11 01:58:54 UTC

my test.urdf

<robot name="test_robot">
              <link name="base_link" />
              <link name="optical_link" />     
          <joint name="joint1" type="fixed">
            <parent link="base_link"/>
            <child link="optical_link"/>
            <origin xyz="0 0 0" rpy="0 1.57 0.5"

Asked by chengwei on 2016-09-11 01:59:29 UTC

my launch file is as fellows:

<launch>
              <param name="robot_description" command="cat $(find r2d2)/test.urdf" />
             <node name="robot_state_publisher" pkg="robot_state_publisher" type="state_publisher" />

      </launch>

Asked by chengwei on 2016-09-11 02:02:22 UTC

I run the launch file rosrun r2d2 test.launch , but I don't get the TF use rostopic echo /tf,The screen output as follows

transforms: []

transforms: []

transforms: []

Asked by chengwei on 2016-09-11 02:08:29 UTC

hey mark, from my understanding the rotation is applied first and then the translation takes place on the new axis.

Asked by Ridhwanluthra on 2018-06-02 02:39:40 UTC

Answers