mirror of
https://github.com/bulletphysics/bullet3
synced 2024-12-14 05:40:05 +00:00
fix pybullet inversekinematics argument order (O/i)
add spinning friction to some tutorial
This commit is contained in:
parent
3bcdd29bf5
commit
3bdc60c050
@ -36,6 +36,9 @@ static btScalar gBoxRestitution = 0; // set box restitution to 0
|
||||
static btScalar gSphereFriction = 1; // set sphere friction to 1
|
||||
|
||||
static btScalar gSphereRollingFriction = 1; // set sphere rolling friction to 1
|
||||
static btScalar gSphereSpinningFriction = 0.3; // set sphere spinning friction to 0.3
|
||||
|
||||
|
||||
|
||||
static btScalar gSphereRestitution = 0; // set sphere restitution to 0
|
||||
|
||||
@ -149,6 +152,16 @@ void InclinedPlaneExample::initPhysics()
|
||||
m_guiHelper->getParameterInterface()->registerSliderFloatParameter(slider);
|
||||
}
|
||||
|
||||
{ // create slider to change the sphere rolling friction
|
||||
SliderParams slider("Sphere Spinning",&gSphereSpinningFriction);
|
||||
slider.m_minVal=0;
|
||||
slider.m_maxVal=2;
|
||||
slider.m_clampToNotches = false;
|
||||
slider.m_callback = onSphereRestitutionChanged;
|
||||
m_guiHelper->getParameterInterface()->registerSliderFloatParameter(slider);
|
||||
}
|
||||
|
||||
|
||||
{ // create slider to change the sphere restitution
|
||||
SliderParams slider("Sphere Restitution",&gSphereRestitution);
|
||||
slider.m_minVal=0;
|
||||
@ -240,6 +253,8 @@ void InclinedPlaneExample::initPhysics()
|
||||
gSphere->setFriction(gSphereFriction);
|
||||
gSphere->setRestitution(gSphereRestitution);
|
||||
gSphere->setRollingFriction(gSphereRollingFriction);
|
||||
gSphere->setSpinningFriction(gSphereSpinningFriction);
|
||||
|
||||
}
|
||||
|
||||
m_guiHelper->autogenerateGraphicsObjects(m_dynamicsWorld);
|
||||
|
@ -5521,7 +5521,7 @@ static PyObject* pybullet_calculateInverseKinematics(PyObject* self,
|
||||
PyObject* jointDampingObj = 0;
|
||||
|
||||
static char* kwlist[] = {"bodyIndex", "endEffectorLinkIndex", "targetPosition", "targetOrientation", "lowerLimits", "upperLimits", "jointRanges", "restPoses", "jointDamping", "physicsClientId", NULL};
|
||||
if (!PyArg_ParseTupleAndKeywords(args, keywds, "iiO|OOOOOiO", kwlist, &bodyIndex, &endEffectorLinkIndex, &targetPosObj, &targetOrnObj, &lowerLimitsObj, &upperLimitsObj, &jointRangesObj, &restPosesObj, &jointDampingObj, &physicsClientId))
|
||||
if (!PyArg_ParseTupleAndKeywords(args, keywds, "iiO|OOOOOOi", kwlist, &bodyIndex, &endEffectorLinkIndex, &targetPosObj, &targetOrnObj, &lowerLimitsObj, &upperLimitsObj, &jointRangesObj, &restPosesObj, &jointDampingObj, &physicsClientId))
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user