I’m currently developping an USV (unmanned surface vehicle) based on Navio2 + RPi3.
The body of the USV is a cylinder. I already tested buoyancy with all the battery packs etc in it, but there is a lot of roll (maybe because of the torque induced by the propulsion) and most of the time the USV turned into a torpedo, rotating on its X axis (roll).
I partially fixed this by adding fixed stern fins (see illustration below), but the submarine isn’t really roll stabilized and keeps on abruptly bouncing left to right …
I Just added a servo to each of the two fins in order to control the roll. But here is my question :
Is there a way to run a python script that controls the servos according to the gyroscope informations ?
I would like to know if I should use ardurover or an other firmware, where to put a script, how to run it on startup, etc.
I also at first tried to get the informations returned by the gyroscope by cloning the following repo https://github.com/emlid/Navio2 and running the AccelGyroMag.py script but it seems that it can’t run alongside ardupilot. Does anyone know the reason why ?
I’m brand new to ardupilot and its components but I have good scripting experience.
Thanks a lot in advance for your help !