#5 User-selectable ODE stepping method from ODEDynamics


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


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


  • Alex

    Alex - 2010-03-27

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

  • 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

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks