gazebosim / gazebo-classic

Gazebo classic. For the latest version, see https://github.com/gazebosim/gz-sim
http://classic.gazebosim.org/
Other
1.15k stars 478 forks source link

Gazebo cannot handle collada files as collision mesh #2072

Open osrf-migration opened 7 years ago

osrf-migration commented 7 years ago

Original report (archived issue) by Stephan Opfer (Bitbucket: Stopfer).

The original report had attachments: floorplan.dae, floorplan.stl


Hi

I created a collada mesh (Floorplan.dae) which drives gazebo crazy. It is loadable and gazebo does not crash, but when I spawn a TurtleBot on it, the TurtleBot gets twisting wheels and is hovering and hopping around.

Here are some more details: http://answers.gazebosim.org/question/14591/why-does-my-custom-collada-mesh-makes-the-turtlebot-wheels-twist/

I am using Gazebo 7.0.0 with ROS Kinetic under Ubuntu 16.04 LTS.

The collada file in question is attached.

Greetings, Stephan

osrf-migration commented 7 years ago

Original comment by Steve Peters (Bitbucket: Steven Peters, GitHub: scpeters).


There are often multiple equivalent ways to represent a collision geometry. For example, you have represented that floorpan with a triangle-mesh, but it could also be represented with a collection of boxes. I think gazebo's collision engine would work much better if it was expressed as boxes.

You may also be interested in the building editor, which is a graphical interface for drawing walls and floorpans, which happens to generate box shapes so that gazebo's collision engine is happier.

osrf-migration commented 7 years ago

Original comment by Stephan Opfer (Bitbucket: Stopfer).


Hi Steven,

the building editor cannot open a building again, in order to make adjustments in it. So that is no option for me.

Currently I transformed the collada mesh into stl format and don't get problems anymore. I simply imported the .dae file in meshlab and exported it to .stl.

If collada makes problems for the collision engine, is there a tutorial/documentation that mentions the option of using .stl files as alternative?

Greetings, Stephan

osrf-migration commented 7 years ago

Original comment by Steve Peters (Bitbucket: Steven Peters, GitHub: scpeters).


We do support collada files but maybe there's a bug in the parser? Do the STL files have the same triangulation?

osrf-migration commented 7 years ago

Original comment by Stephan Opfer (Bitbucket: Stopfer).


The .stl file created from the .dae file with simple import export via meshlab.

osrf-migration commented 7 years ago

Original comment by Stephan Opfer (Bitbucket: Stopfer).


Here is the .stl file. I don't expect it to have another triangulation than the collada format, but you never know...

osrf-migration commented 7 years ago

Original comment by Stefan Kohlbrecher (Bitbucket: Stefan_Kohlbrecher).


I also found that .dae files are buggy when used for collision geometry. As mentioned before, converting to .stl fixes the issue, so as a standard procedure I'd recommend never using .dae collision geom, instead always using a mesh converted to .stl (or using primitives instead to be faster).

/edit: I think I observed issues with .daes that contain different materials/groups internally, so maybe the loader gets confused by those.

syedjawadakhtar commented 1 month ago

Thanks @Stefan_Kohlbrecher. I think the bug still exists. I have been trying to spawn a URDF robot on the Collada file mesh and it never stayed still. Converting the .dae file to .stl and using .stl as collision mesh and .dae file as the visual mesh solved the problem.