[ODE] Running a simulation many times

Martin C. Martin martin at metahuman.org
Wed Jul 3 06:29:02 2002


Hi,

I do this and it works fine, there's no problem with running the
simulation a lot of times.  For each body I call setLinearVel(0, 0, 0) and
setAngularVel(0, 0, 0), then set the quaternion and position.  For good
measure, I check that the forces and torques on the body are zero and call
enable() on each body.

Do you save your individuals in binary or text format?  If text, when you
print out your individuals, do they have floating point numbers in them? 
How many digits are you printing out?  You need to print out DBL_DIG or
FLT_DIG worth.  In C++ you can do this:

cout << setprecision(DBL_DIG+1);

(The +1 isn't needed, I have it just to be safe.)

Also, make sure you compile with exactly the same options, e.g. debug vs.
optimized.

Good luck,
Martin

Thierry Hoinville wrote:
> 
> Hi everybody,
> 
> I'm a french student and I use ODE for evolutionnary robotics. So, I
> running a simulation a very great number of times (about 100000 times)
> in the same program. But sometimes, in post-evoluted visualizations, the
> robots do not have the same performances as during the evolution. Is
> there any problem with running simulation a lot of times ? How can I
> reset the ODE engine's state ?
> 
> Thanks in advance,
> 
> Thierry.