Home | Tutorials | Wiki | Issues
Ask Your Question
0

my collision is not working

asked 2019-09-20 07:37:09 -0500

danielzeng gravatar image

updated 2019-09-22 11:14:19 -0500

Hello everyone, I am new to gazebo, so I am not very familiar with gazebo.

My problem is about collision. I have put on <collision> tag in my urdf-file ( a hand model ), but the little finger still can run into my Palm.

The following is my code, and the bottom is the video.

<link name="hand_base"> is my palm, <link name="finger5"> is the little finger's first part, <link name="finger5_1"> is the little finger's second part.

https://gist.github.com/pythongo1/11d...

  <link name="hand_base">
    <visual>
      <origin xyz="0 0.061515 0" rpy="0 0 0"/>
      <geometry>
      <mesh filename="package://rrbot_description/meshes/hand_base_group_version8_final.dae" scale="1 1 1"/>
      </geometry>
      <material name="black"/>
    </visual>

    <collision>
      <origin xyz="0 0.061515 0" rpy="0 0 0"/>
      <geometry>
      <mesh filename="package://rrbot_description/meshes/hand_base_group_version8_final.dae" scale="1 1 1"/>
      </geometry>
    </collision>

    <inertial>
      <origin xyz="0 0 0"/>
      <mass value="1"/>
      <inertia ixx="0.01" ixy="0.0" ixz="0.0" iyy="0.01" iyz="0.0" izz="0.01"/>
    </inertial>
  </link>


  <joint name="hand_base_to_finger5" type="continuous">
    <parent link="hand_base"/>
    <child link="finger5"/>
    <origin xyz="-0.03075 0.1099 -0.005841" rpy="0 ${2*PI/360*7} ${2*PI/360*6}"/>

    <axis xyz="1 0 0"/>        
    <limit effort="30" velocity="1"/>
  </joint>

  <link name="finger5">
    <visual>
      <origin xyz="0 0.019427 0"/>
      <geometry>
        <mesh filename="package://rrbot_description/meshes/finger5_shell.dae" scale="1 1 1"/>
      </geometry>
      <material name="black"/>
    </visual>

    <collision>
      <origin xyz="0 0.019427 0"/>
      <geometry>
        <mesh filename="package://rrbot_description/meshes/finger5_shell.dae" scale="1 1 1"/>
      </geometry>
    </collision>

    <inertial>
      <origin xyz="0 0 0"/>
      <mass value="1"/>
      <inertia ixx="0.01" ixy="0.0" ixz="0.0" iyy="0.01" iyz="0.0" izz="0.01"/>
    </inertial>
  </link>

  <joint name="finger5_to_finger5_1" type="continuous">
    <parent link="finger5"/>
    <child link="finger5_1"/>
    <origin xyz="0 0.0355 0" rpy="0 0 0"/>

    <axis xyz="1 0 0"/>
    <limit effort="30" velocity="1"/>
  </joint>

  <link name="finger5_1">
    <visual>
      <origin xyz="0 0.017182 0" rpy="0 0 0"/>   
      <geometry>
        <mesh filename="package://rrbot_description/meshes/finger5_end.dae" scale="1 1 1"/>
      </geometry>  
      <material name="black"/>
    </visual>

    <collision>
      <origin xyz="0 0.017182 0" rpy="0 0 0"/>   
      <geometry>
        <mesh filename="package://rrbot_description/meshes/finger5_end.dae" scale="1 1 1"/>
      </geometry>  
    </collision>

    <inertial>
      <origin xyz="0 0 0"/>
      <mass value="1"/>
      <inertia ixx="0.01" ixy="0.0" ixz="0.0" iyy="0.01" iyz="0.0" izz="0.01"/>
    </inertial>
  </link>

This is the video.

https://youtu.be/rfyfUmKTd70

Thank you for your answer. Thanks.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-09-23 04:58:16 -0500

kumpakri gravatar image

updated 2019-09-26 04:19:06 -0500

You can try specifying the self collide property inside gazebo tags

<gazebo reference="link_name">
    <selfCollide>true</selfCollide>
    ...
</gazebo>
edit flag offensive delete link more

Comments

Hello, sorry so late to reply to you.

I use your method, and it really works!!!

The little finger does not go into my Palm.

Thank you very much . You help me a lot !!

danielzeng gravatar imagedanielzeng ( 2019-09-26 07:05:22 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2019-09-20 07:33:34 -0500

Seen: 40 times

Last updated: Sep 26