Simulation Settings through External Script
Simulation Settings through External Script
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
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
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
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
Hello,
try with:
Cheers
try with:
Code: Select all
sim.setBoolParam(sim.boolparam_dynamics_handling_enabled, false)