3
$\begingroup$

I've built an autonomous sailing robot (https://github.com/kolosy/ArduSailor). Turns out, the problem of piloting it is fairly complex, and my procedural approach to solving it hasn't worked well (or at all). I think that an ML-based approach may be better, and I'm trying to figure out the right algorithm to use.

I'm viewing it as an optimization problem of sorts - I've got a small set of parameters:

  • Position (lat, lon)
  • Orientation (in 9 DOF)
  • Speed
  • Wind speed & direction
  • Distance to waypoint
  • Heading to waypoint
  • Sail position (basically winch orientation, a single value between 0 and 180)
  • Rudder position (same as above)

If I'm thinking about this right, I need to vary my rudder and winch over time in response to my current position, orientation and wind direction to minimize the difference between my orientation and the heading to the waypoint, and minimize the distance to the waypoint.

My approach right now, is to train an ANN (using this code) by recording a manual run through my course. Is this the right approach and algorithm? Is there a better / more suitable way of thinking about this?

$\endgroup$
6
  • 1
    $\begingroup$ Can't you linearize the problem and use a Kalman filter? I skimmed your links and saw no references to control theory. $\endgroup$
    – Emre
    Aug 20, 2016 at 22:35
  • $\begingroup$ @Emre my understanding of all this is rudimentary at best, but isn't a Kalman filter about using additional inputs to filter noise? I'm trying to set the rudder and sail position based on environmental variables, I don't understand the connection.. $\endgroup$
    – kolosy
    Aug 21, 2016 at 4:44
  • 1
    $\begingroup$ See if this thesis helps: Modeling, control and state-estimation for an autonomous sailboat $\endgroup$
    – Emre
    Aug 21, 2016 at 8:59
  • 1
    $\begingroup$ @kolosy You might want to have a look at my explanation of the Kalman filter. $\endgroup$ Aug 24, 2016 at 9:16
  • 1
    $\begingroup$ How will you be testing your algorithm? Is there a simulator or model environment, or will all runs of this AI that collect feedback on performance be made on a full-scale real world system? If you don't have a good simulated environment as a first approximation, that could be worth investing time and effort in, as you will get faster turn-around of testing your ideas (although ultimately you will want the final system to collect a lot of real-world data, this is time consuming and maybe costly) $\endgroup$ Oct 22, 2016 at 18:25

1 Answer 1

0
$\begingroup$

Please, do not use ANN, because what you are looking for actually is SLAM method. It is a set of algorithms working together to localize your ship in an environment and mapping it simultaneously.

You can find an introduction on the Wikipedia:

https://en.wikipedia.org/wiki/Simultaneous_localization_and_mapping

This is what autonomous cars are using.

$\endgroup$
5
  • 1
    $\begingroup$ Why do I need mapping? I'm perfectly happy assuming an endless ocean around me and just GPS waypoints to head toward. $\endgroup$
    – kolosy
    Aug 24, 2016 at 20:30
  • 1
    $\begingroup$ If your ship does not care about obstacle (other ships), then what you need is a PID, which will solve your problem so far. en.wikipedia.org/wiki/PID_controller. I use to program them when I was working with helicopter simulators. If you want the source code I could provide it to you. $\endgroup$ Aug 25, 2016 at 9:34
  • $\begingroup$ What you want to do is an automatic pilot. You give to the system a set of waypoints, and then, your ship will automatically follow straight lines between points, changing its heading when get one. $\endgroup$ Aug 25, 2016 at 9:48
  • 1
    $\begingroup$ Maybe you would like I do some source code implementation into your ArduSailor github about these PID's. $\endgroup$ Aug 25, 2016 at 10:37
  • $\begingroup$ that'd be phenomenal. Feel free to fork and do as you wish. Just want to warn you, though that because locomotion isn't a direct function of steering here, I think the problem is more complex.. but I could be wrong. $\endgroup$
    – kolosy
    Aug 26, 2016 at 17:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.