Meet Precision Mule

posted in: Uncategorized | 17

Once you’ve got your autonomous mower running, you’ll likely take a substantial time-hit defining and adjusting the precise path that you want it to cover as it mows the lawn.

In ArduPilot world, the set of coordinates (or waypoints) that your rover is scheduled to visit is often called a mission (and this mission is stored in a plain text file called a waypoints file). If you inhabit that world, you know that the de facto standard tool for basically all robot configuration and mission building is the superb Mission Planner (Windows) application written and actively maintained for nearly a decade as an open source project by Michael Oborne, an Australian super-dev. (Incidentally, the Australian people seem to be making a disproportionately big contribution to the advancement of open source autonomous robotics.)

Mission Planner

Mission Planner is a Swiss Army knife for ArduPilot-based robots — it provides dozens (if not hundreds) of functions — but for building the kind of centimeter-level side-by-side pass missions that I like to use for mowing, I don’t think it yet has functionality to fill that exact niche.

For a while I’ve wished for some browser-based / Google Maps-based / highly zoomable (i.e. for cm-level adjustments) app that will let you define a region via a standard Google Maps polygon and then magically generate a side-by-side pass (i.e. think parallel lines instead of concentric circles) mission for a mower to completely cover the user-defined area.

Not finding exactly this anywhere else, I’ve taken a rough stab at such an application and here present it to you for your enjoyment and critique:

Precision Mule: Serving up centimeter-level missions for your mowing rover
Precision Mule: Serving up centimeter-level missions for your mowing rover

What is Precision Mule?

Precision Mule is a centimeter-level mowing robot mission path generator. I say “mowing robot” because the motivational use case for the routes it generates is a mowing autonomous rover.

You use Precision Mule like this:

Please note that I have only tested Precision Mule with Firefox and Chrome — if anyone would like to tweak the code to work on your fav browser, feel free to submit a PR on GitHub.


Examples

So, for example, here is a mission I built with Precision Mow to mow the west lot:

Here’s a time-lapse of the mowing rover we’ve been using lately running that mission yesterday:

Here’s a mission covering basically the same area, but instead of north-to-south passes, we’re doing east-to-west, i.e.:

Just as a reminder, the heading of the waypoints is determined by the line between the first and second points of your polygon.

Here’s a time-lapse from yesterday running that mission:

Here’s a mission covering the north part of my property:

And here’s a time-lapse from earlier this morning mowing that mission:

Look closely and you’ll see Cousin Jason dropped by to check out the run.


Precision Mule Deep Dive

If you’re still reading at this point, you must have a use for this software. Here’s a video I threw together to (hopefully) make your precision path generating experience as enjoyable as humanly possible:


It’s all Open Source

The backend java server: https://github.com/waynebaswell/precision-mule-server

The ui web client: https://github.com/waynebaswell/precision-mule-ui

Look forward to hearing your feedback.

Till we meet again,

Sincerely,

Roby

Follow Roby:

Latest posts from

17 Responses

  1. Awesome work!

  2. Wow I was just thinking about this. I was wondering if there was a automatic way to generate waypoints? Just enter the boundary points and go!
    Nice work

  3. John Dolecki

    It would be a nice feature if you could set your boundaries (polygon) then draw circles or squares inside the boundary map like around trees and stuff were you would not want the mower to go. I don’t know how hard that would be but it would make autonomous mowers a lot easier.

    Nice work so far.

    • Hi John — PrecisionMule now supports obstacles (circle and square) as you mentioned —

      Take care,

      Roby

  4. Very impressive. I look forward to trying this out! I have an autonomous zero-turn mower that I have used for a couple of years. I have many enhancements I need to do but just haven’t found the time yet. The mower is doing a good job for me, though. I prefer to mow in a circular pattern and wrote a command line program to generate waypoints for that. Then about a year ago or so, Michael Oborne built that “survey” pattern into Mission Planner as well. But, being able to have a automated waypoint generation that avoids obstacles is great! I have to do it the hard way right now by creating creative polygons or multi-part missions that I merge together to avoid obstacles! https://www.youtube.com/playlist?list=PLIsYv3gzZOt9N9yZmpI_WYiMaBQ6HazOG

    • Hi Kenny!

      It’s been a real pleasure to follow your outstanding work in the ArduPilot forums and on your YouTube channel.

      Thank you for your significant contributions to the big automated rover space!

      Take care,

      Roby

  5. Roby,
    I have now used the Precision Mule! I like the name, but wonder what made you think of that! 🙂 It is a fine piece of work and I sure do love the object avoidance features. I have a couple of power poles in one of my fields. The circular avoidance object fits the bill for those perfectly.

    I’m going to throw out a few things I would like to see in the program, but in NO WAY am I suggesting you should work on them! It is enough that you have provided what you have and made it open source for all to enjoy and customize! If I find the time, I will work on these myself, although, I haven’t done much Java, mostly C and some other stuff in the “old” days.

    Potential Enhancements:
    1. Circular (well, actually polygonal from outside-to-inside) mowing pattern. Personally, I like to throw all the clippings to the outside, especially for mowing large fields with tall grass. I don’t like to go back over any old clippings. Man, would I love to have your object avoidance with a circular mowing pattern.
    2. Import a polygon (ability to select whether it comes in as an outline or as an avoidance shape) in Precision Mule from an a Mission Planner waypoint file.
    3. Import a polygon (ability to select whether it comes in as an outline or as an avoidance shape) in Precision Mule from a CSV file of lat-lon pairs.

    Not seeing a way to import existing coordinates, I saved a polygon file from Precision Mule and was able to reformat it pretty easily in a text editor so that each lat/lon pair was on a separate line and then used a block copy mode in the editor to copy from my coordinates into the JSON and reloaded into Precision Mule.

    I have looked at the object avoidance using fences in the newest version of ArduRover and Mission Planner, but, honestly, I haven’t quite figured it out yet. I’m pretty happy with the way you have implemented the avoidance in Precision Mule. (except that doggone circular mowing! 🙂 )

    Keep up the excellent work! I don’t know how you find the time but your work is awesome!
    Kenny

  6. Darren Gow-Brown

    Hi Roby,
    This software is what I would like to use. I believe you have the knowledge to add more features.
    The one I’m interested is adding a function/event to a waypoint.
    Please email me as I’m interested in the cost to add these functions
    Regards
    Darren for down under

  7. Leandro Silva

    Great work!
    I have some knowledge of java and I would like to start playing with your code. I see that after building the mission, there are some points inside the polygon that can be dragged to adjust the path. Is there any configuration to make these to appear every certain number of centimetres? And how can I make these real internal waypoints so they can be exported in the mission file? I’m just trying to create “checkpoints” where the robot will use landmark references to correct the path.

    Thanks

    • Hi Leandro,

      Not sure I’m totally tracking what you’re looking for here. The “Mission Path Width” field on precisionmule.com can be set at the centimeter level. In other words, setting that field 0.53 will give you 53 centimeters between passes.

      Take care,

      Roby

  8. Very cool. I love the approach. Suppose this would work for an autonomous snow plow as well?

  9. Hi Roby,

    Great work with Precision Mule. Just what I was looking for. However, it seem like, after I generate the polygon and press `Build Mission` it does not generate a path. I keep changing the angle and maybe once in 30 times I get it to generate.

    Wondering if this is an issue only with me and/or whether I am doing something wrong.

    Thanks.

  10. Hi Roby,
    Unless I am doing something wrong, Precision Mule appears to be no longer functional.

  11. Hi Roby,
    Finally figured out what I was not doing correctly when using Precision Mule and finally got it to Build a Mission.

Leave a Reply