Change default physic engine at the start

Typically: "How do I... ", "How can I... " questions
Post Reply
darn
Posts: 12
Joined: 10 Apr 2020, 18:48

Change default physic engine at the start

Post by darn »

Hello everyone,

I am using PyRep to control my simulation in CoppeliaSim. By default, it starts with the Bullet engine and I would like to change to another one since Bullet is instable in my simulation.

Thank you in advance.

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

Re: Change default physic engine at the start

Post by coppelia »

Hello,

you can change the physics engine while simulation is not running with e.g.:

Code: Select all

sim.setInt32Parameter(sim.intparam_dynamic_engine,sim.physics_newton)
So you can put that in the init section of the sandbox script (in system/sndbxscpt.txt) or an add-on script.

In you case however, you could also simply change the engine to what you want (in the default scene), and save the scene as the default scene to system/dfltscn.ttt.

Cheers

darn
Posts: 12
Joined: 10 Apr 2020, 18:48

Re: Change default physic engine at the start

Post by darn »

Thank you very much for your answer, that helped me a lot!

Post Reply