Trying to decipher the odrive code to learn, ODriveIntf

Hope all of you are doing well.

I am trying to decipher the odrive code to learn the control algorithm.
In the controller.hpp file. I see the Controller class but it is a child of a public class called ODriveIntf.

class Controller : public ODriveIntf::ControllerIntf {

Where is this ODriveIntf?

Also in the same header file, there is an instance of ControlMode being created…

ControlMode control_mode = CONTROL_MODE_POSITION_CONTROL;

I cannot seem to find the object/struct?

Thank you for the help.

It’s created / autogenerated from the odrive-interface.yaml you compile the code, and placed in the autogen folder.

1 Like