PyBullet: avoid calling syncBodies for each DOF in pdControl.

Allow PD_CONTROL in setJointMotorControlArray.
This commit is contained in:
erwincoumans
2018-11-07 09:29:19 -08:00
parent d414224d96
commit 49b098854e
3 changed files with 16 additions and 9 deletions

View File

@@ -89,7 +89,11 @@ B3_SHARED_API int executePluginCommand_pdControlPlugin(struct b3PluginContext* c
{
MyPDControlContainer* obj = (MyPDControlContainer*)context->m_userPointer;
obj->m_api.syncBodies();
if (arguments->m_numInts == 0)
{
obj->m_api.syncBodies();
return -1;
}
int numObj = obj->m_api.getNumBodies();
//printf("numObj = %d\n", numObj);