Closed benjamin-antupit closed 5 years ago
See TeleopArcadeDrive.java in Master for information. This was started in the teleopStraightDrive-PIDturnController branch, but it is not important now.
We added pid-based autonomus driving, so we should be able to adapt that to teleop
See branch Teleop-PIDDrive and new PIDDriveTrainController class.
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.
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.