fix pybullet build on some MSVC versions
This commit is contained in:
@@ -695,7 +695,7 @@ static PyObject* pybullet_getDynamicsInfo(PyObject* self, PyObject* args, PyObje
|
|||||||
int status_type = 0;
|
int status_type = 0;
|
||||||
b3SharedMemoryCommandHandle cmd_handle;
|
b3SharedMemoryCommandHandle cmd_handle;
|
||||||
b3SharedMemoryStatusHandle status_handle;
|
b3SharedMemoryStatusHandle status_handle;
|
||||||
|
struct b3DynamicsInfo info;
|
||||||
if (bodyUniqueId < 0)
|
if (bodyUniqueId < 0)
|
||||||
{
|
{
|
||||||
PyErr_SetString(SpamError, "getDynamicsInfo failed; invalid bodyUniqueId");
|
PyErr_SetString(SpamError, "getDynamicsInfo failed; invalid bodyUniqueId");
|
||||||
@@ -714,7 +714,7 @@ static PyObject* pybullet_getDynamicsInfo(PyObject* self, PyObject* args, PyObje
|
|||||||
PyErr_SetString(SpamError, "getDynamicsInfo failed; invalid return status");
|
PyErr_SetString(SpamError, "getDynamicsInfo failed; invalid return status");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
struct b3DynamicsInfo info;
|
|
||||||
if (b3GetDynamicsInfo(status_handle, &info))
|
if (b3GetDynamicsInfo(status_handle, &info))
|
||||||
{
|
{
|
||||||
PyObject* pyDynamicsInfo = PyTuple_New(2);
|
PyObject* pyDynamicsInfo = PyTuple_New(2);
|
||||||
@@ -1450,33 +1450,39 @@ static PyObject* pybullet_setJointMotorControlArray(PyObject* self, PyObject* ar
|
|||||||
for (i=0;i<numControlledDofs;i++)
|
for (i=0;i<numControlledDofs;i++)
|
||||||
{
|
{
|
||||||
double targetVelocity = 0.0;
|
double targetVelocity = 0.0;
|
||||||
|
double targetPosition = 0.0;
|
||||||
|
double force = 100000.0;
|
||||||
|
double kp = 0.1;
|
||||||
|
double kd = 1.0;
|
||||||
|
int jointIndex;
|
||||||
|
|
||||||
if (targetVelocitiesSeq)
|
if (targetVelocitiesSeq)
|
||||||
{
|
{
|
||||||
targetVelocity = pybullet_internalGetFloatFromSequence(targetVelocitiesSeq, i);
|
targetVelocity = pybullet_internalGetFloatFromSequence(targetVelocitiesSeq, i);
|
||||||
}
|
}
|
||||||
double targetPosition = 0.0;
|
|
||||||
if (targetPositionsSeq)
|
if (targetPositionsSeq)
|
||||||
{
|
{
|
||||||
targetPosition = pybullet_internalGetFloatFromSequence(targetPositionsSeq, i);
|
targetPosition = pybullet_internalGetFloatFromSequence(targetPositionsSeq, i);
|
||||||
}
|
}
|
||||||
|
|
||||||
double force = 100000.0;
|
|
||||||
if (forcesSeq)
|
if (forcesSeq)
|
||||||
{
|
{
|
||||||
force = pybullet_internalGetFloatFromSequence(forcesSeq, i);
|
force = pybullet_internalGetFloatFromSequence(forcesSeq, i);
|
||||||
}
|
}
|
||||||
double kp = 0.1;
|
|
||||||
if (kpsSeq)
|
if (kpsSeq)
|
||||||
{
|
{
|
||||||
kp = pybullet_internalGetFloatFromSequence(kpsSeq, i);
|
kp = pybullet_internalGetFloatFromSequence(kpsSeq, i);
|
||||||
}
|
}
|
||||||
double kd = 1.0;
|
|
||||||
if (kdsSeq)
|
if (kdsSeq)
|
||||||
{
|
{
|
||||||
kd = pybullet_internalGetFloatFromSequence(kdsSeq, i);
|
kd = pybullet_internalGetFloatFromSequence(kdsSeq, i);
|
||||||
}
|
}
|
||||||
|
|
||||||
int jointIndex = pybullet_internalGetFloatFromSequence(jointIndicesSeq, i);
|
jointIndex = pybullet_internalGetFloatFromSequence(jointIndicesSeq, i);
|
||||||
b3GetJointInfo(sm, bodyIndex, jointIndex, &info);
|
b3GetJointInfo(sm, bodyIndex, jointIndex, &info);
|
||||||
|
|
||||||
switch (controlMode)
|
switch (controlMode)
|
||||||
|
|||||||
Reference in New Issue
Block a user