Non-convex shape as a collisionBox for robot path planning

15 visualizaciones (últimos 30 días)
Johan Poccard
Johan Poccard el 25 de Sept. de 2020
Respondida: Bruno Luong el 13 de Abr. de 2021
Hi,
I am trying to import an .stl file in Matlab et set it up as a collisionBox for robot path planning.
My current code is:
cagePosition=[1 1 1];
cagedata=stlread('BLMcage.stl'); %STL needs to be binary
cage = collisionMesh(cagedata.Points);
cage.Pose=trvec2tform(cagePosition);
show(cage)
The problem is that the collisionMesh function only takes the vertices as argument and creates a convex shape based on those. It doesn't take each point as being part of the shape but puts some of them inside the shape so it can be convex. I know that some functions can read .stl files properly but this one seems to be the only one I can use to create a collisionBox from the .stl file.
Can someone find an alternate way of doing this ?
  2 comentarios
Ameer Hamza
Ameer Hamza el 26 de Sept. de 2020
I don't think that the robotic toolbox has any such function. Collision detection for non-convex shapes can be too computationally expensive. You may need to develop something yourself. This seems to be a good starting point: http://gamma.cs.unc.edu/PCOLLISION/papers/ICRA17.pdf
Johan Poccard
Johan Poccard el 28 de Sept. de 2020
Editada: Johan Poccard el 28 de Sept. de 2020
Ok that's too bad. I think I'll just try to recreate my non convex shape with multiple convex shapes then.
Thank you

Iniciar sesión para comentar.

Respuestas (2)

Yiping Liu
Yiping Liu el 13 de Abr. de 2021
The CollisionMesh is designed to convert any unconvex mesh into its convex hull. The reason for that is the checkCollsion function (based on libccd) only supports convex polytopes. One workaround is that you can try to split a nonconvex mesh into a set of convex meshes - but that's not a trivial task to automate that process.

Bruno Luong
Bruno Luong el 13 de Abr. de 2021
The MATLAB probably use GJK algorithm that requires convex shape.
You should split the object in sum of convex. I can recommend the v-hacd package, even there is no direct interface to MATLAB.

Categorías

Más información sobre Collision Detection en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by