fix load_soft_body.py example.
add optional flags in pybullet.resetSimulation. fix compile issue due to SKIP_DEFORMABLE_WORLD fix issue in .obj importer (todo: replace with tiny_obj_loader) todo: replace std::ifstream fs; by fileIO usage.
This commit is contained in:
@@ -1,24 +1,24 @@
|
||||
import pybullet as p
|
||||
from time import sleep
|
||||
|
||||
physicsClient = p.connect(p.DIRECT)
|
||||
|
||||
physicsClient = p.connect(p.GUI)
|
||||
p.setGravity(0, 0, -10)
|
||||
planeId = p.loadURDF("plane.urdf")
|
||||
boxId = p.loadURDF("cube.urdf", useMaximalCoordinates = True)
|
||||
bunnyId = p.loadSoftBody("bunny.obj")
|
||||
planeId = p.loadURDF("plane.urdf", [0,0,-2])
|
||||
boxId = p.loadURDF("cube.urdf", [0,3,2],useMaximalCoordinates = True)
|
||||
bunnyId = p.loadSoftBody("bunny.obj")#.obj")#.vtk")
|
||||
|
||||
#meshData = p.getMeshData(bunnyId)
|
||||
#print("meshData=",meshData)
|
||||
p.loadURDF("cube_small.urdf", [1, 0, 1])
|
||||
#p.loadURDF("cube_small.urdf", [1, 0, 1])
|
||||
useRealTimeSimulation = 1
|
||||
|
||||
if (useRealTimeSimulation):
|
||||
p.setRealTimeSimulation(1)
|
||||
|
||||
print(p.getDynamicsInfo(planeId, -1))
|
||||
print(p.getDynamicsInfo(bunnyId, 0))
|
||||
#print(p.getDynamicsInfo(bunnyId, 0))
|
||||
print(p.getDynamicsInfo(boxId, -1))
|
||||
|
||||
p.changeDynamics(boxId,-1,mass=10)
|
||||
while p.isConnected():
|
||||
p.setGravity(0, 0, -10)
|
||||
if (useRealTimeSimulation):
|
||||
|
||||
Reference in New Issue
Block a user