blog banner desktop image blog banner mobile image

A Big Step Forward for ArduSub

ArduSub is the software at the heart of the BlueROV2. It’s based on the solid foundation of the ArduPilot code, which has been under development for years. ArduSub is open-source, fully featured, and growing rapidly.

Today we want to share some in-progress news that’s been in the works for a long time: we’re working on merging the ArduSub code into the main ArduPilot repository at github.com/ardupilot/ardupilot. What does mean? Well, up to this point, ArduSub has been developed in our own “branch” of the ArduPilot project. By merging into the main project, we’ll join the list of official ArduPilot vehicle types: ArduPlane, ArduCopter, and ArduRover. We’ll continue developing and maintain the code ourselves, but we’ll be assisted by the awesome developers at the ArduPilot organization. This is also allowed us to always be up to date with the latest features, improvements, and bugfixes contributed by the many maintainers.

At the moment, there is a pull-request for merging ArduSub into ArduPilot. You can keep track of that here.

For those of you interested in lots of details, here’s the text of the pull request, which explains a lot of the work we’ve done on ArduSub in the past year:

ArduSub has been in development for just over a year. In that time, we have come a long way. It started by simply copying the ArduCopter directory and poking around to see what we needed to change in order to make our vehicle move around underwater. Once we had accomplished that, and as we became accustomed to the extensive codebase, we progressed by increasing and improving functionality. We had our first stable release right at the end of 2016. We versioned the release as 3.4, in line with where we picked up from Copter. We are currently working on 3.5-dev.

We ship our BlueROV2 running ArduSub on a Pixhawk, and the response from professionals in the marine industry has been overwhelmingly positive. In addition to the BlueROV2, we’ve designed ArduSub to be very flexible, and we have DIY ROV users around the world with different ROV designs and motor configurations. ArduSub is thoroughly documented at ArduSub.com, and we have a very active ArduSub Gitter Channel.

From ArduCopter to ArduSub

The first hurdle was in figuring out how to make our vehicle actually move around underwater. The original development platform, the BlueROV1, has 6DOF, and while it can pitch and roll, it does not need to do so in order to translate in the x and y axes. Our solution was to subclass AP_MotorsMatrix with AP_Motors6DOF, overriding add_motor_raw to include the forward and lateral DOF that multicopters lack.

The second hurdle was acheiving the tantalizing prospect of holding depth with a positive or negatively buoyant vehicle. The onboard barometer is in a sealed compartment, and the pressure will obviously not correspond with altitude. The Bar30 pressure sensor, incorporates the MS5837 waterproof pressure sensor from Measurement Specialties, the same people who brought you the familiar MS5611. This sensor has almost exactly the same interface as the MS5611, which was a welcomed coincidence in the very early stages of development, when we were still learning how everything in ardupilot worked. We use the MS5611 driver to drive the external MS5837, and added a few members to the AP_Baro class in order to distinguish between an ‘air’ barometer and a ‘water’ barometer. Fortunately for us (and thanks to you guys), there was already support for multiple barometers and an option to set the primary barometer to use with the EKF. We also added a method to the EKF in order to internally set the baro_alt_noise parameter to a low value, because the pressure measurements underwater are very precise.

We have three supported flight modes, Manual (no stabilization), Stabilize, and Depth Hold. We have made progress in implementing more advanced position-enabled modes; we’ve even executed short missions in auto mode. We have also managed to create a working rudimentary model in SITL.

GPS receivers will not work underwater, so we have added an AP_GPS_MAVLINK class in order to support marine industry localization sensors. This class inherits AP_GPS_NMEA, and works by receiving raw NMEA sentence data from the telemetry connection in the form of the GPS_INJECT_DATA message. This was implemented before the AP_GPS_MAV type was added, and there is some overlap in terms of functionality. The advantage of AP_GPS_MAVLINK over AP_GPS_MAV is that the serial data (in the form of NMEA sentences) from a GPS system connected to a topside or companion computer can be sent directly over the MAVLink connection to the vehicle and parsed by the autopilot, with no need to parse the data at the origin before finally formatting the output as a GPS_INPUT MAVLink message. AP_GPS_MAVLINK also eliminates the requirement of reserving a UART for GPS input.

There are a few other minor additions to note:

  • The AP_JSButton library was added to handle joystick button mapping to various vehicle functions. – It is supported by QGC as well.
  • PosControl and Fence: added a minimum z limit in order to limit maximum depth
  • Added a leak detector library
  • Added a temperature sensor library

Hardware

ArduSub is used in conjunction with a hard-wired telemetry connection over a tether. This connection is implemented via a RS422 interface directly to the autopilot, or via UDP with MAVProxy running on a companion computer. Pilot input is expected to come over MAVLink via MANUAL_CONTROL messages, and RC input is not supported because RC signals will not penetrate water. Support for ArduSub has been integrated into QGroundControl, and we continue to contribute to QGroundControl in order to improve support for ArduSub as well as other features common to all vehicles.

We have tested ArduSub primarily on the Pixhawk 1, but we have some users on other autopilots including the Navio2 and BBBmini.

Where We’re Headed

ArduSub is being actively developed with a full time developer and several contributors around the world. We plan to continue adding new features and improvements and it’s very important to us to stick with ArduPilot’s original goal of being open source and highly capable. We think that ArduSub is already more capable and extensible than most other ROV control systems.

Notable Replies

  1. Great to see. We run Pixhawk on some of out UAVs so nice to see this all coming closer together.

  2. Avatar for kevink kevink says:

    Awesome news that it’s being integrated into the main ArduPilot branch! i really enjoyed reading through the PR text, just shows all the work that went into making this happen.

  3. Avatar for tciii tciii says:

    Nice work that the ROV community greatly appreciates.:slight_smile:
    Regards,
    TCIII AVD

  4. Features are nice, but -stability- is critical. Anything that helps reduce the number of bugs gets two thumbs up from me! :slight_smile:

Continue the discussion discuss.bluerobotics.com

4 more replies

Participants

Avatar for rjehangir Avatar for tciii Avatar for kevink Avatar for k-deboer Avatar for jwalser Avatar for schoonerlabs Avatar for kaosrulz Avatar for paul-unterweiser