Skip to content

Autonomous

Joel Gallant edited this page Jun 19, 2013 · 1 revision

Writing your autonomous mode(s) can be confusing. You might want to do a lot in those 15 seconds. ATALibJ provides a base for whatever some basic autonomous functions.

###Command-Based Autonomous Modes If you are familiar with the wpilibj command-based structure, you'll be familiar with how this works. See Command Groups for more information on command groups in ATALibJ. To use your autonomous mode, use this convention in your RobotMode:

public void initAutonomous() {
     new MyAutonomousMode().run();
}

This will run your CommandGroup once during autonomous. If your autonomous mode repeats, consider using LoopingCommand instead of using the periodicAutonomous method.

All autonomous modes are different, so make sure you judge what's right for you.

###Pure autonomous modes It isn't terribly difficult to hard-code autonomous modes inside of initAutonomous(). If you prefer to have full control of your autonomous mode, and don't need concurrent/command functionalities, you have the option to code your autonomous mode manually.

###Script-based autonomous modes It just so happens that I (Joel) have made a scripting language built in Java just for this. As of 17/06/13, Gordian is not completely stable, but it has been used in competitions without too many problems. Feel free to check it out.

Available here

###Your own autonomous structure ATALibJ has enough API access to let you do whatever you need to. If you feel like the other options don't do your autonomous justice, make it yourself! If you come up with anything useful, please tell us about it - we'd be glad to post it here.

Clone this wiki locally