Piggy Plotter - Exploding Bacon's Autonomous Designer

Well, it’s that time; Championships is over, so it’s time for the release of one of our latest projects:
http://i.imgur.com/m4ZEByz.png
Piggy Plotter is a new way to design autonomouses; a way that requires less programming and allows for greater accuracy. With our simple point-and-click approach, you can say exactly where you want your robot to go on the field.

How does it work?

Piggy Plotter’s field is completely to-scale; all the field elements are the proper size and are distanced properly. This lets Piggy Plotter know exactly what distance you need to move in order to get to your destination. By default, the ratio of pixels-to-inches is 2 pixels to an inch, but you can change that as you see fit.

How do I use my autonomous?

Piggy Plotter has two ways to export your autonomouses; one is complete, the other is still in development (we are still in early testing, after all!).

Way One - “.auto” files.

The first way is the “.auto” file. Here’s what one looks like:

drive:100]intake:1]wait:2]intake:0]liftTo:bottom]liftTo:top]

Let me explain this; there are two parts to each “command” in the file. Lets look at “drive:100]”. “drive” is the name of the command. A “:” is an argument separator, saying that the next piece of data given is an argument for “drive”. “100” is the argument. The “]” means end of command. In this case, the whole segment put together is “drive 100”, meaning “drive 100 inches” to the robot.

There are two ways (that we’ve thought of) to use a .auto file:

  • Write an on-robot interpreter for .auto files.
    This is what we did this year. We store our .auto files on a flash drive, select which one we want to use, and the robot interprets the data and executes it. - Manually translate it to code.
    This one’s simple; go through the .auto file and translate each command to it’s programming equivalent on your robot. For example, for a Java programmer, “drive:100]” might be “drive(100);”.

Way Two (in development) - Export to Programming

This way is the most plug-in play. You will be able to export your autonomous to be a simple string of functions in either C++ or Java. Instead of a .auto file that you have to either manually translate to code or have to parse through, you’ll be given a set of functions to implement. Here’s an example of an autonomous exported to Java:

    void auto() {
        drive(100);
        intake(1);
        wait(2);
        intake(0);
        liftTo("top");
        liftTo("bottom");
    }
    
    void drive(double d) {
        //TODO: You need to implement this!
    }
    
    void intake(double d) {
        //TODO: You need to implement this!
    }
    
    void wait(double d) {
        //TODO: You need to implement this!
    }
    
    void liftTo(String s) {
        //TODO: You need to implement this!
    }

Where can I get it?

You can download Piggy Plotter from our Github repository, where you can also view it’s entire source and read our wiki for more in-depth information. Please note that Piggy Plotter is still in it’s early form, so if you have any suggestions/comments or you’ve found a bug, please tell us!

Piggy Plotter’s Github Repository

Closing Words

We hope that in the future, Piggy Plotter will change the nature of how autonomous mode works. Instead of teams laboring over one or a few autonomouses, new autonomouses will be able to be created on a whim at competitions. Piggy Plotter allows autonomous to be more about strategy and less about being a large programming hassle. Imagine being able to change your autonomous to work around another team’s autonomous without simply disabling your autonomous all-together. Imagine you (or your programmers) not spending all their time fine-tuning an autonomous just for it to become unneeded or need to be heavily changed. Imagine that you can create a new autonomous whenever you want, test it up on blocks once, and know that it has a high likelihood of working. At two of our competitions, we were able to create new autonomouses on a whim to assist our alliance partners. This is our dream for Piggy Plotter.

Technical Stuff

Feel free you use Piggy Plotter and it’s source for anything you want, so long (in the case of the source) you give credit where credit is due. Please remember Piggy Plotter (as of the time this was posted) is in an early-beta state, so things may not be polished and such. If you find a bug or have a suggestion/comment, feel free to say it! The whole idea of releasing Piggy Plotter now is to get community input!

I love the idea behind this. One thing that I noticed however is that it looks like this only supports tank drives at the moment. Although an omnidirectional drive could use this, it doesn’t utilize the features of that kind of drive ie. you must rotate to go left, you cannot strafe left.

Obviously still under development as you have stated. Definitely something that can easily be useful to teams if they were to integrate it into their code.

Omnidirectional are supported; Piggy Plotter supplies you with an angle and distance every time you drive. You’d just move in X distance at X angle instead of turning to X angle and then driving.