ArduBoat Development

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:

P: 1.200

I: 0.02

D: 0.07

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:

https://www.youtube.com/watch?v=ogQsaIHyJnk&feature=youtu.be

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

Join diydrones

Email me when people reply –

Replies

  • Hello sir i would to ask whre you put serv pin ? on outputs or analog pin apm ? 

    and when you give mission did you must use do set servo command to the boat for turn left or right?

  • Hi Gerald,

    Thanks for your response.

    I have since found my problem (or more to the point Linus found it). And now have function on all out put channels.

    Unfortunately, I still cannot operate the "Turngy receiver switches" with the output channels.

    If you have any ideas on this?

    Cheers,

    Richard3701846793?profile=original

  • Has anyone done any further work on this?

    I am currently trying to get my boat project into working order but have run into a problem.

    I have a APM 2.5 with a Orange LRS Open TX/RX. Using Rover Firmware.
    I have Flashed the TX/RX with the latest firmware and bound. All ok. Using PPM, so single cable from RX to APM (CH5, with CH2/CH3 jumper).
    I have set up the APM (flashed the latest rover 2.45 via Mission Planner). All ok.
    I have set up and calibrated the TX/RX and APM with the Mission Planner. All functions correctly, red bars moved to max position as should, on all channels.
    In normal operation throttle and steering function as expected.
    I have 4 v10servo switches from 3D Robotics that I wish to use on channels 5-8. I have reassigned Channels 5 (to my gear switch) and 7 (to my Throttle cut switch).
    Because my boat is using large servos and multiple on rudder I have a dedicated power supply to run the servos. To do this I have cut and terminated the (+) cable on the servo cable from the APM to the servo power unit.
    As the servo switches have a low power demand I have used the JP1 and am powering the Out Put rail from the AMP (power module).
    I have tested the Out Put rail and am getting 5.0v.
    After all of this Throttle and steering (CH1&3) function correctly but CH2, 4,5,6,7,8 have no output?
    any ideas on how I can get these channels working?

    I have been through the setting and cannot see anything wrong?
  • Hi Gerald,

    Your project is extremely interesting and there are lots of uses and possibilities for an autonomous boat.

    I am extremely happy to see "Tridge" providing you assistance, he is an amazing developer.

    I am interested in the SBC ROS end of things too for a APM:Bot project I am working on.

    I will be using a PX4 controller for interfacing and control tasks.

    And

    Initially my project can accommodate a full sized laptop but I am looking at an appropriate SBC for the long run to handle depth vision tasks initially with Kinect and Laser scanner and probably upgrading to Kinect 1 when feasible.

    I have been leaning towards the Fit but Advantech is also under consideration.

    I would appreciate it if you could tell me which exact version of the MIO-2261 you are using and what your impressions are so far. 

  • Admin

    @Gerald,

    Nice work. Very impressive.

    When tuning the NAVL1_PERIOD, I would start with 5 and see how well the boat follows your mission waypoints.

    On my rover, I found that a setting of 3 was great for navigating chicane type of waypoints, but resulted in hunting on longer straight line paths between waypoint. Conversely a value between 4 and 5 minimized hunting on longer straight line paths, but had a hard time navigating chicane type waypoints.

    Regard,

    TCIII

  • Developer

    Good stuff, thanks for posting!

    You may find that the experimental branch that Tom and I have been working on to add a L1 navigation controller to APM:Rover may be useful. Have a look at this branch.

    For a ROS connection, you'll probably want two serial ports on the APM2, one for a MAVLink telemetry radio, and one for linking to the SBC. You'll find a UART2 connector on the side of the APM2, probably without any header pins in it. I'd suggest you use that for linking into ROS, either by enabling MAVLink on it, or via your own protocol.

    You might also find using MAVProxy on the SBC useful, then write a Python/ROS module for MAVProxy. That would make it much easier to get hooked into ROS.

    Cheers, Tridge

    tridge/ardupilot
    Contribute to tridge/ardupilot development by creating an account on GitHub.
  • 3D Robotics

    BTW, this would have made a perfect blog post, worthy of the larger readership. If you want to repost it there I'm all in favor!

  • 3D Robotics

    Excellent! Really glad to see this. We're happy to launch boat.ardupilot.com just as soon as you're ready to document this.

    (And yes, it's crucial to keep the magnetometer as far from interference as possible. That's why we always use an external mag or mount the APM on a platform with rovers.  The new GPS with built-in mag is a good solution. )

This reply was deleted.

Activity