Torque Limited Position Control

I would like to use position control, but limit the maximum torque (or equivalently current). When I try to use current_lim, the controller seems to suddenly fail, rather than just cap the applied torque.

The goal is to have the motor attempt to hit a target position and allow it to “keep trying” up to a certain maximum force if there is an obstacle in the way.

How do I configure the controller limits to accomplish this?

Can you explain what you mean “suddenly fail”? Does it throw an error? dump_errors(odrv0)

I mean that the controller seems to turn off and no longer apply current to the motor. I am controlling the motor from linux via usb, and sometimes the odrive itself disappears(and the python object reports lost device). Other times there are various motor and axis errors.

Is there anywhere a list of exactly all the configurable parameters and flags for the controller? What are the right settings to run a position control loop that will never exceed a particular set torque?

I think I debugged this. The actual issue was the velocity limit. In this case, I’m pulling against the motor, and my pull was faster than the velocity limit, which caused it to disarm. This was counterintuitive because the torque being applied was in the opposite direction to the velocity (i.e., the vel limit presumably is to prevent the motor from spinning out of control in torque control mode).

When an error occurs, is it possible to have this bubbled up in the protocol, so that you can immediately see why an event happens? Or at least a sort of log which says that at time X error Y occurred?