[ODE] increase autodisable thresholds with single precision

Kaido Kert kaidokert at gmail.com
Thu Jan 25 10:09:32 MST 2007


Hello,

Im working with ode-0.8 and noticed that in some basic tests something
was murdering performance. Turned out that bodies didnt get disabled,
because average angular velocity never went under the threshold, just
barely above it. simple test: run test_boxstack and keep b button
pressed. Boxes should turn brown(disabled) in a few seconds, but they
dont.
This seemed to fix it for me:
+++ ode/src/ode.cpp
+#if defined(dDOUBLE)
   w->adis.angular_average_threshold = REAL(0.01)*REAL(0.01);   //
(magnitude squared)
+#else //(larger, otherwise computational errors wont cancel out )
+  w->adis.angular_average_threshold = REAL(0.01)*REAL(0.03);
+#endif

cheers,
-kert


More information about the ODE mailing list