Page 1 of 1
PID and Python
Posted: 19 Oct 2021, 14:10
by mech
Hello, how can I customize the control loop directly in the python environment (setting up gains and all) instead of setting it up in Coppelia (I know it is harder that way but it is for a certain reason)?
Re: PID and Python
Posted: 20 Oct 2021, 12:10
by coppelia
Hello,
if you want to control a joint from an external application, then you should make sure to run CoppeliaSim in
synchronous or
stepped mode, and if the joint is dynamically enabled, then make sure you use the same
simulation time step size (by default 50ms) as the
dynamics time step size (by default 5ms).
Have a look at the demo scene
messaging/pControllerViaRemoteApi.ttt. I highly recommend that for that, you use the
ZeroMQ-based remote API, since this makes everything much simpler.
Cheers