For the last two weeks or so, I've been developing a method for adapting an ArduPilot 2.0 for use on a RC motorboat. I'm pleased to announce that I have successfully applied and adapted existing firmware for use on a marine vessel.
I accomplished this by using the ArduRover firmware. Initial testing of the waypoint navigation yielded negative results (i.e. the boat went drastically off course and almost sank itself). However, after many hours of thought and frustration (and an extremely insightful idea from a faculty member) I discovered the issue. It turns out that, due to the location of the APM in relation to the boat's motor, a disruptive magnetic disturbance caused the on-board compass to go haywire and throw off the autonomous navigation. Fixing the problem became elementary after it was discovered. I simply had to turn the compass off in the config menu and the boat began navigating like a champ. While the boat is still a bit jumpy and the PID controller is not fully tuned, the boat is able to navigate multiple waypoints with minimal issues. However, more testing is needed to develop PID settings for optimal functionality and possibly adaptation of the source code to account for the fluid surface the boat is navigating on (i.e. drift compensation, wind correction, current correction, ect.).
I figured I post this discussion for two reasons. The first reason being that I found it difficult to find information about adapting this platform for boats and I know would have appreciated somewhere to start from. That being said, below I've listed my PID settings, as well as a video, to illustrate the functionality of the platform.
The second reason I'm posting this discussion is to hopefully solicit more information and ideas from people who are working on similar projects to help better mine.
As much as I would like to continue fine tuning my boat's control, the scope of my project demands that I move on to bigger and better things. In the next week or I hope to integrate a small SBC capable of running Linux (for ROS) and integrate a webcam (for computer vision) to replace the waypoint autonomous navigation. The goal is to get the webcam to track an object and translate this into navigation information for the ArduPilot. So if anyone has an sort of insight into ROS or webcam computer vision your input would be much appreciated. Also, an insight into how/where to modify the ArduPilot code to accomplish this would be greatly appreciated.
Lastly, if anyone has any questions about what I did or wants more information I'll be checking this pretty regularly so feel free to post questions or comments.
Thanks y'all, your input is appreciated in advance.
My PID's for both steering and throttle:
Also, my throttle was restricted to 30% and the goal cruise speed was 1.5 m/s and the waypoints were 4m
YouTube video of my run: