disable the gMaxNumCmdPer1ms experiment by default (-1)
fix minitaur_evaluate.py script, quadruped.py
This commit is contained in:
@@ -48,7 +48,7 @@ bool gResetSimulation = 0;
|
||||
int gVRTrackingObjectUniqueId = -1;
|
||||
btTransform gVRTrackingObjectTr = btTransform::getIdentity();
|
||||
|
||||
int gMaxNumCmdPer1ms = 10;//experiment: add some delay to avoid threads starving other threads
|
||||
int gMaxNumCmdPer1ms = -1;//experiment: add some delay to avoid threads starving other threads
|
||||
int gCreateObjectSimVR = -1;
|
||||
int gEnableKukaControl = 0;
|
||||
btVector3 gVRTeleportPos1(0,0,0);
|
||||
|
||||
@@ -313,13 +313,15 @@ void MotionThreadFunc(void* userPtr,void* lsMemory)
|
||||
b3Clock::usleep(0);
|
||||
}
|
||||
|
||||
if (numCmdSinceSleep1ms>gMaxNumCmdPer1ms)
|
||||
if (gMaxNumCmdPer1ms>0)
|
||||
{
|
||||
BT_PROFILE("usleep(1000)");
|
||||
b3Clock::usleep(1000);
|
||||
numCmdSinceSleep1ms = 0;
|
||||
sleepClock.reset();
|
||||
}
|
||||
if (numCmdSinceSleep1ms>gMaxNumCmdPer1ms)
|
||||
{
|
||||
BT_PROFILE("usleep(10)");
|
||||
b3Clock::usleep(10);
|
||||
numCmdSinceSleep1ms = 0;
|
||||
sleepClock.reset();
|
||||
}
|
||||
if (sleepClock.getTimeMilliseconds()>1)
|
||||
{
|
||||
sleepClock.reset();
|
||||
|
||||
Reference in New Issue
Block a user