Do not update qacc_warmstart at the end of the solver call; instead, update it at the same time as all other state variables. This change makes mj_forward idempotent.
See changelog herein for motivation and discussion. PiperOrigin-RevId: 797392841 Change-Id: If50e9f09e1d07e8363169d3589c32097aeca2432
This commit is contained in:
committed by
Copybara-Service
parent
bf04103b6f
commit
c7a82c32dc
@@ -1922,8 +1922,8 @@ void Simulate::Sync(bool state_only) {
|
||||
return;
|
||||
}
|
||||
|
||||
bool update_profiler = this->profiler && (this->pause_update || this->run);
|
||||
bool update_sensor = this->sensor && (this->pause_update || this->run);
|
||||
bool update_profiler = this->profiler;
|
||||
bool update_sensor = this->sensor;
|
||||
|
||||
for (int i = 0; i < m_->njnt; ++i) {
|
||||
std::optional<std::pair<mjtNum, mjtNum>> range;
|
||||
|
||||
Reference in New Issue
Block a user