Cannot spawn a model correctly in Gazebo despite looking good in RViz and check_urdf

asked 2020-06-19 06:20:57 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

I am having trouble loading the model in Gazebo using the urdf file. The model looks good in Rviz Viewer and while using the command check_urdf. The model I am trying to spawn is a humanoid model with 48 DoFs. I have checked the forum but to me, there aren't many queries asked supporting the biped robots.

What I did is,

The frames for two or more DoFs in the shoulder joint (say) has been loaded with dummy links. But I had set <mass> and <inertia> to the dummy links. Though for initial testing purposes, I am using the mass and inertia values as same for the dummy links and the actual links itself (Please correct me if I am wrong).

If I am trying to remove the dummy links from the model, I cannot view the model in Rviz. So I think I have no other go than keeping the dummy links to the urdf.

I am adding the reference images below:

Gazebo screenshot

image description

Rviz Screenshot

image description

Here, you can see only one link is visible in Gazebo. I don't know what the issue is. Can somebody help me with this? If so, it would be a great help for me to proceed. Also, if there's an alternate solution for this case, it would greatly help me.

I am attaching the sample of the URDF file below.

<robot name="human model">
<link name="Pelvis">
    <inertial>
        <mass value="6.032"/>
        <origin xyz="0           0     0.05412" rpy="0 0 0" />
        <inertia ixx="0.044245" iyy="0.017009" izz="0.050738" ixy="0" ixz="0" iyz="0"/>
    </inertial>
    <visual>
        <origin xyz="0           0     0.05412" rpy="0 0 0" />
        <geometry>
            <box size="0.1529      0.2785     0.10227"/>
        </geometry>
    </visual>
    <collision>
        <origin xyz="0           0     0.05412" rpy="0 0 0" />
        <geometry>
            <box size="0.1529      0.2785     0.10227"/>
        </geometry>
    </collision>
</link>
<link name="L5_f1">
    <inertial>
        <mass value="0"/>
        <origin xyz="0 0 0" rpy="0 0 0" />
        <inertia ixx="0" iyy="0" izz="0" ixy="0" ixz="0" iyz="0"/>
    </inertial>
</link>
<link name="L5">
    <inertial>
        <mass value="7.6908"/>
        <!--COM origin wrt jL5S1-->
        <origin xyz="0           0    0.045123" rpy="0 0 0" />
        <inertia ixx="0.026136" iyy="0.020203" izz="0.0359" ixy="0" ixz="0" iyz="0"/>
    </inertial>
    <visual>
        <origin xyz="0           0    0.045123" rpy="0 0 0" />
        <geometry>
            <box size="0.1529     0.18065    0.090247"/>
        </geometry>
    </visual>
    <collision>
        <origin xyz="0           0    0.045123" rpy="0 0 0" />
        <geometry>
            <box size="0.1529     0.18065    0.090247"/>
        </geometry>
    </collision>
</link>
<joint name="jL5S1_rotx" type="revolute">
    <origin xyz="-0.000609           0     0.10526" rpy="0 0 0"/>
    <parent link="Pelvis"/>
    <child link="L5_f1"/>
    <dynamics damping="0.1" friction="0.0"/>
    <limit effort="30" velocity="1.0" lower="-0.610865" upper="0.610865" />
    <axis xyz="1 0 0" />

</joint> <joint name="jL5S1_roty" type="revolute"> <origin xyz="0 0 0" rpy="0 0 0"/> <parent link="L5_f1"/> <child link="L5"/> <dynamics damping="0.1 ... (more)

edit retag flag offensive close merge delete

Comments

Could you share the URDF file? Then we could have some idea.

isaacasimov gravatar imageisaacasimov ( 2020-06-20 04:16:53 -0500 )edit

@isaacasimov I have edited the question with a sample of the URDF. Kindly check.

franklin_selva gravatar imagefranklin_selva ( 2020-06-20 08:41:17 -0500 )edit