Skip to content
This repository was archived by the owner on Sep 14, 2019. It is now read-only.

PID input/output ranges and un-overriding all of kate's stuff#52

Merged
lhmcgann merged 3 commits intoDeepBlueRobotics:masterfrom
lhmcgann:master
Feb 3, 2018
Merged

PID input/output ranges and un-overriding all of kate's stuff#52
lhmcgann merged 3 commits intoDeepBlueRobotics:masterfrom
lhmcgann:master

Conversation

@lhmcgann
Copy link
Copy Markdown
Contributor

@lhmcgann lhmcgann commented Feb 1, 2018

No description provided.

set proper kF constants for move and turn PIDs as well
fixed inputRange and outputRange for each PID controller (move, turn,
leftV, rightV)
setMaxOutput of robotDrive to the robot's max speed (in inches)
@lhmcgann lhmcgann requested review from brettle and corvinb February 1, 2018 04:33
@lhmcgann
Copy link
Copy Markdown
Contributor Author

lhmcgann commented Feb 1, 2018

Copy link
Copy Markdown
Member

@brettle brettle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Also builds passes unit tests on my machine.

implementation

- RobotMap:
set both VelocityPIDControllers' input ranges to +- Max High Speed,
output ranges are +-1, and initial kF constants based on Max Low Speed
(for more accuracy in Auto); set max output of robotDrive to Max High
Speed
- DT/DTInterface: new method getCurrentMaxSpeed() returns max speed
based on if robot is in high or low gear; new method
resetVelocityPIDkFConsts() that resets kF constants of both VPIDs based
on return of getCurrentMaxSpeed and returns new kF value; updated method
updatePidConstants() to call resetVelocityPIDkFConsts() instead of just
passing in 1/Max Speed
- PIDMove/Turn commands: when determining kF values for move/turn PIDs,
called getCurrentMaxSpeed() instead of SD value Max Speed; set
moveController input range to +- Max High Speed
- ShiftHigh/LowGear commands: called resetVelocityPIDkFConsts() after SD
value reset
- NOTE: all Max Speeds should be in inches/per!!!
@lhmcgann
Copy link
Copy Markdown
Contributor Author

lhmcgann commented Feb 2, 2018

@brettle a few more changes based on our previous conversations about PID input/output ranges and kF values

@lhmcgann
Copy link
Copy Markdown
Contributor Author

lhmcgann commented Feb 2, 2018

@lhmcgann lhmcgann merged commit 4937c90 into DeepBlueRobotics:master Feb 3, 2018
@lhmcgann
Copy link
Copy Markdown
Contributor Author

lhmcgann commented Feb 3, 2018

all of PID stuff still needs to be tested thouroughly

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants