Forty-Nine-Ninety / 2018

2018 Robot Code for First PowerUp: Gryphon Robotics
2 stars 1 forks source link

Drive with Gyro & PID in Teleop #21

Closed benjamin-antupit closed 5 years ago

benjamin-antupit commented 5 years ago

Make the robot drive accurately in teleop with feedback from AHRS using a PID loop.

Stage 1: throtte ≠ 0, turnSteepness = 0 (robot goes straight)

See GyroStraight

Stage 2: throttle = 0, turnSteepness ≠ 0 (robot turns in place)

See GyroTurn

Stage 3: throttle ≠ 0, turnSteepness ≠ 0 (robot arc turns)

This function will need to predict the change in heading based on controller input and then stay on the heading using a PID loop with the AHRS as the source.

benjamin-antupit commented 5 years ago

See TeleopArcadeDrive.java in Master for information. This was started in the teleopStraightDrive-PIDturnController branch, but it is not important now.

benjamin-antupit commented 5 years ago

We added pid-based autonomus driving, so we should be able to adapt that to teleop

benjamin-antupit commented 5 years ago

See branch Teleop-PIDDrive and new PIDDriveTrainController class.

benjamin-antupit commented 5 years ago

Let's forget about this for now. It would take a lot of development time to complete and it's not worth it right now. We can work on it later if it's still a priority.