improve pybullet performance of loadURDF/SDF/MJCF and 'createCollisionShape'/'createMultiBody' for GUI/VR/SHARED_MEMORY,
use p.configureDebugVisualizer(p.COV_ENABLE_RENDERING,0) before loading and p.configureDebugVisualizer(p.COV_ENABLE_RENDERING,1) afterwards
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
|
||||
#include "PhysicsClientSharedMemory.h"
|
||||
#include"../ExampleBrowser/InProcessExampleBrowser.h"
|
||||
#include <stdio.h>
|
||||
|
||||
#include "PhysicsServerExampleBullet2.h"
|
||||
|
||||
@@ -52,12 +53,12 @@ public:
|
||||
}
|
||||
}
|
||||
{
|
||||
unsigned long int ms = m_clock.getTimeMilliseconds();
|
||||
if (ms>20)
|
||||
//unsigned long int ms = m_clock.getTimeMilliseconds();
|
||||
//if (ms>2)
|
||||
{
|
||||
B3_PROFILE("m_clock.reset()");
|
||||
// B3_PROFILE("m_clock.reset()");
|
||||
|
||||
m_clock.reset();
|
||||
// m_clock.reset();
|
||||
btUpdateInProcessExampleBrowserMainThread(m_data);
|
||||
}
|
||||
}
|
||||
@@ -165,7 +166,8 @@ public:
|
||||
// return non-null if there is a status, nullptr otherwise
|
||||
virtual const struct SharedMemoryStatus* processServerStatus()
|
||||
{
|
||||
//m_physicsServerExample->updateGraphics();
|
||||
printf("updating graphics!\n");
|
||||
m_physicsServerExample->updateGraphics();
|
||||
|
||||
unsigned long long int curTime = m_clock.getTimeMicroseconds();
|
||||
unsigned long long int dtMicro = curTime - m_prevTime;
|
||||
|
||||
@@ -4,7 +4,8 @@
|
||||
#define SHARED_MEMORY_KEY 12347
|
||||
///increase the SHARED_MEMORY_MAGIC_NUMBER whenever incompatible changes are made in the structures
|
||||
///my convention is year/month/day/rev
|
||||
#define SHARED_MEMORY_MAGIC_NUMBER 201706015
|
||||
#define SHARED_MEMORY_MAGIC_NUMBER 201707140
|
||||
//#define SHARED_MEMORY_MAGIC_NUMBER 201706015
|
||||
//#define SHARED_MEMORY_MAGIC_NUMBER 201706001
|
||||
//#define SHARED_MEMORY_MAGIC_NUMBER 201703024
|
||||
|
||||
|
||||
Reference in New Issue
Block a user