unstable soft body similation

Post Reply
Asiyeh
Posts: 7
Joined: Wed Aug 07, 2019 9:24 am

unstable soft body similation

Post by Asiyeh »

i want to simulate collision between a soft body and rigid body in pybullet. and here is my code

Code: Select all

import pybullet as p

physicsClient = p.connect(p.GUI)
p.setGravity(0,0,-.10)

bunnyId = p.loadSoftBody("bunny.obj")


p.setRealTimeSimulation(1)

shift = [0,0,0]
meshScale=[0.12,0.12,0.12]
pos = [0,.05,0]
ori = [ 0.707,0,0, 0.707]


visualShapeId = p.createVisualShape(shapeType=p.GEOM_MESH,fileName="head-tri.obj", rgbaColor=[1,1,1,1], 
                                    specularColor=[0.4,.4,0], visualFramePosition=shift, meshScale=meshScale)
collisionShapeId = p.createCollisionShape(shapeType=p.GEOM_MESH, fileName="head-tri.obj", 
                                          collisionFramePosition=shift,meshScale=meshScale
                                          )

p.createMultiBody(baseMass=0,baseInertialFramePosition=[0,0,0],baseCollisionShapeIndex=collisionShapeId, 
                   basePosition = pos, baseOrientation=ori)
which is work fine. but if i change soft body (now bunny) with another soft body object exportet from maya, its explode and fall apart.
so my question is how i should model and export to make it work.

another thing i notice is i cant move objects sometime in Example Browser but sometime i can, i wonder why this happening?
steven
Posts: 83
Joined: Mon Nov 05, 2018 8:16 am
Location: China

Re: unstable soft body similation

Post by steven »

Could you attach all your body object? thanks.
Asiyeh
Posts: 7
Joined: Wed Aug 07, 2019 9:24 am

Re: unstable soft body similation

Post by Asiyeh »

I dont know how can i do that. could you please give me some information?
steven
Posts: 83
Joined: Mon Nov 05, 2018 8:16 am
Location: China

Re: unstable soft body similation

Post by steven »

Could you email these object files to me, shengjun89@163.com? thanks.
Post Reply