Page 1 of 1
torque control with pid
Posted: 30 Jan 2024, 13:00
by jetixmen
Hi, i want to make a 2 dof manipulator with adjusting torques to drive my end effector to my desire point. İ couldn't see how can i use pid controller for this, in CoppeliaSim.
İ don't wanna make a custom controller setup like use position control mode when bla bla and switch to force mode when bla bla. I just wanna use it in Force mode all the time.
İ think there is KC control (and i am not sure it is working on adjusting torques) but i have no idea what it is.
Can someone help me?
Thank you in advance.
Re: torque control with pid
Posted: 30 Jan 2024, 20:17
by coppelia
İ don't wanna make a custom controller setup like use position control mode when bla bla and switch to force mode when bla bla. I just wanna use it in Force mode all the time.
Have a look at the demo scene
scenes/motorControllerExamples-lua.ttt, the yellow joint. The joint needs to be in
Dynamic mode, and the control mode needs to be
Custom.
Then you need to have a child script with a
sysCall_joint callback function somewhere in the hierarchy branch of that joint.
The simplest such function would be:
Code: Select all
function sysCall_joint(inData)
return {velocity = targetVelocity, force = maxTorque}
end
In there you can modulate the force/torque as you want.
Cheers
Re: torque control with pid
Posted: 30 Jan 2024, 22:22
by jetixmen
Thank you but where did all the PİD controllers gone?
In old versions, we could enable the controller loop and adjust the pid coefficients. I can't find them know.
Re: torque control with pid
Posted: 02 Feb 2024, 12:43
by coppelia
Those values have now moved to the
engine properties (via the
engine properties button): each engine has its own set of PID values.
Cheers
Re: torque control with pid
Posted: 02 Feb 2024, 15:48
by jetixmen
Aao thank you