Gazebo collision is not applied.

asked 2021-04-08 00:42:48 -0500

shoichi_hasegawa gravatar image

updated 2021-04-08 20:06:54 -0500

Hello, I created a layout using a room layout software called SweetHome3D (http://www.sweethome3d.com/ja/), exported it in obj file format. I then created a sdf/config file to use the layout in gazebo, and wrote the world file. I have described the collision correctly in the sdf file, but The laser from the robot's LRF penetrates the object. This causes an error on the terminal, where the obstacle cannot be detected.

If anyone knows anything about this, please Please give me some advice.

  • GPU:GeForce GTX 1660,
  • OS:Ubuntu 18.04LTS (Docker),
  • gazebo version:9.0.0, 9.16.0 (Tried them both)
  • File Constitution:sweet_home_3d > worlds(s1LDK_01.world), models >s1LDK_01 > meshes (s1LDK_01.mtl, s1LDK_01.obj, etc) , model.config, model.sdf

model.sdf↓

<?xml version='1.0'?>
<sdf version="1.5">
<model name="s1LDK_01">
  <static>true</static>
    <link name="link">
      <collision name="collision">
        <pose>-7.0 5.5 0.0 1.57 0 0</pose>
        <geometry>
          <mesh>
            <uri>model://s1LDK_01/meshes/s1LDK_01.obj</uri>
          </mesh>
        </geometry>
      </collision>
      <visual name="visual">
        <pose>-7.0 5.5 0.0 1.57 0 0</pose>
        <geometry>
          <mesh>
            <uri>model://s1LDK_01/meshes/s1LDK_01.obj</uri>
            <scale>0.01 0.01 0.01</scale>
          </mesh>
        </geometry>
      </visual>
    </link>
  </model>
</sdf>

s1LDK_01.world↓

<?xml version="1.0" ?>
<sdf version="1.5">
  <world name="s1LDK_01">
    <light name="sunny" type="point">
      <cast_shadows>1</cast_shadows>
      <pose>0 0 5 0 0 0</pose>
      <diffuse>0.8 0.8 0.8 1</diffuse>
      <specular>0.2 0.2 0.2 1</specular>
      <attenuation>
        <range>1000</range>
        <constant>0.9</constant>
        <linear>0.01</linear>
        <quadratic>0.001</quadratic>
      </attenuation>
      <direction>-0.5 0.1 -0.9</direction>
    </light>
    <physics type="ode">
      <max_step_size>0.001</max_step_size>
      <real_time_factor>1</real_time_factor>
      <real_time_update_rate>1000</real_time_update_rate>
      <gravity>0 0 -9.8</gravity>
    </physics>
    <include>
      <uri>model://sun</uri>
      <pose>0 0 5.0 0 0 0</pose>
    </include>
    <include>
      <uri>model://ground_plane</uri>
    </include>
    <include>
      <uri>model://s1LDK_01</uri>
      <static>true</static>
    </include> 
  </world>
</sdf>
edit retag flag offensive close merge delete