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

Revision history [back]

click to hide/show revision 1
initial version

The answer is to edit the urdf file.

There is an issue with your collision tags can't be put inertial tag in it (check here to see which elements are required for each tag). I had to copy all the inertial tags and paste into the link tags and the collision tags I had to fill by copy the code from visual tag.

The answer is to edit the urdf file.

There is an issue with your collision tags can't be put inertial tag in it (check here to see which elements are required for each tag). I had to copy all the inertial tags and paste into the link tags and the collision tags I had to fill by copy the code from visual tag.

My working version of my URDF is at the and of the "question". The launch file is ok.

click to hide/show revision 3
No.3 Revision

The answer is to edit the urdf file.

There is an issue with your collision tags can't be put inertial tag in it (check here to see which elements are required for each tag). I had to copy all the inertial tags and paste into the link tags and the collision tags I had to fill by copy the code from visual tag.


My working version Edit:

I made a mistake: I put <inertial /> into <collision />. I paste the finally vesion of my URDF is at the and of the "question". The launch file is ok. urdf:

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


    <link name="base_link">
     <collision>
        <geometry>
                <box size="0.6 0.3 0.3"/>
            </geometry>
            <material name="silver">
                <color rgba="0.75 0.75 0.75 1"/>
            </material>
    </collision>
    <inertial>
            <mass value="1.0"/>
            <inertia ixx="0.015" iyy="0.0375" izz="0.0375" ixy="0" ixz="0" iyz="0"/>
        </inertial>    
        <visual>
            <geometry>
                <box size="0.6 0.3 0.3"/>
            </geometry>
            <material name="silver">
                <color rgba="0.75 0.75 0.75 1"/>
            </material>
        </visual>

    </link>

    <link name="front_caster">
       <collision>
            <geometry>
                    <box size="0.1 0.1 0.3"/>
            </geometry>
            <material name="silver"/>
        </collision>
        <inertial>
                <mass value="0.1"/>
                <inertia ixx="0.00083" iyy="0.00083" izz="0.000167" ixy="0" ixz="0" iyz="0"/>
        </inertial>
        <visual>
            <geometry>
                    <box size="0.1 0.1 0.3"/>
            </geometry>
            <material name="silver"/>
        </visual>       
    </link>


    <joint name="front_caster_joint" type="continuous">
        <axis xyz="0 0 1"/>
        <parent link="base_link"/>
        <child link="front_caster"/>
        <origin rpy="0 0 0" xyz="0.3 0 0"/>
    </joint>


    <link name="front_wheel">
        <collision>
       <geometry>
                <cylinder length="0.05" radius="0.035"/>
            </geometry>
            <material name="black"/>
        </collision>
         <inertial>
            <mass value="0.1"/>
            <inertia ixx="5.1458e-5" iyy="5.1458e-5" izz="6.125e-5" ixy="0" ixz="0" iyz="0"/>
        </inertial>
        <visual>
            <geometry>
                <cylinder length="0.05" radius="0.035"/>
            </geometry>
            <material name="black"/>
        </visual>
    </link>



    <joint name="front_wheel_joint" type="continuous">
        <axis xyz="0 0 1"/>
        <parent link="front_caster"/>
        <child link="front_wheel"/>
        <origin rpy="-1.5708 0 0" xyz="0.05 0 -.15"/>
    </joint>


    <link name="right_wheel">
        <collision>
             <geometry>
                <cylinder length="0.05" radius="0.035"/>
            </geometry>
            <material name="black">
                <color rgba="0 0 0 1"/>
            </material>
        </collision>
         <inertial> 
            <mass value="0.1"/>
            <inertia ixx="5.1458e-5" iyy="5.1458e-5" izz="6.125e-5" ixy="0" ixz="0" iyz="0"/>
        </inertial>
        <visual>
            <geometry>
                <cylinder length="0.05" radius="0.035"/>
            </geometry>
            <material name="black">
                <color rgba="0 0 0 1"/>
            </material>
        </visual>
    </link>


    <joint name="right_wheel_joint" type="continuous">
        <axis xyz="0 0 1"/>
        <parent link="base_link"/>
        <child link="right_wheel"/>
        <origin rpy="-1.5708 0 0" xyz="-0.2825 -0.125 -.15"/>
    </joint>


    <link name="left_wheel">
        <collision>
            <geometry>
                <cylinder length="0.05" radius="0.035"/>
            </geometry>
        </collision>
        <inertial>
            <mass value="0.1"/>
            <inertia ixx="5.1458e-5" iyy="5.1458e-5" izz="6.125e-5" ixy="0" ixz="0" iyz="0"/>
        </inertial>
        <visual>
            <geometry>
                <cylinder length="0.05" radius="0.035"/>
            </geometry>
            <material name="black"/>
        </visual>
    </link>

    <joint name="left_wheel_joint" type="continuous">
        <axis xyz="0 0 1"/>
        <parent link="base_link"/>
        <child link="left_wheel"/>
        <origin rpy="-1.5708 0 0" xyz="-0.2825 0.125 -.15"/>
    </joint>
</robot>