Page 1 of 1

Simulation Settings through External Script

Posted: 26 Jun 2024, 18:27
by Jolene
Hello, is there a way to modify the Sim settings from kinematic to dynamic mode? I am first trying to evaluate the joint angles on the robot for collision, and then going to model the trajectory etc, but I have to change the settings through the UI. (I can do this with the jointMode but the Simulation settings is still dynamic and my robot falls apart during simulation) Would like to be able to modify it with my external code (python). Thank you again!

Re: Simulation Settings through External Script

Posted: 27 Jun 2024, 10:01
by coppelia
Hello,

best is probably to modify those settings via sim.setModelProperty. You can of course also traget individual objects via sim.setObjectInt32Param(shapeHandle, sim.shapeintparam_static, value), sim.setJointMode or similar.

However, if you often need to switch back and forth, even better would be to have to similar models: one kinematic, or dynamic.

Cheers

Re: Simulation Settings through External Script

Posted: 28 Jun 2024, 08:08
by Jolene
Hello, thanks for the reply. Actually I didn't mean the model properties, but the actual simulation settings where the dynamics enabled option is checked or unchecked (where the gravity vector input is). Thank you once again this forum is very helpful!

Re: Simulation Settings through External Script

Posted: 01 Jul 2024, 12:31
by coppelia
Hello,

try with:

Code: Select all

sim.setBoolParam(sim.boolparam_dynamics_handling_enabled, false)
Cheers