Autonomous sailing with Ardupilot


Thanks DIYDrones community! We at the Royal Military College of Canada used the Ardupilot software and ground station as a basis for programming our 2m autonomous wing-sailed trimaran. This made our lives much easier while building and programming the boat during the 3 month time frame before it competed in Sailbot 2010

E-mail me when people leave their comments –

You need to be a member of diydrones to add comments!

Join diydrones


  • Anybody has the source code, i want to build a similar boat.

  • Hi Mark!
    Glad to hear some more people are trying auto sailing, I'm really hoping to get back into path planning for sailboats in the next few months. 
    I haven't published any official code but a long time ago I did have a link to the very customized code I had for the specific hardware on my wing-sail boat. It wouldn't work on an Ardupilot , but you might be interested in the path planning for upwind sailing found in the code. I'll put a copy here. Just be warned, I wrote this when I was learning to program. There is a little explanation in this presentation and code with undocumented variables here: v=velocity, b= boat, w=wind, theta= angle. 

    If I were you I wouldn't use any of my stuff. I would get your boat on the water with Ardu-rover  or arduboat (if there still is one) and just give it waypoints that you know it can get to and that aren't too far up wind for it to sail. This way you can test and tune your rudder PID controller. Hook the sail sheets up to the throttle and just set high throttle (sheet in). 

    Once you get that working you can make yourself a simple wind direction instrument with an absolute encoder or continuously rotating potentiometer with a weather vane. Then see if you can add your own code to read that in to the system. Then as a last step, you could either modify the path following controller to account for upwind sailing or you could have your code insert waypoints which will get the boat upwind to its target. I'm pretty sure Ardupilot will let you put in your own scripts to set waypoints and such but I haven't looked into this myself and I am flying OpenPilot these days.

    Good luck and keep us posted on how things go.

  • Robbie, a few of my friends in my high school and I were inspired by the sailbot competition to try and make our own autonomous sailboat. We've built the boat, but ultimately none of us are very experienced programmers, and none of us have any experience with Ardupilot at all. We chose to basically just use a modified version of the code you've published, changed so that it will work with our sail control method. However, we haven't the faintest idea how your code is meant to be implemented with Ardupilot. Could you give us some help or advice please?

  • COOL  I like it

  • COOL  I like it

  • I want to send an autonomous boat from Halifax to Bermuda....

  • Similar dreams.  Autonomous submarine would loads of fun.  How to navigate under water?  

  • That is exactly how I would do it Troy. I have always wanted to do autonomous sailing 'right'. I've been thinking about buying a nice 1-2m conventional sailboat and reworking some code. Sailing seems to be a considerably complex path planning problem if you are shooting for an optimal solution.  This would be quite interesting to work on. I can already see my spare time this summer disappearing. 

  • Glad to see some renewed intrust in autonomous boats. I haven't done much with mine for a long time but I still poke at it every once in a while.

    I think SailBoats should have there own code base, because sailing is its own creature (not like ArduRover , or even ArduBoat). I don't intend to steer the boat toward a way point, but rather steer it towards a relative wind direction. Then a 2nd much slower loop will choose that relative wind direction based on what is useful to get to the way point.

    So far I have been using ArduPilot as my starting code base, although only using it as a set of libraries to read GPS and drive drive servos.

  • 3D Robotics

    Robbie, I don't think there's any ArduBoat software per se. I was assuming it was just the ArduRover software, but with different usage instructions for boats. 

This reply was deleted.