How to Access State Error Information for Low Level Controls

Working on creating a low level controller to replace the pid controls on bluerov. I have seen a flowchart showing that the error terms which get multiplied by the P gain, for example, are deeply embedded in the .cpp code where the flight mode is chosen, then the error terms are calculated and the PID finds the joystick values which are sent to mixer to be defined as thrust commands

Is there any way to access the error state information outside of altering the base code for ardusub? The current telemetry tells me vehicle current state, but I also need the desired state or the error state to create another controller without having to remake my own version of path planning

Hi @cmarq,

Take a look at the NAV_CONTROLLER_OUTPUT MAVLink message :slight_smile:

Wow. Totally missed that that existed. It’s not explicitly included in mavsdk. Any idea how to call that param in c++?

I don’t have any experience with mavsdk, but if the message is actually not available (which would be somewhat surprising, given it’s in the common message and has been for a while) then you might need an updated version, or may need to rebuild your MAVLink bindings with a more recent xml.

Perhaps check the mavsdk documentation to see if there’s an easy way of doing that, or getting targeted help :slight_smile: