Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reduced_deformable_cube.py doesn't work #4625

Open
yuki-sato109 opened this issue Jun 10, 2024 · 0 comments
Open

reduced_deformable_cube.py doesn't work #4625

yuki-sato109 opened this issue Jun 10, 2024 · 0 comments

Comments

@yuki-sato109
Copy link

yuki-sato109 commented Jun 10, 2024

I executed the following code, but it didn't work as expected. The code is from GitHub. What could be the cause?
`
import pybullet as p
from time import sleep
import pybullet_data

physicsClient = p.connect(p.GUI)

p.setAdditionalSearchPath(pybullet_data.getDataPath())

p.resetSimulation(p.RESET_USE_REDUCED_DEFORMABLE_WORLD)
p.resetDebugVisualizerCamera(4,-40,-30,[0, 0, 0])
p.setGravity(0, 0, -10)

tex = p.loadTexture("uvmap.png")
planeId = p.loadURDF("plane.urdf", [0,0,-2])

boxId = p.loadURDF("cube.urdf", [1,1,5],useMaximalCoordinates = True)
cube = p.loadURDF("reduced_cube/reduced_cube.urdf", [1,1,1])

p.changeVisualShape(cube, -1, rgbaColor=[1,1,1,1], textureUniqueId=tex, flags=0)
p.setPhysicsEngineParameter(sparseSdfVoxelSize=0.25)
p.setRealTimeSimulation(0)

while p.isConnected():
p.stepSimulation()
p.getCameraImage(320,200)
p.setGravity(0,0,-10)
`

The error is shown below the code.

`
b3Printf: URDF file 'reduced_cube/reduced_cube.urdf' not found

Traceback (most recent call last):
File "/home/ericlab/デスクトップ/sato/cloth-penetration-example/reduced_cube.py", line 19, in
cube = p.loadURDF("reduced_cube/reduced_cube.urdf", [1,1,1])
pybullet.error: Cannot load URDF file.
`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant