Designing a control algorithm for AUV (Pymavlink vs modified ArduSub)

Hi @Lili_Marleen, welcome to the forum :slight_smile:

In general, Python is better for writing code/logic quickly and understandably, and C/C++ are better for high-performance low-level control. Accordingly, Pymavlink is likely the easiest way to start learning how MAVLink vehicles/devices work and get something running that does the general actions you’re interested in, and then if you find you need better performance than you’re able to achieve with Python+Pymavlink, then you may want to switch to the C implementation of MAVLink, and if that has too much communication overhead or you need faster sensor updates you would likely need to make a modified version of ArduSub.

Whether or not you need lower level/higher performance control than you can achieve with Pymavlink depends on your use-case and hardware. If you can describe more the “certain underwater tasks” you want to achieve then we may be able to provide clearer guidance on whether modifying ArduSub is likely to be necessary.

I would note that the developer documentation for modifying ArduSub currently isn’t very comprehensive. That’s something we’re planning to improve, but at this stage our documentation is mainly focused on describing existing features and how to use them, rather than where the relevant code is located or how to make changes to it. Much of the existing documentation for lower level control and understanding the codebase is in the more general ArduPilot docs, as discussed here.