add sigaction handler to Example Browser, to always shutdown shared memory

make GUI_SERVER more reliable
next attempt to connect to SHARED_MEMORY in Gym envs, if available, before DIRECT/GUI
allow software rendering fallback, even if ER_BULLET_HARDWARE_OPENGL is chosen in getCameraImage
This commit is contained in:
Erwin Coumans
2017-09-13 13:30:16 -07:00
parent c250a5f0b9
commit 340a8f4704
6 changed files with 57 additions and 10 deletions

View File

@@ -440,13 +440,16 @@ static PyObject* pybullet_connectPhysicsServer(PyObject* self, PyObject* args, P
command = b3InitSyncBodyInfoCommand(sm);
statusHandle = b3SubmitClientCommandAndWaitStatus(sm, command);
statusType = b3GetStatusType(statusHandle);
#if 0
if (statusType != CMD_BODY_INFO_COMPLETED)
{
PyErr_SetString(SpamError, "b3InitSyncBodyInfoCommand failed.");
return NULL;
printf("Connection terminated, couldn't get body info\n");
b3DisconnectSharedMemory(sm);
sm = 0;
sPhysicsClients1[freeIndex] = 0;
sPhysicsClientsGUI[freeIndex] = 0;
sNumPhysicsClients++;
return -1;
}
#endif
}
}
return PyInt_FromLong(freeIndex);