#5 User-selectable ODE stepping method from ODEDynamics

closed-accepted
nobody
None
5
2010-03-28
2010-03-27
Alex
No

Currently, ODEDynamics uses ode.quickStep(...) for advancing the physics simulation. However, in certain scenes, ode.step() gives better results, although it is slower.

Therefore, it would be better if the user could select the ODE stepping method (step or quickStep) from the ODEDynamics object.

The patch contains a new parameter to ODEDynamics class: use_quick_step, with default value: True.

Therefore, existing code will run unmodified, using quickStep method, as before.

Users who want better accuracy from ODE simulation could call either:

odeSim = odeDynamics(...., use_quick_step = False) # at the constructor

or:

odeSim = odeDynamics(....)
....
odeSim.use_quick_step = False # change stepping method during simulation

Discussion

  • Alex
    Alex
    2010-03-27

    Patch for user-selectable ODE stepping method, odedynamics.py

     
    Attachments
  • Matthias Baas
    Matthias Baas
    2010-03-28

    This is applied as well. Thanks!
    Again, a few minor changes: I reordered the parameters to the constructor (well, I just used to have the auto_insert at the end as it's a common parameter for every such object).
    Another thing is, the update to the documentation was missing (in doc/source/odedynamics.rst). ;)

     
  • Matthias Baas
    Matthias Baas
    2010-03-28

    • status: open --> closed-accepted