Commands sent through Putty, to the RPI, where the ODrivetool (0.5.4) is used and where the ODrive is connected to. I used a 2.0 port.
After configuring the values for calibration, I run full calibration, then encoder calibration (I don’t think I should have to do the latter because full calibration should also calibrate the encoder, but if I don’t do this, I get a phase error if I try ot run an index search). Then I run an index search to make sure it works, and then I run closed loop control. Closed loop control finally works, but besides that, nothing else does. Apart from the phase error I might get after running an index search, I get no other errors that indicate anything is wrong with dump_errors(odrv0). I get no errors when trying to run any of the control modes.
Here are my configurations (let me know if you would like to see more):
Ahh I see – didn’t know that. Although when I did have it working, I believe I had use_index = True already set, but I’ll keep that in mind when I setup the other motor.
After some tinkering, I found out that the axis state (requested state?) needs to be configured before certain control modes will work. I don’t remember a mention of this anywhere in the documentation, or a clear list of what axis states there are. Does someone have a link?
Requested state 8 seems to only work with velocity control, requested state 10 seems to work with input position control, 3 & 4 seem like some kind of calibration or homing, as does 6, 9 just spins the motor continuously, and 0 stops all activity/motor movement.
One requested state also seems to enable closed-loop control, but I forget which number did that. ** Edit – looking at the link I sent, I suppose it’s requested state 7?
On a side note, does anyone know which axis states/requested states will work with the other control modes?
Hm, I wonder what’s happening with mine then. When I enable AXIS_STATE_CLOSED_LOOP_CONTROL I can’t seem to get any of the control modes to work. Although the axis state does do what it’s supposed to. I don’t get any errors either. I’ll give this another try tomorrow, thanks
Okay, so this is what I’ve been having trouble with:
** gonna upload a youtube link instead so no one needs to download anything
Sorry, wish I could just upload the video here. Basically, closed loop control + input pos work, but velocity mode does not. (this kinda bugginess isn’t limited to these controls though, it varies from time to time)