# How to create a joint with two DOF (using URDF)

Hello,

I have scanned the internet for answers regarding this issue, but it is not clear to me how to resolve it. I would like to ask how it is possible to create a joint of two DOF (y - continuous and z - revolute). To be more particular, I would like to create two joints, one for wheel spin and one for steering at around the same coordinate location. I have written the following part of URDF code to implement it:

  <link name="link_FR_wheel">
<inertial>
<mass value="0.5"/>
<origin rpy="0 1.5707 1.5707" xyz="0 0 0"/>
<inertia ixx="0.000975" ixy="0" ixz="0" iyy="0.000975" iyz="0" izz="0.000225"/>
</inertial>
<origin rpy="0 1.5707 1.5707" xyz="0 0 0"/>
<geometry>
</geometry>
</collision>
<origin rpy="0 1.5707 1.5707" xyz="0 0 0"/>
<geometry>
</geometry>
</visual>

<joint name="joint_FR_wheel" type="continuous">
<origin rpy="0 0 0" xyz="0.045 -0.0575 0.0"/>
<axis rpy="0 0 0" xyz="0 1 0"/>
<limit effort="5" velocity="10"/>
<joint_properties damping="0.0" friction="0.0"/>
</joint>

<joint name="joint_FR_steering" type="revolute">
<origin rpy="0 0 0" xyz="0.047 -0.0570 0.0"/>
<axis rpy="0 0 0" xyz="0 0 1"/>
<limit lower = "-0.2" upper = "0.2" effort="5" velocity="3"/>
<joint_properties damping="0.0" friction="0.0"/>
</joint>


where link_chassis is the chassis of the RC car and link_FR_wheel is the FR wheel. This URDF code does not work, showing the following error when I spawn the robot in Gazebo:

This robot has a joint named "joint_FR_steering" which is not in the gazebo model.


Moreover, when I open my URDF robot in rviz, I get the following warning:

Joint state with name: "joint_FR_steering" was received but not found in URDF


I have seen solutions about creating dummy links but it is not clear to me how it works.

edit retag close merge delete