Binding coordinates to joints or links?

Hello community.
I made Exercise 1.2 in URDF, create MIRA robot.
So i made the entire exercise with binding coordinates to links and not joints, but strangely everything works just fine:

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

<material name="grey_transparent">
        <color rgba="0.5 0.5 0.5 0.6"/>
    </material>

<material name="grey">
        <color rgba="0.5 0.5 0.5 1"/>
    </material>   

<material name="white">
        <color rgba="1 1 1 0.3"/>
    </material>     

<material name="black">
        <color rgba="0 0 0 1"/>
    </material>     

 <material name="green">
        <color rgba="0 0.8 0 1"/>
    </material>

     <material name="red">
        <color rgba="1 0.2 0 1"/>
    </material>

    <material name="blue">
        <color rgba="0 0.5 1 1"/>
    </material>

    <link name="base_link">
        <visual>
        <origin rpy="0 0 0" xyz="0 0 0"/>
        <geometry>
            <cylinder radius="0.06" length="0.09"/>
        </geometry>
        <material name="grey_transparent"/>
        </visual>
    </link>
  
    <link name="roll_M1_link">
        <visual>
            <origin rpy="0 0 0" xyz="0 0 0"/>
            <geometry>
                <cylinder length="0.005" radius="0.01"/>
            </geometry>
           <material name="red"/>
        </visual>
    </link>
    
    <joint name="roll_joint" type="revolute">
        <parent link="base_link"/>
        <child link="roll_M1_link"/>
        <origin xyz="0.0023 0 -0.0005" rpy="0 0 0"/>
        <limit lower="-0.3" upper="0.3" effort="0.1" velocity="0.005"/>
        <axis xyz="1 0 0"/>
    </joint>

    <link name="pitch_M2_link">
        <visual>
        <origin rpy="0 1 0" xyz="0 0 0"/>
        <geometry>
            <cylinder length="0.005" radius="0.01"/>
        </geometry>
        <material name="green"/>
        </visual>
    </link>

  
    <joint name="pitch_joint" type="revolute">
        <parent link="roll_M1_link"/>
        <child link="pitch_M2_link"/>
        <origin xyz="0.0023 0 0.0005" rpy="0 0 0"/>
        <limit lower="-0.4" upper="0.8" effort="0.1" velocity="0.005"/>
        <axis xyz="0 1 0"/>
    </joint>

    <link name="yaw_M3_link">
        <visual>
        <origin rpy="0 0 0" xyz="0 0 0.02"/>
        <geometry>
        <cylinder length="0.005" radius="0.01"/>
        </geometry>
        <material name="blue"/>
        </visual>
         </link>

        <joint name="yaw_joint" type="revolute">
        <parent link="pitch_M2_link"/>
        <child link="yaw_M3_link"/>
        <origin xyz="0.0023 0 -0.0005" rpy="0 0 0"/>
        <limit lower="-0.8" upper="0.8" effort="0.1" velocity="0.005"/>
        <axis xyz="0 0 1"/>
    </joint>

    <link name="head_link">
        <visual>
        <origin rpy="0 0 0" xyz="0 0 0.06"/>
        <geometry>
        <sphere radius="0.06"/>
        </geometry>
        <material name="white"/>
        </visual>
    </link>

    <joint name="base_head_joint" type="fixed">
        <parent link="yaw_M3_link"/>
        <child link="head_link"/>
        <origin xyz="0.0023 0 -0.0005" rpy="0 0 0"/>
    </joint>

    <link name="left_eye_link">
        <visual>
        <origin rpy="-1.1 0 0" xyz="-0.01 0.053 0.09"/>
        <geometry>
        <cylinder radius="0.00525" length="0.00525"/>
        </geometry>
        <material name="black"/>
        </visual>
    </link>

    <joint name="head_lefteye_joint" type="fixed">
        <parent link="head_link"/>
        <child link="left_eye_link"/>
        <origin xyz="0.0023 0 -0.0005" rpy="0 0 0"/>
    </joint>
    
    <link name="right_eye_link">
        <visual>
        <origin rpy="-1.1 0 0" xyz="0.01 0.053 0.09"/>
        <geometry>
        <cylinder radius="0.00525" length="0.00525"/>
        </geometry>
        <material name="black"/>
        </visual>
    </link>

    <joint name="head_righteye_joint" type="fixed">
        <parent link="head_link"/>
        <child link="right_eye_link"/>
        <origin xyz="0.0023 0 -0.0005" rpy="0 0 0"/>
        <limit lower="-0.8" upper="0.8" effort="0.1" velocity="0.005"/>
        
    </joint>

    <link name="camera_link">
        <visual>
        <origin rpy="0 0 0" xyz="0 0.06 1.1"/>
        <geometry>
        <box size="0.005 0.005 0.005"/>
        </geometry>
        <material name="black"/>
        </visual>
    </link>

    <joint name="head_camera_joint" type="fixed">
        <parent link="head_link"/>
        <child link="camera_link"/>
        <origin xyz="0.0023 0 -0.0005" rpy="0 0 0"/>
    </joint>


  
</robot>

i understand that give coordinates to joint is more reasonable , because it can take couple links, but is that so important or its just a rule?

Hi,

I don’t quite get the question here, because you are using the normal joints that connect links. I must be missing something here, could elaborate?

you are right, dumb question.
sorry
pls delete this topic.

1 Like

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.