Replace large timeout (1024*1024*1024) using real-time clock timeout (10 seconds default)
Change SHARED_MEMORY_MAGIC_NUMBER to make sure server/client are using the same version (shared memory) add --realtimesimulation to physics server (GUI, VR) remove --G Xcode from build_cmake_pybullet_double.sh
This commit is contained in:
@@ -268,11 +268,13 @@ bool PhysicsClientSharedMemory::connect() {
|
||||
command.m_type = CMD_REQUEST_BODY_INFO;
|
||||
command.m_sdfRequestInfoArgs.m_bodyUniqueId = 37;
|
||||
submitClientCommand(command);
|
||||
int timeout = 1024 * 1024 * 1024;
|
||||
|
||||
|
||||
double startTime = clock.getTimeInSeconds();
|
||||
double timeOutInSeconds = 10;
|
||||
|
||||
const SharedMemoryStatus* status = 0;
|
||||
|
||||
while ((status == 0) && (timeout-- > 0))
|
||||
while ((status == 0) && (clock.getTimeInSeconds()-startTime < timeOutInSeconds))
|
||||
{
|
||||
status = processServerStatus();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user