Change engine configuration mode using API

Typically: "How do I... ", "How can I... " questions
Post Reply
haetae2050
Posts: 2
Joined: 15 Sep 2022, 15:52

Change engine configuration mode using API

Post by haetae2050 »

I want to change the bullet 2.78 physics engine property "constraint solving iterations" to 200. However, it does not change when the "engine configuration mode" is not set as "custom" mode.

Here are the sandbox terminal results to change parameters when the engine configuration mode is set as "balanced (default)":

Code: Select all

> sim.setEngineInt32Param(sim.bullet_global_constraintsolvingiterations, -1, 200)
1
> sim.getEngineInt32Param(sim.bullet_global_constraintsolvingiterations, -1)
100
Also, the results with the same command when the engine configuration mode is set as "balanced (default)":

Code: Select all

> sim.setEngineInt32Param(sim.bullet_global_constraintsolvingiterations, -1, 200)
1
> sim.getEngineInt32Param(sim.bullet_global_constraintsolvingiterations, -1)
200
How can I change the "engine configuration mode" using the API?

Thank you in advance.

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

Re: Change engine configuration mode using API

Post by coppelia »

Hello,

I think you can't change the configuration mode programmatically, you have to manually set it. However there is a good news: in next CoppeliaSim version (out within 1-2 weeks), you won't have configuration modes anymore, and you will be able to directly call sim.setEngineInt32Param. Additionally, there will be a new state-of-the-art physics engine available: MuJoCo

Cheers

haetae2050
Posts: 2
Joined: 15 Sep 2022, 15:52

Re: Change engine configuration mode using API

Post by haetae2050 »

Ah, I gave the wrong condition on the second result. I set the engine configuration mode as "custom," which I can change the engine parameters.

Thanks for your reply. My CoppeliaSim version is "x64 Edu 4.3.0 (rev. 12) for Ubuntu", and I will check the next version as you recommended.

Post Reply