Hello! I am rebuilding an old APMBoat from a few years ago, and at the time was unable to find a way to get the boat to hold position. When it reached the final waypoint, it would just stop and float with the current/wind. The only thing I was able to do is have it change speed and repeat a pattern with the DO_JUMP command very slowly. 

But that wastes power - is there a way to get it to return to a location if it drifts a set distance away? 

I was thinking I would use a geofence, but it looks like that capability is not implemented iwth APMRover. 

Any workarounds, suggestions? 

Thanks!

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

Join diydrones

Email me when people reply –

Replies

  • Developer

    @jean-luc, this is the breadcrumb functionality you are talking about.  Copter's are very interested in this too and there has been lots of discussion in various places.  Its actually more complex then it seems but it is on the list albeit not very high.

    Thanks, Grant.

    • Grant, just my vision for the RTL mode on sea:

      When the boat go in RTL mode (by failsafe or by remote action), there are two possibility for the boat:

      -If the Rally point exist, it's going to the nearest rally point and waits in loiter mode.

      -If the Rally point do not exist, the boat stop and waits in loiter mode.

      Then, if we want to see the boat come back to the home position in RTL mode, we just need to create a Rally point at our home position.

      Regards,

    • jean-luc;

      I disagree.  If the Rally point doesn't exist the boat does a RTL.  There may be times a GCS is not being used, therefore, coming home would be the only option.  No GCS, no ability to program a Rally point.

      Regards,

      David R. Boulanger

    • David,

      I was thinking of an automatic Rally point generated at the boat position, when this one switches to RTL mode in case of failsafe.

      Regards,

    • jean-luc;

      I believe as the code is now when you first arm, a home location is generated for your RTL location.

      Regards,

      David R. Boulanger

  • Developer

    Darius - as I've explained to you previously the code is completely open source and open to modification by ANYONE.  The API is completely open.  Its open open open.  Go for your life.

    If you want "scripts" as you put it try DroneKit - http://dronekit.io/  - Rover supports that.

    @Antimatter - I can implement what you request in terms of the vehicle returning to the waypoint if it drifts off.  Give me a few days (I'm away again for week and a bit) and I'll have something.  However, you will need to test it via loading custom firmware on your boat, trying it out and providing feedback and getting dataflash logs if we have problems.  Also, as it will be alpha code if your boat crashes into the Queen Mary and it sinks its not my fault - although I will want to see the video ;-)

    Thanks, Grant.

    DroneKit
    DroneKit makes it easy to create custom applications to control any vehicle powered by MAVLink. Best of all, it is open sourced and free for everyone…
    • Grant,  Did anything ever happen with this " position hold mode", or what ever you want to call it.  It would be great to have a boat go into HOLD mode and then if it drifted outside of a certain user defined radius it would then power back up and go to the location it was in when the HOLD was started.

      Regards,

      David R. Boulanger

    • Developer

      Yes I have it implemented but it needs a little more work.  Its in my repository at the moment:

      https://github.com/gmorph/ardupilot/tree/rover-return-to-loiter-way...

      I've been busy adding arming to the Rover code which is now in master and I should be able to work on this soon.  Not much longer!

      Thanks, Grant.

      gmorph/ardupilot
      APM Plane, APM Copter, APM Rover source. Contribute to gmorph/ardupilot development by creating an account on GitHub.
    • So it will be in 2.52 beta or 2.53 beta?  I just noticed 2.51b last night.

      Thanks again Grant!

      Regards,

      David R. Boulanger

    • Developer

      It might be in 3.0.0 beta.  LOTS of changes in the upcoming Rover release including the new EKF and arming so I thought I'd jump the version number.  Any thoughts on this are welcome.

      Thanks, Grant.

This reply was deleted.