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

    • 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.

    • Grant,

      First of all, all of  you developers are doing a world of good.  Active loiter for boats will be huge and what ever number beta release you want to call it is fine with me.  One last question for you and then I promise to leave you alone.  Are Rally Points possible in the rover code?  In the Rover manual they are talked about but it sounds like it may be just Plane and Copter.  I have not tested to see if they work and just thought I would ask first.  Again great job.

      Regards,

      David R. Boulanger

    • Developer

      Harass me as much as you like - that's what I'm here for :-)

      Rally points aren't in Rover yet.  I'm interested to know how you would like them to function in Rover?  RTL to the nearest rally point?

      Thanks, Grant.

    • Grant,

      I'm thinking rovers and boats using the same code could benefit from a passive or active Loiter to the rally point.  Or a passive and active RTL.  The problem with boats obviously is you want them to failsafe to somewhere they can get to and be there by the time you can get out to them.  The rover is just going to sit there and wait for help to arrive.  Sound like a good idea?

      Regards,

      David R. Boulanger

This reply was deleted.