Explain like I'm 5: torque control

Assuming you have closed loop working (i.e a sensor that knows the motors position) this seems like:

motor.controller = MotionControlType::angle;

is what you want. You’ll want it to keep it at the current angle. In this mode when you set motor.move(x) the x means a position (in radians). If you keep x constant it’ll want to stay at that angle. Any deviation from the angle will result in the motor wanting to return to that angle e.g. if you try to force the motor away from that position. You can play around with the PID settings to control the stiffness.

You might get fancy and move from the default TorqueControlType::voltage to something else (e.g. TorqueControlType::foc_current) but you may not need that. The important thing is to try motor.controller = MotionControlType::angle;

In closed loop you need to tune a velocity and an angle PID set of values. It sounds complex, but you’ll work it out. I find it easier to start with motor.controller = MotionControlType::velocity; and tune the velocity PID once you get a nice velocity response, switching to angle and tuning the angle PID is super easy.