[ODE] Performance question

STenyaK (Bruno Gonzalez) stenyak at gmx.net
Thu Sep 14 18:59:13 MST 2006

Doh... i answer myself... It's my fault. It's taken me 1 year to realize  
what the problem is.

It looks like i was not properly handling collisions between suspension  
rods. I've removed their geoms and framerates are back to normal.
This makes sense, since the rods collide with uprights by default, so a  
bug in my collision callback could be allowing those collisions joints to  
be created.

So i'll leave those geoms uncreated, and then when the suspension gets  
damage, joints break and some rod detaches from the vehicle, i'll recreate  
the collision geom and everything should behave as supposed (rods falling  
to the ground and rolling, then colliding with other incoming vehicles or  

Ps.: gussimulator, yes, i speak spanish, and i'm spanish :)

On Fri, 15 Sep 2006 03:15:03 +0200, STenyaK (Bruno Gonzalez)  
<stenyak at gmx.net> wrote:

> On Fri, 15 Sep 2006 02:52:23 +0200, Jon Watte (ODE)
> <hplus-ode at mindcontrol.org> wrote:
>> Is this in release mode or debug mode?
> Debug mode.
>> Are you using floats or doubles?
> Doubles
>> How big is your step size?
> Doesn't matter for this problem (the problem happens indepndently of step
> size), but i'm currently running physics at 300Hz.
>> Do you empty your contact joint group every step? (doesn't hurt to ask)
> Yes
>> On what kind of client hardware?
> Amd Sempron 2Ghz + 512kb L2, 512megs of ram (no swapping is needed at any
> time during simulation), on a gentoo linux 2.6.16 or so. No other apps  
> are
> taking the cpu. It's been reported to also happen in windowsXP + msvc,  
> and
> to also be solved by replacing all suspension physics with hinge2 joints.
>> If you run a profiler on the program while it's getting 1-4 fps, where
>> does it say you're spending your time?
> Running a profiler takes too much cpu time (simulation can't run  
> realtime,
> so graphics are not rendered anymore, and there are more side effects),  
> so
> i profile the important parts myself, using SDL timers (which give a
> precission of msecs). The slowdown is definitely due to ODE (which takes
> up to 95% of total app time, but usually 40-50%), but the timing is too
> little precise to know if the problem is collision detection or the  
> solver
> (i get an average of 50% time of the sum spent on each of them, so i  
> dunno
> what to think about it).


Site:   http://1ksurvivor.homeip.net  <1kSurvivor>
         http://motorsport-sim.org     <Motorsport>
         http://kwh.iespana.es         <KuantikalWareHouse>
         http://emuletutorial.info     <EmuleTutorial>
ICQ:    153709484
Mail:   stenyak AT gmail DOT net

More information about the ODE mailing list