Hi! I saw some really small and interesting examples in ardupilot, for some code practicing in it. Is some reference manual or simple examples, with sitl, maybe google tests, for writing some code, and see how to test it. I really need it, for now I’m just using ardusub in debug mode for sitl, and see what happened in code. I have to add new regime to it, and I need to do it fast.
I spent quite a while looking for such a thing but couldn’t find it if there is one. If you have a specific question I might be able to help since I’ve spent some time digging around the codebase
ArduPilot contains some examples around the code for libraries and others functionalities, the problem is that the documentation for these does not exist or are old, but it’s possible to find such things with global search in files or text.
But for everything else, the official development website is pretty complete and will probably help you: https://ardupilot.org/dev/
Thank you Patrick. But I need some simple examples with scheduling, and thread safe application for ardusub, just for example, I need to add some new modules. So because of that I have to understood the main architecture.
And it still hard to me to find out, how interact fastloop, with commands which I send via sitl. I saw how command parsed and pass through, but still can’t understand how the main loop interact with it. Please, could you show me some samples, where someone adds it’s own code to ardusub?
Hi Yuri, what exactly are you trying to accomplish? The right way to implement things will be different for different applications.
The main problem is, that I want to understand flow of execution, when I use auto mode (set path from set of points) to my ardusub via SITL. I set command via QGC and I want to know, how would work execution with fast_loop.I saw my message became from another thread, and I don’t realize how fast_loop works after it.
That’s described in the learning the code section in the dev website: https://ardupilot.org/dev/docs/learning-the-ardupilot-codebase.html
Thank you, I saw it. For now, I’m debugging ardusub code, for understanding how it works with kalman filtering, after sending auto mode with path. Need to understand how flow works, It’s not described so detailed on ardusub site.
For python you can try usingthe pymavlink based rovpy library that we developed with me and my teammates. There are some examples in the documentation. But the info command may fail in the current version.
You can install it using the command below
pip3 install rovpy
Thanks for sharing this, is there an open repository for people to contribute with ?