Deterministic simulation

Questions about Marilou Open Devices Access (MODA)
Post Reply
Posts: 1
Joined: Wed Dec 26, 2012 9:57 pm

Deterministic simulation

Post by Pille456 » Thu Dec 27, 2012 11:59 am


I'm using Marilou to simulate the movement of a hexapod. I'm using the standard hexapod provided by Marilou and enabled the auto motion on every component.
I'd like to measure the speed of the hexapod, while it is walking. Therefore I have the following code:

Code: Select all

corpsGeom = corps->QueryGeom("body0");
float xOld,xNew,y,z; // ignore y/z, only x direction

// do some movement here

float dist = xNew-xOld; //the distance
Unfortunately it seems, that the simulation is not deterministic. I ran the simulation several times and got several different distances. The distance mostly differs around 0,00X to 0,0X, which is not such a great deal, but it makes analysis a little bit harder.
Is Marilou deterministic in general and I only have a wrong setup (maybe friction is not right, or something else?), or can Marilou be initialized with a random seed?



Posts: 305
Joined: Mon Feb 12, 2007 11:55 pm
Location: FR

Re: Deterministic simulation

Post by LR » Thu Dec 27, 2012 4:22 pm


The simulation is non deterministic because it introduce (like the reality) noise on movement, on regulation and on measurements.

If you are using servo for example, you can change the device settings in order to have a very good or a very bad servo accuracy : it will change the quality of your movements and then the final world position

Also, because the physics solver, try to decrease the timestep of the simulation (0.001 is the best simulation time step, but it can become slow if the word have a lot of geometries to simulate)


Post Reply