[ODE] ODE in its own thread
Alex Hetu
alexhetu at videotron.ca
Fri Jul 18 11:15:02 2003
I don't see much advantage in running ODE in its own thread. If your ODE
system is slow, the other threads will get affected by it somehow anyway.
The best way to speed up ODE is to wrap things up properly, use spaces, and
take advantage of the "NearCallback" that you pass when you call dCollide or
dCollide2. The fastest code is the one you simply don't execute. The
callback function simply allows you to skip TONS of tests.
The way you set up your ODE world and your NearCallback function are the
things that are going to determine how much processing ODE will take.
my world: NOT a landscape, 50k tris in ~1950 meshes, ~80 spheres and boxes
(some moving, some stalled), use dWorldStep and SimpleSpace, no has or
quadtree space. no slowdown, 60fps+. For the world geometry I used something
similiar to an octree, so it allowed me to set up a hierarchy between the
spaces. I could make my world 12 times bigger right now and it wouldn't make
one bit of a difference on processing.
Anyway, I think it's better having faster code than just tossing slower code
in another thread.
Alex
-----Original Message-----
From: ode-admin@q12.org [mailto:ode-admin@q12.org]On Behalf Of Patrik
Stellmann
Sent: Friday, July 18, 2003 8:18 AM
To: ode@q12.org
Subject: Re: [ODE] ODE in its own thread
> If I understood correctly you are simply simulating
>one thread run over several threads. Well.. why ?
>
Erm, not really, but by description was indeed pretty poor...
Nevertheless, the reason why only one thread at a time is running is
that only one at a time should have access to the world to avoid
conflicts. The ode-thread gives always to that trhead access having the
same simulated-real-time as the world has and does time steps as necessary.
The reason for having several threads is that the code for the
controllers should be the same as it would be on a real robot where this
synchronization with the 'world' wouldn't take place in that way since
there is no simulated time.
hope it was a little more clear or at least I no more look like a fool
;-) - but hey, it's my code :-)
Patrik
_______________________________________________
ODE mailing list
ODE@q12.org
http://q12.org/mailman/listinfo/ode