JenniferBuehler / gazebo-pkgs

A collection of tools and plugins for Gazebo
BSD 3-Clause "New" or "Revised" License
208 stars 104 forks source link

Is there any way to disable collisions from ros? #46

Closed davidrmdt closed 4 years ago

davidrmdt commented 4 years ago

Hi @JenniferBuehler I have been looking for a way to disable collisions or physics in gazebo in order to simulate drilling holes in a piece. I would like to be able to do this from python. But I haven't seen a solution. Do you know if there is a way for do this? Regards David

JenniferBuehler commented 4 years ago

Hi David, You could always create models without collision shapes, e.g. a wooden plank without a collision shape (only visual shape). However this has to be a static object then, otherwise it will just fall through the ground. Also, other obstacles which you may put on it will fall through then. Unless you make a hole into the collision shape where the robot is expected to drill (if that's a fixed spot). If I remember correctly, simulated laser scanners will also only see the collision shapes, but of that I'm currently not sure, would have to look it up / try out. A dirty trick would be to make the object part of the robot with disabled self collisions.

So it depends on your setup. What exactly are you trying to do?

davidrmdt commented 4 years ago

Hi, thanks for answering so fast. I have tried to use an STL with the hole for the collision object and it seems to work. But the grasping plugin now fails a lot and it doesn't attach the piece to the gripper (sometimes It works, but only a few). Can it be related to using a mesh?

JenniferBuehler commented 4 years ago

Hm, it could be related, was it a cube/sphere before? Mesh mesh collisions are generally a bit trickier/bugger, but it shouldn't be sooo bad as to fail that often. If it's a cube you're talking about, you could build the collision shape out of 4 cubes (leaving space in the middle) maybe? Would be worth a try at least to find out if that was the issue

davidrmdt commented 4 years ago

The piece is a cube. I have been changing values in the plugin, hopping to improve the results, but I haven't reached anything. Hmm, you give me an idea. Maybe creating a thin cover for the mesh it should work. I'm gonna try it

davidrmdt commented 4 years ago

Well, making a sandwich works jajaj. It's a dirty trick, but I don't see any other solution. Here is the result Captura de pantalla de 2020-11-20 12-44-38 Thank you very much Jen

JenniferBuehler commented 4 years ago

Awesome, glad it worked! I'll close this, if you have other questions please feel free to open a new issue or reopen this. Good luck with your project!