Gazebo collision is not applied with SweetHome3D
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:Ubuntu18.04LTS (Docker)
- gazebo version:9.0.0, 9.16.0 (Tried them both)
- File Constitution:sweethome3d
> worlds(s1LDK01.world), models >s1LDK01 > meshes (s1LDK01.mtl, s1LDK01.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>
Asked by chickin_hassetchi on 2021-04-13 00:34:11 UTC
Comments
Try converting the collision mesh to STL. That might work better.
Asked by nlamprian on 2021-04-15 09:52:50 UTC
Thank you for your advice. I used this website (https://anyconv.com/ja/obj-to-stl-konbata/) to convert the OBJ file generated by SweetHome3D into a STL file.
However, the texture was not mapped and collison could not be applied.
Asked by chickin_hassetchi on 2021-04-20 07:16:21 UTC