In simulate, by default, keep updating profiler and sensor figures in Pause mode. Add UI option to disable.

PiperOrigin-RevId: 564710460
Change-Id: I893535e258ec2485d2ec997ecadfbdafba05bb99
This commit is contained in:
Yuval Tassa
2023-09-12 07:05:26 -07:00
committed by Copybara-Service
parent 2f14a7c102
commit 48eb75ae92
2 changed files with 7 additions and 4 deletions
+3 -2
View File
@@ -14,6 +14,7 @@
#include "simulate.h"
#include <algorithm>
#include <atomic>
#include <chrono>
#include <cstdio>
@@ -1638,8 +1639,8 @@ void Simulate::Sync() {
return;
}
bool update_profiler = this->profiler && (this->run || !this->m_);
bool update_sensor = this->sensor && (this->run || !this->m_);
bool update_profiler = this->profiler && (this->pause_update || this->run);
bool update_sensor = this->sensor && (this->pause_update || this->run);
for (int i = 0; i < m_->njnt; ++i) {
std::optional<std::pair<mjtNum, mjtNum>> range;