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

Join type 'continuous' rotates around wrong axis in rviz

asked 2020-03-04 04:28:48 -0500

olga_pi gravatar image

updated 2020-03-04 06:08:08 -0500

gvdhoorn gravatar image

Hi! I'm following the urdf_tutorial and trying to make my own model. Link_2 and link_3 are connected through a joint of type continuous. I want the link_2 to rotate around the z axis, but somehow it rotates around the x axis. Even when I change <axis xyz="0 0 1"/> of the joint to <axis xyz="1 0 0"/>, or <axis xyz="0 1 0"/>, it still rotates only around the x axis. I don't get it what's wrong, because the code is very similar to that from the urdf_tutorial.

Thank you in advance!!! Here is the code.

<?xml version="1.0"?>
<robot name="my_robot">

  <link name="base_link"> 
    <visual>
       <geometry>
         <cylinder length="0.1" radius="1"/>
       </geometry>
    </visual>
  </link>

  <link name="link_2"> 
    <visual>
       <geometry>
          <box size="2 0.1 0.6"/>
       </geometry>
       <origin rpy="1.57075 0 0" xyz="0 0 0"/>
    </visual>
  </link>

  <joint name="base_to_link_2" type="fixed">
    <parent link="base_link"/>
  <child link="link_2"/>
  </joint>

  <link name="link_3"> 
    <visual>
       <geometry>
          <cylinder length="0.1" radius="0.3"/>
       </geometry>
       <material name="white"/>
    </visual>
  </link>

  <joint name="link_2_to_link_3" type="continuous">
     <parent link="link_2"/>
     <child link="link_3"/>
     <axiz rpy = "0 0 0" xyz="0 0 1"/>
     <origin rpy = "0 0 0" xyz="0 0 0"/>
  </joint>

</robot>
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-03-04 08:04:44 -0500

Delb gravatar image

You have a typo but I'm a little bit surprise as in the description of your problem you have the right syntax. Anyway I used your urdf and fixed the typo and everything was working normally, can you confirm that you are using the same urdf as the code given ?

So this :

<axiz rpy = "0 0 0" xyz="0 0 1"/>

Should be :

<axis xyz="0 0 1"/>

You can check the attributes and elements of your tags with the wiki.

edit flag offensive delete link more

Comments

OMG! Thank you sooooo much!!! The problem is solved!!! :D I didn't even notice this typo... (facepalm)

olga_pi gravatar image olga_pi  ( 2020-03-04 08:30:23 -0500 )edit

URDF only produces errors if you've forgotten to close something <axis xyz="0 0 0"> instead of the correct <axis xyz="0 0 0"/> It does not look at typos ect. Also, since Delb answered your question, please mark the answer as correct.

Joe28965 gravatar image Joe28965  ( 2020-03-04 09:00:31 -0500 )edit

Ok, Joe28965! Thank you for your answer! :)

olga_pi gravatar image olga_pi  ( 2020-03-04 09:11:43 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2020-03-04 04:28:48 -0500

Seen: 282 times

Last updated: Mar 04 '20