Issue with loading a URDF file

Official Python bindings with a focus on reinforcement learning and robotics.
Post Reply
notbeyer
Posts: 1
Joined: Mon Jun 15, 2020 8:54 pm

Issue with loading a URDF file

Post 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?
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA
Contact:

Re: Issue with loading a URDF file

Post 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
Post Reply