Hi everyone,
I’m using Teensy (UART) and I’m encountering an error in Odrive.
Does anyone know what command to use in Arduino IDE for checking the errors?
Thank you so much!
Hi everyone,
I’m using Teensy (UART) and I’m encountering an error in Odrive.
Does anyone know what command to use in Arduino IDE for checking the errors?
Thank you so much!
Typically you’d want to check:
axis0.active_errors
axis0.procedure_result
axis0.disarm_reason
There’s a few others (e.g. SPI/RS485 encoder statuses, CAN errors, gate driver errors, etc), but those are a lot less common and they’ll be reflected in some way in those previous three axis0
-scope errors.
Then you can reference ODriveEnums.h
or the API docs for the actual error enum mapping.
I’ll do that. Thank you so much!
Hi Solomondg,
I tired using odrive0.axis0.active_errors in arduino ide, itshows: ‘class ODriveUART’ has no member named ‘axis0’. I’m not sure what’s the correct command line.
I also had another question: what is the command in arduino ide for setting position gains? In the documentation, it says pos_gain but I’m not sure what command to use for arduino ide.
Thank you so much for helping me out!
You can’t do the odrivetool-like parameter access on ASCII, unfortunately (uses a lot of Python features and C++ is cruel).
Here, you would run e.g.:
int active_errors = odrive.getParameterAsInt("axis0.active_errors");
Similarly with setting gains, you would do e.g.:
float my_gain = 3.821; // whatever gain
odrive.setParameter("axis0.controller.config.pos_gain", my_gain);
This helped a lot. Thank you so much Solomondg!