Home | Tutorials | Wiki | Issues
Ask Your Question
0

Create an obstacle that cannot be stepped in

asked 2017-07-27 02:56:15 -0600

percyliu_ gravatar image

updated 2017-07-27 21:54:28 -0600

Hi there. I want to build a cuboid obstacle in front of a humanoid robot model in Gazebo. But when the robot steps on the obstacle, its feet are in the cuboid obstacle. How can I change the parameters so that the feet of the robot won't intersect the obstacle? Thanks in advance. image description

<?xml version='1.0'?>
<sdf version='1.6'>
  <model name='unit_box_0_1'>
    <link name='link'>
      <pose frame=''>0 0 0 0 -0 0</pose>
      <inertial>
        <mass>1</mass>
        <inertia>
          <ixx>0.166667</ixx>
          <ixy>0</ixy>
          <ixz>0</ixz>
          <iyy>0.166667</iyy>
          <iyz>0</iyz>
          <izz>0.166667</izz>
        </inertia>
        <pose frame=''>0 0 0 0 -0 0</pose>
      </inertial>
      <self_collide>0</self_collide>
      <kinematic>0</kinematic>
      <gravity>1</gravity>
      <visual name='visual'>
        <geometry>
          <box>
            <size>0.15 1 0.1</size>
          </box>
        </geometry>
        <material>
          <script>
            <name>Gazebo/Grey</name>
            <uri>file://media/materials/scripts/gazebo.material</uri>
          </script>
          <ambient>0.3 0.3 0.3 1</ambient>
          <diffuse>0.7 0.7 0.7 1</diffuse>
          <specular>0.01 0.01 0.01 1</specular>
          <emissive>0 0 0 1</emissive>
          <shader type='vertex'>
            <normal_map>__default__</normal_map>
          </shader>
        </material>
        <pose frame=''>0 0 0 0 -0 0</pose>
        <cast_shadows>1</cast_shadows>
        <transparency>0</transparency>
      </visual>
      <collision name='collision'>
        <laser_retro>0</laser_retro>
        <max_contacts>10</max_contacts>
        <pose frame=''>0 0 0 0 -0 0</pose>
        <geometry>
          <box>
            <size>0.15 1 0.1</size>
          </box>
        </geometry>
        <surface>
          <friction>
            <ode>
              <mu>1</mu>
              <mu2>1</mu2>
              <fdir1>0 0 0</fdir1>
              <slip1>0</slip1>
              <slip2>0</slip2>
            </ode>
            <torsional>
              <coefficient>1</coefficient>
              <patch_radius>0</patch_radius>
              <surface_radius>0</surface_radius>
              <use_patch_radius>1</use_patch_radius>
              <ode>
                <slip>0</slip>
              </ode>
            </torsional>
          </friction>
          <bounce>
            <restitution_coefficient>0</restitution_coefficient>
            <threshold>1e+06</threshold>
          </bounce>
          <contact>
            <collide_without_contact>0</collide_without_contact>
            <collide_without_contact_bitmask>1</collide_without_contact_bitmask>
            <collide_bitmask>1</collide_bitmask>
            <ode>
              <soft_cfm>0</soft_cfm>
              <soft_erp>0.2</soft_erp>
              <kp>1e+13</kp>
              <kd>1</kd>
              <max_vel>0.01</max_vel>
              <min_depth>0</min_depth>
            </ode>
            <bullet>
              <split_impulse>1</split_impulse>
              <split_impulse_penetration_threshold>-0.01</split_impulse_penetration_threshold>
              <soft_cfm>0</soft_cfm>
              <soft_erp>0.2</soft_erp>
              <kp>1e+13</kp>
              <kd>1</kd>
            </bullet>
          </contact>
        </surface>
      </collision>
    </link>
    <static>1</static>
    <allow_auto_disable>1</allow_auto_disable>
  </model>
</sdf>
edit retag flag offensive close merge delete

Comments

1

Would you mind posting the sdf of the cuboid? Does it have a collision element? http://sdformat.org/spec?ver=1.6&elem=collision

sloretz gravatar imagesloretz ( 2017-07-27 09:40:26 -0600 )edit

Thank you. I've already posted the code.

percyliu_ gravatar imagepercyliu_ ( 2017-07-27 19:21:27 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-08-01 04:19:30 -0600

Duckfrost gravatar image

Ok I just tested this box and it worked perfectly for me.
Here you have the video response of how to do this test: Here I leave the main things I used to test it and some system information:
Information System:
Ubuntu 14.04.5 trusty ROS Version: indigo Gazebo 7.4.0

I Created a Gazebo model with the code you posted: C:\fakepath\model.sdf And a "model.config"

Then I spawned it in a empty world: C:\fakepath\model.world

And then I used a simple spawn launch for sdfs: C:\fakepath\spawn_testobject_sdf.launch C:\fakepath\spawn_sdf.launch

I then used one robot I had to test the interaction, and it intercated perfectly, it didn't go through.

We need more info to get to the solution but, definetly is not the box. The problem may come from some world parameters, or from the robot itself. Maybe the meshes of the feet are to simple or don't have enough subdivisions in the mesh. Maybe its ultra heavy or maybe its something configured that avouds colisions with certain elements.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2017-07-27 02:52:28 -0600

Seen: 67 times

Last updated: Aug 01