Page 1 of 1

Issue with loading a URDF file

Posted: Mon Jun 15, 2020 9:03 pm
by notbeyer
I'm having some issues getting my URDF file to load in properly; when I load any file that isn't prepackaged with PyBullet it seems to have no collision and just falls though the floor. So far I've tested this with a handful of files from my professor and some files I generated in MatLab (including the example they use in their URDF example) and all of them have the same behavior.
Additionally, I've tried reading the distance between the model and floor, i.e.

Code: Select all

 
conPts = p.getContactPoints(bodyA = walker,
                                bodyB = planeID)
closePts = p.getClosestPoints(bodyA = walker,
                                bodyB = planeID,
                                distance = .1) 
                                
But neither function seems to return anything, despite being run in the part of the code where I do simulation steps. I've also tried adding flags to the URDF file when I load it in, like:

Code: Select all

 
 walker = p.loadURDF("...",
                    basePosition = cubeStartPos, 
                    baseOrientation = cubeStartOrientation,
                    flags = p.URDF_USE_SELF_COLLISION_INCLUDE_PARENT|p.URDF_USE_SELF_COLLISION|p.URDF_MAINTAIN_LINK_ORDER)
Which still doesn't fix the issue.
One other thing I've noticed is that if I create objects within PyBullet (like with createMultiBody) then collision will work properly. Have any of y'all had this issue and if so, what am I missing here?

Re: Issue with loading a URDF file

Posted: Tue Jun 16, 2020 5:48 pm
by Erwin Coumans
I would recommend looking at all the various URDF files that come with PyBullet and compare with yours.

https://github.com/bulletphysics/bullet ... aster/data

https://github.com/bulletphysics/bullet ... ullet_data