As part of an internship I was asked to design and develop the core control system for an autonomous small-scale (2m length) solar vessel to be able to sail around the Baltic Sea.

The boat should be able to sail following predefined waypoints but, thanks to AIS, Camera (collision avoidance) and a path planning algorithm, redefine its route according to the obstacles sensed. For the hardware part it runs a Raspberry Pi with the high level navigation system and an Arduino to control propeller and actuators as well as provide basic navigation functions in case of Raspberry failure.

Now, before digging into coding I checked for existing solutions and found out the ROS (Robot OS) middleware, which comes with interesting abstractions for the multi-threading and multi-processing, message exchange locally and among diverse hardware architectures (Raspberry and Arduino in this case). However, I am concerned ROS would add considerable load on the Raspberry processor and increase power consumption and it would prevent fine-grained control over hardware, probably system instability too on the long run. The control software has to access sleep functions on sensors and on the Pi itself, in case of power shortages, to dynamically suspend and restart processes and it needs to run 24/7 for months without human interaction.

Is ROS suited for these tasks or should I think about creating a custom software from scratch? Thanks

  • $\begingroup$ Unless you are familiar with RobotOS, I wounder if it would be better to manage such a critical features as sleep and other low power modes from an additional (low power / simple program / supervisory / watch dog) processor. As it sounds like you would like the sophistication of RobotOS but are unwilling to trust it on its own. $\endgroup$ – st2000 Aug 21 '17 at 12:30
  • $\begingroup$ Surely ROS being followed by a vast worldwide community is properly developed and versatile enough for me, yet I don't know if it is suited for the harsh working conditions this USV will face. $\endgroup$ – Anelito Aug 21 '17 at 14:21

ROS will work fine for this task. It will add some additional overhead for your Raspberry Pi but it is fairly small provided you only install the Robotic or Base configuration instead of the Full configuration and are using a headless (no GUI) Raspberry Pi install. My company uses ROS on self-driving cars and ROS has, so far, never been the cause of a fault - it has always been hardware- or coding-related. Here is your trade-off:

ROS Pros:

  1. Fairly complete, stable messaging framework.
  2. Allows inter-process message passing without network overhead (see nodelets).
  3. Large library of pre-defined message types and utilities (like tf which does coordinate transforms with very little effort).
  4. Community support for portions of your framework that you wouldn't otherwise have.

ROS Cons:

  1. Some overhead associated with running roscore and the message serialization/deserialization process.
  2. Without implementing the features on your own, there is very little in the way of Quality of Service regarding message transport (this is coming in ROS 2.0).
  3. Only supports Python and C++. This is not a problem for some people but could be a drawback for others.
| improve this answer | |
  • $\begingroup$ I would also add that for specific projects like this, the plug-and-play visualization, control, recording and plotting tools will make the testing process pretty easy. Also, if it's the type of project where a lot of interns are coming and going, ROS can be used to maintain a fairly modular software structure, to avoid some of the nasty patchwork that arises from those situations. $\endgroup$ – Peter w Sep 9 '17 at 17:21

For an autonomous boat, you might want to look into MOOS-IVP: http://oceanai.mit.edu/moos-ivp/pmwiki/pmwiki.php?n=Main.HomePageFull. It is similar to ROS in many respects, but geared towards autonomous boats instead of land vehicles. However, both middlewares are sufficiently abstract that they can handle land or sea vehicles just fine.

However I can't speak to it's ease of integration w.r.t. ROS, or its ability to run on small processors like the RasPi. But see comments below.

| improve this answer | |
  • 2
    $\begingroup$ I would recommend against using MOOS, especially to someone who is an intern, seems unfamiliar with middlewares, and has so little reputation. $\endgroup$ – holmeski Aug 30 '17 at 17:48
  • $\begingroup$ I am quite familiar with middlewares from a general point of view and plus MOOS is more lightweight than ROS to be run on a single board computer such as Raspberry Pi $\endgroup$ – Anelito Aug 31 '17 at 5:59
  • $\begingroup$ Are you familiar with moos? $\endgroup$ – holmeski Sep 1 '17 at 0:44
  • $\begingroup$ I strongly feel that the overhead needed to run ros is well worth it. $\endgroup$ – holmeski Sep 1 '17 at 0:45
  • $\begingroup$ I am not familiar with any of the aforementioned middlewares (ROS and MOOS) but from a quick look at the implementation examples MOOS seems far more straightforward and flexible, while when using ROS it seems the whole system has to be build around it. $\endgroup$ – Anelito Sep 6 '17 at 21:55

What you are looking to produce is certainly achievable using the ROS middleware. As Joshua has already pointed out, there will be some additional overhead but this should be relatively small.

It is probably worth carrying out a literature search to investigate how other Autonomous Surface Vehicles (ASVs) have incorporated ROS into their software architecture. Published papers on ASVs like the Squirtle should provide you with a useful overview of the pros and cons of incorporating ROS into your design.

As regards the "harsh" environment of the Baltic, I'm aware of a number of ASVs that have been deployed there, for example Roboat, (although I'm not sure whether Roboat actually incorporated ROS). Again, a search of the literature should help you quantify the potential issues and help you decide whether ROS is appropriate.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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