Thread: Autonomous Help
View Single Post
  #2   Spotlight this post!  
Unread 03-03-2013, 23:20
F22Rapture's Avatar
F22Rapture F22Rapture is offline
College Student, Mentor
AKA: Daniel A
FRC #3737 (4H Rotoraptors)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Goldsboro, NC
Posts: 476
F22Rapture has a brilliant futureF22Rapture has a brilliant futureF22Rapture has a brilliant futureF22Rapture has a brilliant futureF22Rapture has a brilliant futureF22Rapture has a brilliant futureF22Rapture has a brilliant futureF22Rapture has a brilliant futureF22Rapture has a brilliant futureF22Rapture has a brilliant futureF22Rapture has a brilliant future
Re: Autonomous Help

Are you using the Command-Based template? Create a command for each thing you want to do, then string them together with a Command Group.

In RobotMain

Code:
private Command autonomousCommand;

public void autonomousInit() {
        autonomousCommand = new Auton0();    
        autonomousCommand.start();
    }

public void autonomousPeriodic() {
        Scheduler.getInstance().run();
    }
In command group

Code:
public class Auton0 extends CommandGroup {
    
    public Auton0() {
        addSequential(new SetFrontSpeed(50);
        addParallel(new SetBackSpeed(50);
        addSequential(new SetAngle(90));
        addSequential(new WaitCommand(3));
        addSequential(new SetAngle(45));
    
        etc. etc.
    }
__________________
Research is what I’m doing when I don’t know what I’m doing.
- Wernher von Braun
Attending: Raleigh NC Regional

Last edited by F22Rapture : 03-03-2013 at 23:24.
Reply With Quote