ODE deterministic and QuickStep

Typically: "How do I... ", "How can I... " questions
Post Reply
martin
Posts: 44
Joined: 15 Mar 2016, 10:38

ODE deterministic and QuickStep

Post by martin »

Hello Coppelia,

Comming from this post:
https://forum.coppeliarobotics.com/view ... hp?t=10093

I work with ubuntu18 python 3 and i utilize the Coppelia always in synchronous mode, because I want that my results would be repeatable and reproducible

I've started to replicate "my robot" from previous versions of Coppelia, in the current version, Coppelia 4.5.1. In addition, following your suggestion, I've planned to run my experiments under different physics engines. The final appearance of the robot would be this one:
https://www.dropbox.com/s/g94kwdyk1z1awdx/quad.png?dl=0

Then, I remember having done some changes in my old scenes, to achieve that the ODE would be deterministic (and I achieved it).
To do the ODE deterministic in the current 4.5.1 version (because by default it is not), I've taken a look to this old post:
https://forum.coppeliarobotics.com/view ... tic#p24252

Which in essence, consists on change the "enabled" variable to false (see code below)

Code: Select all

    "ode": {
        "quickStep": {
            "enabled": false,    //DEFAULT: true
            "iterations": 100
        }
However, doing that, I found a very estrange behavior in a very simple scene, meaning that the robot jumps and disappear, when I press the "start simulation" button :
https://www.dropbox.com/s/we83kcihcslqt ... 2.ttt?dl=0

In addition, in the console where I run the "./coppeliaSim.sh" command, I get these messages:
ODE Message 3: LCP internal error, s <= 0 (s=-8.0000e-01)

ODE Message 3: LCP internal error, s <= 0 (s=-1.1000e+01)
Would you have any idea about what is happening and how to solve it?

Regards!

coppelia
Site Admin
Posts: 10381
Joined: 14 Dec 2012, 00:25

Re: ODE deterministic and QuickStep

Post by coppelia »

Hello,

I tried your scene, and the robot doesn't jump/disappear (running on Windows), but I also get the same ODE messages. Usually, if an object/model disappears, this means there was a nan (not-a-number) error, that propagated from the physics engine to CoppeliaSim.
You can get rid of that error by adjusting the material of the 3 shapes. e.g. set:

"softCfm": 0.00001 (instead of softCfm=0)

Cheers

martin
Posts: 44
Joined: 15 Mar 2016, 10:38

Re: ODE deterministic and QuickStep

Post by martin »

Hello Coppelia,

Thanks for the answer, it works!

However, due to such solution, I have another question, because I also have the same problem when adding the predefined NAO model to a scene (the NAO.ttm that appears in the model browse). The simulation runs without any problem with the default configuration of the ODE, but when I modify its QuickStep parameter, the NAO disappear after 30s of simulation.

In this case, have I got to modify the "softCfm" of each shape of the scene (even ungrouping, modify the "sofrCfm" parameter of each shape and then, grouping again those shapes formed by grouped shapes)?

Related to this question is the following one: which modification should be done to a URDF file or a mesh when imported to CoppeliaSim to operate deterministically with the ODE?

Regards!

coppelia
Site Admin
Posts: 10381
Joined: 14 Dec 2012, 00:25

Re: ODE deterministic and QuickStep

Post by coppelia »

gouped shapes, or compounds, have meterial settings that are same for all the sub-shapes. So no need to ungroup and group again if you want to modify the softCfm parameter.

But you can handle all shapes in a model at once, e.g. with following script:

Code: Select all

local l=sim.getObjectsInTree(modelBaseHandle,sim.object_shape_type)
for i=1,#l,1 do
    sim.setEngineFloatParam(sim.ode_body_softcfm,l[i],newValue)
end
as far as I know, a URDF file does not include physics engine specific properties such as the softCfm...

Cheers

Post Reply