Skip to content
This repository has been archived by the owner on Sep 17, 2020. It is now read-only.

Creat autonomous command: AutoDriveTurn #7

Open
michaelvdow opened this issue Jan 10, 2017 · 0 comments
Open

Creat autonomous command: AutoDriveTurn #7

michaelvdow opened this issue Jan 10, 2017 · 0 comments
Assignees

Comments

@michaelvdow
Copy link
Contributor

michaelvdow commented Jan 10, 2017

This class will extends the Command class. It needs to have a PIDController object, DummyPIDOutpyt object, and references to the DriveSubsystem and OI classes from the main Robot class.

It will take a double as a parameter for the angle the robot needs to turn.

In the initialize command, it needs to initialize the DummyPIDOuptut object, reset the gyro, and create the turnController.

In the execute command, create a while loop that will run while pid controller is not on target and while the stop button on the controller is pushed. In this loop, it will get the pid output and use this to set the speed of the drive subsystem. Then disable the pid controller and end the method by setting finished to true.

The end() and interrupted() methods need to stop the driveSubsystem.

Check the RobotExample repository for more help

@gabrielbryk gabrielbryk self-assigned this Jan 12, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants