[ANN] luaODE alpha1 (for jit.gl.lua)

    Feb 20 2007 | 10:16 am
    Hi everyone, I'm happy to announce an initial (alpha) version of luaODE which provides Lua bindings for the Open Dynamics Engine. It's built as a Lua binary module and is currently OSX only although it is UB. luaODE currently binds the majority of the ODE 0.7 library in a 1:1 manner with the API functions, so there are no higher-level constructs provided beyond what ODE offers.
    As an example, here's how parameters of a World in luaODE are initialized:
    function init_world(w) ode.dWorldSetGravity(w, 0., -9.8, 0.) ode.dWorldSetERP(w, 0.2) ode.dWorldSetCFM(w, 0.00001) ode.dWorldSetAutoDisableFlag(w, 1) ode.dWorldSetContactMaxCorrectingVel(w, 0.05) ode.dWorldSetContactSurfaceLayer(w, 0.001) end
    Aside from making a few very very basic examples, luaODE has not really been testedso please report any bugs. In the download on my C74 share site (https://cycling74.com/twiki/bin/view/Share/WesleySmith) there is the module (ode.so) and an example script and patch. luaODE can be used inside Max/Jitter with the jit.gl.lua object also available on my share site, which provides a low-level interface to OpenGL and now has the ability to run physics simulations.
    The example patch is really simple and crude, so I hope to add some more examples in the near future. For documentation, the best place to look is the latest ODE userguide (http://www.ode.org/ode-latest-userguide.pdf). With very few exceptions, the functions found in there correspond to the functions in luaODE, taking the same arguments. The main exception is that enums have been changed to strings in the Lua interface as can be found in the example script. I've also added a dContactGroup type for collision detection. An example of how to use it can also be found in the example script.
    One final note ... if you downloaded jit.gl.lua in the first few weeks after I uploaded it, you may need to redownload it. I forgot to setup the loading of binary modules in my original upload, so if you get an error that looks something like "dynamic loading not enabled", download the version currently on my share site and it will be fixed. And don't forget that Lua modules go in the C74/lua/luamods directory. jit.gl.lua won't be able to find it anywhere else.

    • Feb 20 2007 | 1:15 pm
      Hi Wesley,
      it looks really greaaat ! I was looking since a while for a way to integrate ODE in jitter patches (I made a couple of test with the powerful vvvv toolkit, but I'd really prefer to stay in max !)
      I had to copy the lua.framework folder in my library/framework folder to make it work (I had error messages in max...).
      I would love to see more example ODE scripts...
      thanks for sharing it.
      Mathieu Chamagne www.maxobjects.com http://mathieu.chamagne.free.fr
    • Feb 21 2007 | 12:30 pm
      wow, this is great
    • Feb 21 2007 | 4:35 pm
    • Feb 21 2007 | 7:14 pm
      Hi Wes
      i thought i had the jit.gl.lua external installed in a different folder on my harddrive. so i