Open TFLQW opened 4 years ago
Hi,
This is a problem with the underlying simulator pybullet
. When you load a mesh through the World
or Simulator
class, you have a flag that you can set. Here is the documentation:
if flag = `sim.GEOM_FORCE_CONCAVE_TRIMESH` (=1), this will create a concave static triangle mesh. This should not be used with dynamic/moving objects, only for static (mass=0) terrain.
If you set the flag to 1, it should solve your problem but you will not be able to rotate it in the simulator (check in the simulator using your mouse by dragging the object when setting the flag to 0 or 1, you will have a different behavior). If you want it to be dynamic however you will have to create a URDF file. I wanted to implement it in the code but I didn't have the time to do it yet. But it should not be too difficult to implement it using the functions that are in the utils
folder, specifically:
meshlab
. For creating the URDF, there are two ways:
URDFParser
class (in https://github.com/robotlearn/pyrobolearn/blob/master/pyrobolearn/utils/parsers/robots/urdf_parser.py) to generate a URDF file from the Tree
data structure.FYI, I was also interested to implement the peg-in-hole problem but at the moment, I don't have so much time. Let me know how it goes.
Best, Brian
@bdelhaisse Thanks for your answer, I try to use blender with a plugin could construc the model collision model (.obj), but it cannot perform the shape of the hole precisely. I also ask the same question on bullet3 package https://github.com/bulletphysics/bullet3/issues/2531, but i couldn't found those parameters in your load_urdf() function, just in load_mesh() that sim.GEOM_FORCE_CONCAVE_TRIMESH is ok.
@bdelhaisse And I have another question on the coliision problem. When the robot (i used UR5) collide with the hole or something else. I will be in chaos, it is out of control. Is that maybe something wrong with the arm joint damping parameters is too small. Sould I change some parameters of the joint or something else?
@bdelhaisse Thanks for your answer, I try to use blender with a plugin could construc the model collision model (.obj), but it cannot perform the shape of the hole precisely. I also ask the same question on bullet3 package https://github.com/bulletphysics/bullet3/issues/2531, but i couldn't found those parameters in your load_urdf() function, just in load_mesh() that sim.GEOM_FORCE_CONCAVE_TRIMESH is ok. I have the same question,can you solve the question?
I have got the urdf model of a hole from solidworks, and also a mesh file of the hole. But when i try to assemble the peg into the hole. I found the collision shape of the hole is cylinder which is solid not contain the hole of the cylinder. Could you tell me how to confige this stl model or use which of software to config this property
this is that model stl hole_f.STL.tar.gz