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

How to change the positive direction of coordinates for links?

asked 2021-04-11 02:30:29 -0500

xiaozhenghong gravatar image

updated 2021-04-11 02:32:26 -0500

jayess gravatar image

I want the make the coordinates be the same as real robot ,but I cannot find where can I achieve this. I guess by changing some factors in urdf file will be useful. Could you tell where can I change the positive direction of coordinates. Here is part of the urdf file. Please take base link's coordinate as an example.Thx!

<link

    name="base_link">

    <inertial>

      <origin

        xyz="2.33471583537977E-06 0.00662907239788253 1.33004670421342"

        rpy="0 0 0" />

      <mass

        value="25.8577669048994" />

      <inertia

        ixx="0.267014137924139"

        ixy="-1.36584455424997E-05"

        ixz="4.24690442718128E-07"

        iyy="0.472244407235779"

        iyz="5.34065558451065E-05"

        izz="0.549554614712028" />

    </inertial>

    <visual>

      <origin

        xyz="0 0 0"

        rpy="0 0 0" />

      <geometry>

        <mesh

          filename="package://dscr5_6/meshes/base_link.STL" />

      </geometry>

      <material

        name="">

        <color

          rgba="0.298039215686275 0.298039215686275 0.298039215686275 1" />

      </material>

    </visual>

    <collision>

      <origin

        xyz="0 0 0"

        rpy="0 0 0" />

      <geometry>

        <mesh

          filename="package://dscr5_6/meshes/base_link.STL" />

      </geometry>

    </collision>

  </link>

  <link

    name="rlink1">

    <inertial>

      <origin

        xyz="-3.48537472660837E-07 -0.0233818482234878 -0.0427896937411072"

        rpy="0 0 0" />

      <mass

        value="4.9503936266377" />

      <inertia

        ixx="0.0280328872192691"

        ixy="-1.09421874885135E-08"

        ixz="8.01870940105599E-08"

        iyy="0.0290016533494644"

        iyz="0.00182600668247838"

        izz="0.0175058159650953" />

    </inertial>

    <visual>

      <origin

        xyz="0 0 0"

        rpy="0 0 3.14" />

      <geometry>

        <mesh

          filename="package://dscr5_6/meshes/rlink1.STL" />

      </geometry>

      <material

        name="">

        <color

          rgba="1 1 1 1" />

      </material>

    </visual>

    <collision>

      <origin

        xyz="0 0 0"

        rpy="0 0 0" />

      <geometry>

        <mesh

          filename="package://dscr5_6/meshes/rlink1.STL" />

      </geometry>

    </collision>

  </link>

  <joint

    name="rjoint1"

    type="revolute">

    <origin

      xyz="-0.384999999999999 0 1.33"

      rpy="3.14 1.57 0" />

    <parent

      link="base_link" />

    <child

      link="rlink1" />

    <axis

      xyz="0 0 1" />

    <limit

      lower="-3.14"

      upper="3.14"

      effort="60"

      velocity="2.088" />

  </joint>
edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
1

answered 2021-04-11 07:04:59 -0500

tryan gravatar image

It depends how you want to change the axes. You can rotate them as a whole, but you can't change them relative to each other. For example, you can't reverse the direction of the x-axis without also reversing y or z, which would constitute a 180° rotation. This is because, as stated in REP 103, all coordinate systems are right-handed, and reversing only one axis would make it left-handed.

If you want to rotate the whole frame, use the rpy attribute in the elements you want to rotate. Have you looked through the URDF tutorials? The Building a Visual Robot Model with URDF from Scratch tutorial involves rotating links.

If I missed the point of your question, please clarify what you would like to know.

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2021-04-11 02:30:29 -0500

Seen: 577 times

Last updated: Apr 11 '21