Skip to content

Commit ff62988

Browse files
yuvaltassacopybara-github
authored andcommitted
Increase default sleep_tolerance from 1e-4 to 1e-3.
PiperOrigin-RevId: 945696845 Change-Id: I77caa0b6c0966da986451ff9eee5aecaf4e30106
1 parent 40feb49 commit ff62988

5 files changed

Lines changed: 6 additions & 4 deletions

File tree

‎doc/XMLreference.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ adjust it properly through the XML.
466466

467467
.. _option-sleep_tolerance:
468468

469-
:at:`sleep_tolerance`: :at-val:`real, "1e-4"`
469+
:at:`sleep_tolerance`: :at-val:`real, "1e-3"`
470470
Velocity tolerance below which :ref:`sleeping<Sleeping>` is allowed.
471471

472472
.. _option-sdf_iterations:

‎doc/changelog.rst‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ General
3333
exclusively in the compressed sparse row (CSR) format ``mjData.M``.
3434
- :ref:`mju_round` now breaks ties away from zero rather than towards :math:`+\infty`. This only affects
3535
negative half-integers, e.g. ``mju_round(-2.5)`` now returns -3 rather than -2.
36+
- Changed the default value of :ref:`sleep_tolerance<option-sleep_tolerance>` from 1e-4 to 1e-3 (1mm/sec in SI
37+
units).
3638

3739
Version 3.10.0 (June 22, 2026)
3840
------------------------------

‎doc/mjwarp/index.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,7 @@ high-performance tensor/matrix operations optimized for fixed tile sizes.
446446

447447
.. note::
448448
Consider increasing the sleep tolerance setting (e.g., ``sleep_tolerance="0.01"`` in XML options or
449-
``spec.option.sleep_tolerance = 0.01`` in Python) from its default value (0.0001) to more quickly
449+
``spec.option.sleep_tolerance = 0.01`` in Python) from its default value (0.001) to more quickly
450450
sleep objects.
451451

452452
.. _mjwBatch:

‎sample/testspeed.cc‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ int main(int argc, char** argv) {
310310
" --integrator=I Euler Euler, RK4, Implicit, ImplicitFast\n"
311311
" --iterations=N 100 solver iterations limit\n"
312312
" --tolerance=X 1e-8 solver tolerance\n"
313-
" --sleep_tolerance=X 1e-4 sleep tolerance\n"
313+
" --sleep_tolerance=X 1e-3 sleep tolerance\n"
314314
" --noslip_iterations=N 0 noslip solver iterations limit\n"
315315
" --help (or no arguments) print this help message\n"
316316
"\n"

‎src/engine/engine_init.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ void mj_defaultOption(mjOption* opt) {
6363
opt->ccd_tolerance = 1e-6;
6464

6565
// sleep settings
66-
opt->sleep_tolerance = 1e-4;
66+
opt->sleep_tolerance = 1e-3;
6767

6868
// physical constants
6969
opt->gravity[0] = 0;

0 commit comments

Comments
 (0)
⌂ 换网址