build a named tuple for 'getConnectionInfo'
remove debug code
This commit is contained in:
@@ -3003,39 +3003,7 @@ int PhysicsServerCommandProcessor::createBodyInfoStream(int bodyUniqueId, char*
|
|||||||
bool PhysicsServerCommandProcessor::processCommand(const struct SharedMemoryCommand& clientCmd, struct SharedMemoryStatus& serverStatusOut, char* bufferServerToClient, int bufferSizeInBytes )
|
bool PhysicsServerCommandProcessor::processCommand(const struct SharedMemoryCommand& clientCmd, struct SharedMemoryStatus& serverStatusOut, char* bufferServerToClient, int bufferSizeInBytes )
|
||||||
{
|
{
|
||||||
// BT_PROFILE("processCommand");
|
// BT_PROFILE("processCommand");
|
||||||
int szc = sizeof(SharedMemoryCommand);
|
|
||||||
int sz = sizeof(SharedMemoryStatus);
|
|
||||||
|
|
||||||
int sz1 = sizeof(BulletDataStreamArgs);
|
|
||||||
int sz2 = sizeof(SdfLoadedArgs);
|
|
||||||
int sz3 = sizeof(SendActualStateArgs);//30k
|
|
||||||
int sz4= sizeof(SendDebugLinesArgs);
|
|
||||||
int sz5= sizeof(SendPixelDataArgs);
|
|
||||||
int sz6 = sizeof(RigidBodyCreateArgs);
|
|
||||||
int sz7 = sizeof(CalculateInverseDynamicsResultArgs);
|
|
||||||
int sz8 = sizeof(CalculateJacobianResultArgs);
|
|
||||||
int sz9 = sizeof(CalculateMassMatrixResultArgs);//130k
|
|
||||||
int sz10 = sizeof(SendContactDataArgs);
|
|
||||||
int sz11 = sizeof(SendOverlappingObjectsArgs);
|
|
||||||
int sz12 = sizeof(CalculateInverseKinematicsResultArgs);
|
|
||||||
int sz13 = sizeof(SendVisualShapeDataArgs);
|
|
||||||
int sz14 = sizeof(UserDebugDrawResultArgs);
|
|
||||||
int sz15 = sizeof(b3UserConstraint);
|
|
||||||
int sz16 = sizeof(SendVREvents);
|
|
||||||
int sz17 = sizeof(SendKeyboardEvents);
|
|
||||||
int sz18 = sizeof(SendRaycastHits);
|
|
||||||
int sz19 = sizeof(StateLoggingResultArgs);
|
|
||||||
int sz20 = sizeof(b3OpenGLVisualizerCameraInfo);
|
|
||||||
int sz21 = sizeof(b3ObjectArgs);
|
|
||||||
int sz22 = sizeof(b3DynamicsInfo);
|
|
||||||
int sz23 = sizeof(b3CreateCollisionShapeResultArgs);
|
|
||||||
int sz24 = sizeof(b3CreateVisualShapeResultArgs);
|
|
||||||
int sz25 = sizeof(b3CreateMultiBodyResultArgs);
|
|
||||||
int sz26 = sizeof(b3SendCollisionInfoArgs);
|
|
||||||
int sz27 = sizeof(SendMouseEvents);
|
|
||||||
int sz28 = sizeof(b3LoadTextureResultArgs);
|
|
||||||
int sz29 = sizeof(b3CustomCommandResultArgs);
|
|
||||||
|
|
||||||
bool hasStatus = false;
|
bool hasStatus = false;
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -509,6 +509,7 @@ static PyObject* pybullet_getConnectionInfo(PyObject* self, PyObject* args, PyOb
|
|||||||
int isConnected=0;
|
int isConnected=0;
|
||||||
int method=0;
|
int method=0;
|
||||||
PyObject* pylist = 0;
|
PyObject* pylist = 0;
|
||||||
|
PyObject* val = 0;
|
||||||
b3PhysicsClientHandle sm = 0;
|
b3PhysicsClientHandle sm = 0;
|
||||||
static char* kwlist[] = {"physicsClientId", NULL};
|
static char* kwlist[] = {"physicsClientId", NULL};
|
||||||
if (!PyArg_ParseTupleAndKeywords(args, keywds, "|i", kwlist, &physicsClientId))
|
if (!PyArg_ParseTupleAndKeywords(args, keywds, "|i", kwlist, &physicsClientId))
|
||||||
@@ -525,10 +526,8 @@ static PyObject* pybullet_getConnectionInfo(PyObject* self, PyObject* args, PyOb
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pylist = PyTuple_New(2);
|
val = Py_BuildValue("{s:i,s:i}","isConnected", isConnected, "connectionMethod", method);
|
||||||
PyTuple_SetItem(pylist, 0, PyInt_FromLong(isConnected));
|
return val;
|
||||||
PyTuple_SetItem(pylist, 1, PyInt_FromLong(method));
|
|
||||||
return pylist;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -948,19 +947,10 @@ static PyObject* pybullet_setPhysicsEngineParameter(PyObject* self, PyObject* ar
|
|||||||
{
|
{
|
||||||
b3PhysicsParamSetDefaultFrictionERP(command,frictionERP);
|
b3PhysicsParamSetDefaultFrictionERP(command,frictionERP);
|
||||||
}
|
}
|
||||||
//ret = b3PhysicsParamSetRealTimeSimulation(command, enableRealTimeSimulation);
|
|
||||||
|
|
||||||
statusHandle = b3SubmitClientCommandAndWaitStatus(sm, command);
|
statusHandle = b3SubmitClientCommandAndWaitStatus(sm, command);
|
||||||
}
|
}
|
||||||
#if 0
|
|
||||||
b3SharedMemoryCommandHandle b3InitPhysicsParamCommand(b3PhysicsClientHandle physClient);
|
|
||||||
int b3PhysicsParamSetGravity(b3SharedMemoryCommandHandle commandHandle, double gravx, double gravy, double gravz);
|
|
||||||
int b3PhysicsParamSetTimeStep(b3SharedMemoryCommandHandle commandHandle, double timeStep);
|
|
||||||
int b3PhysicsParamSetDefaultContactERP(b3SharedMemoryCommandHandle commandHandle, double defaultContactERP);
|
|
||||||
int b3PhysicsParamSetNumSubSteps(b3SharedMemoryCommandHandle commandHandle, int numSubSteps);
|
|
||||||
int b3PhysicsParamSetRealTimeSimulation(b3SharedMemoryCommandHandle commandHandle, int enableRealTimeSimulation);
|
|
||||||
int b3PhysicsParamSetNumSolverIterations(b3SharedMemoryCommandHandle commandHandle, int numSolverIterations);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
Py_INCREF(Py_None);
|
Py_INCREF(Py_None);
|
||||||
return Py_None;
|
return Py_None;
|
||||||
|
|||||||
Reference in New Issue
Block a user