You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In many of gz-sim's systems PostUpdate function, there is this code to print warning msg:
if (_info.dt < std::chrono::steady_clock::duration::zero())
{
gzwarn << "Detected jump back in time ["
<< std::chrono::duration_cast<std::chrono::seconds>(_info.dt).count()
<< "s]. System may not work properly." << std::endl;
}
The problem is that if _info.dt is smaller than 1 sec, std::chrono::duration_cast<std::chrono::seconds>(_info.dt).count() would produce 0, and the msg will output jump back in time [0s]
A quick fix is to change all instances of this code to std::chrono::duration<double>(_info.dt).count()
The text was updated successfully, but these errors were encountered:
Environment
In many of gz-sim's systems
PostUpdate
function, there is this code to print warning msg:The problem is that if
_info.dt
is smaller than 1 sec,std::chrono::duration_cast<std::chrono::seconds>(_info.dt).count()
would produce 0, and the msg will outputjump back in time [0s]
A quick fix is to change all instances of this code to
std::chrono::duration<double>(_info.dt).count()
The text was updated successfully, but these errors were encountered: