uArm Dynamics - iLQR controller

I’m trying to control uArm using iLQR (iterative Linear Quadratic Regulator)

For this controller, I need to know the dynamics of the robot. However, I’m very confused how can I get this since I need to know the torque for a given command.

I have computer science background and this is my first project using a robot. So if someone knows how should I do that or knows a good and easy tutorial to indicate I would appreciate that :smiley:

Is your goal to control the servo motors independently with your own control scheme?

The conversion from 3D-space to servo rotation angle is contained in:
void uArmClass::calAngles(double x, double y, double z, double& theta_1, double& theta_2, double& theta_3)

The conversion from servo rotation angles to 3-space is contained in:
void uArmClass::calXYZ(double theta_1, double theta_2, double theta_3)

both in

I’m not clear on what you mean by the dynamics of the robot. Torque applied via a servo varies during a timed move, which applies easing. It is also possible for moves to uses linear-interpolation, but you are still pulsing the servo at full power for short increments.

You can also set an ‘immediate’ change in servo position, from which torque could be determined simply from the performance characteristics of the servos. (Because the servos are set directly to the new position, this implies the full amount of torque that the servo puts out will be used.)