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:
@@ -278,7 +278,7 @@ class MinitaurBulletEnv(gym.Env):
|
||||
nearVal=0.1, farVal=100.0)
|
||||
(_, _, px, _, _) = self._pybullet_client.getCameraImage(
|
||||
width=RENDER_WIDTH, height=RENDER_HEIGHT, viewMatrix=view_matrix,
|
||||
projectionMatrix=proj_matrix)
|
||||
projectionMatrix=proj_matrix, renderer=pybullet.ER_BULLET_HARDWARE_OPENGL)
|
||||
rgb_array = np.array(px)
|
||||
rgb_array = rgb_array[:, :, :3]
|
||||
return rgb_array
|
||||
|
||||
@@ -82,7 +82,7 @@ class MJCFBaseBulletEnv(gym.Env):
|
||||
(_, _, px, _, _) = p.getCameraImage(
|
||||
width=self._render_width, height=self._render_height, viewMatrix=view_matrix,
|
||||
projectionMatrix=proj_matrix,
|
||||
#renderer=p.ER_BULLET_HARDWARE_OPENGL
|
||||
renderer=p.ER_BULLET_HARDWARE_OPENGL
|
||||
)
|
||||
rgb_array = np.array(px)
|
||||
rgb_array = rgb_array[:, :, :3]
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user