set a smaller dt for deformable_ball.py for stability and typo fix
This commit is contained in:
@@ -1642,7 +1642,6 @@ struct PhysicsServerCommandProcessorInternalData
|
|||||||
btAlignedObjectArray<btDeformableLagrangianForce*> m_lf;
|
btAlignedObjectArray<btDeformableLagrangianForce*> m_lf;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
btMultiBodyDynamicsWorld* m_dynamicsWorld;
|
btMultiBodyDynamicsWorld* m_dynamicsWorld;
|
||||||
|
|
||||||
int m_constraintSolverType;
|
int m_constraintSolverType;
|
||||||
@@ -1713,7 +1712,6 @@ struct PhysicsServerCommandProcessorInternalData
|
|||||||
m_deformablebodySolver(0),
|
m_deformablebodySolver(0),
|
||||||
#endif
|
#endif
|
||||||
m_dynamicsWorld(0),
|
m_dynamicsWorld(0),
|
||||||
m_deformablebodySolver(0),
|
|
||||||
m_constraintSolverType(-1),
|
m_constraintSolverType(-1),
|
||||||
m_remoteDebugDrawer(0),
|
m_remoteDebugDrawer(0),
|
||||||
m_stateLoggersUniqueId(0),
|
m_stateLoggersUniqueId(0),
|
||||||
@@ -8104,7 +8102,7 @@ bool PhysicsServerCommandProcessor::processLoadSoftBodyCommand(const struct Shar
|
|||||||
{
|
{
|
||||||
std::vector<tinyobj::shape_t> shapes;
|
std::vector<tinyobj::shape_t> shapes;
|
||||||
tinyobj::attrib_t attribute;
|
tinyobj::attrib_t attribute;
|
||||||
std::string err = tinyobj::LoadObj(attribute, shapes, out_found_filename.c_str(), "", fileIO);
|
std::string err = tinyobj::LoadObj(attribute, shapes, out_found_sim_filename.c_str(), "", fileIO);
|
||||||
if (!shapes.empty())
|
if (!shapes.empty())
|
||||||
{
|
{
|
||||||
const tinyobj::shape_t& shape = shapes[0];
|
const tinyobj::shape_t& shape = shapes[0];
|
||||||
@@ -8153,7 +8151,7 @@ bool PhysicsServerCommandProcessor::processLoadSoftBodyCommand(const struct Shar
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
else if (out_type == UrdfGeometry::FILE_VTK)
|
else if (out_sim_type == UrdfGeometry::FILE_VTK)
|
||||||
{
|
{
|
||||||
#ifndef SKIP_DEFORMABLE_BODY
|
#ifndef SKIP_DEFORMABLE_BODY
|
||||||
btDeformableMultiBodyDynamicsWorld* deformWorld = getDeformableWorld();
|
btDeformableMultiBodyDynamicsWorld* deformWorld = getDeformableWorld();
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ planeId = p.loadURDF("plane.urdf", [0,0,-2],planeOrn)
|
|||||||
boxId = p.loadURDF("cube.urdf", [0,3,2],useMaximalCoordinates = True)
|
boxId = p.loadURDF("cube.urdf", [0,3,2],useMaximalCoordinates = True)
|
||||||
|
|
||||||
ballId = p.loadSoftBody("ball.vtk", basePosition = [0,0,-1], scale = 0.5, mass = 0.1, useNeoHookean = 1, NeoHookeanMu = 20, NeoHookeanLambda = 20, NeoHookeanDamping = 0.001, useSelfCollision = 1, frictionCoeff = .5)
|
ballId = p.loadSoftBody("ball.vtk", basePosition = [0,0,-1], scale = 0.5, mass = 0.1, useNeoHookean = 1, NeoHookeanMu = 20, NeoHookeanLambda = 20, NeoHookeanDamping = 0.001, useSelfCollision = 1, frictionCoeff = .5)
|
||||||
|
p.setTimeStep(0.001)
|
||||||
p.setPhysicsEngineParameter(sparseSdfVoxelSize=0.25)
|
p.setPhysicsEngineParameter(sparseSdfVoxelSize=0.25)
|
||||||
p.setRealTimeSimulation(1)
|
p.setRealTimeSimulation(1)
|
||||||
|
|
||||||
|
|||||||
@@ -2460,7 +2460,7 @@ bool btSoftBody::checkDeformableFaceContact(const btCollisionObjectWrapper* colO
|
|||||||
// const btTransform& wtr = colObjWrap->getWorldTransform();
|
// const btTransform& wtr = colObjWrap->getWorldTransform();
|
||||||
btScalar dst;
|
btScalar dst;
|
||||||
|
|
||||||
#define USE_QUADRATURE 1
|
//#define USE_QUADRATURE 1
|
||||||
//#define CACHE_PREV_COLLISION
|
//#define CACHE_PREV_COLLISION
|
||||||
|
|
||||||
// use the contact position of the previous collision
|
// use the contact position of the previous collision
|
||||||
|
|||||||
Reference in New Issue
Block a user