PyBullet IK: backward compatible changes related to joint damping
This commit is contained in:
@@ -8166,14 +8166,16 @@ static PyObject* pybullet_calculateInverseKinematics(PyObject* self,
|
|||||||
|
|
||||||
if (szJointDamping > 0)
|
if (szJointDamping > 0)
|
||||||
{
|
{
|
||||||
if (szJointDamping != dofCount)
|
if (szJointDamping < dofCount)
|
||||||
{
|
{
|
||||||
PyErr_SetString(SpamError,
|
printf("calculateInverseKinematics: the size of input joint damping values should be equal to the number of degrees of freedom, not using joint damping.");
|
||||||
"calculateInverseKinematics the size of input joint damping values is unequal to the number of degrees of freedom.");
|
|
||||||
return NULL;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
if (szJointDamping != dofCount)
|
||||||
|
{
|
||||||
|
printf("calculateInverseKinematics: the size of input joint damping values should be equal to the number of degrees of freedom, ignoring the additonal values.");
|
||||||
|
}
|
||||||
int szInBytes = sizeof(double) * szJointDamping;
|
int szInBytes = sizeof(double) * szJointDamping;
|
||||||
int i;
|
int i;
|
||||||
jointDamping = (double*)malloc(szInBytes);
|
jointDamping = (double*)malloc(szInBytes);
|
||||||
|
|||||||
Reference in New Issue
Block a user