Comran Morshed | 6c6a0a9 | 2016-01-17 12:45:16 +0000 | [diff] [blame^] | 1 | #include "y2016/control_loops/drivetrain/drivetrain_base.h" |
Comran Morshed | 9a9948c | 2016-01-16 15:58:04 +0000 | [diff] [blame] | 2 | |
| 3 | #include "frc971/control_loops/drivetrain/drivetrain_config.h" |
| 4 | |
Comran Morshed | 6c6a0a9 | 2016-01-17 12:45:16 +0000 | [diff] [blame^] | 5 | #include "y2016/control_loops/drivetrain/drivetrain_dog_motor_plant.h" |
| 6 | #include "y2016/control_loops/drivetrain/polydrivetrain_dog_motor_plant.h" |
| 7 | #include "y2016/control_loops/drivetrain/kalman_drivetrain_motor_plant.h" |
| 8 | #include "y2016/constants.h" |
Comran Morshed | 9a9948c | 2016-01-16 15:58:04 +0000 | [diff] [blame] | 9 | |
| 10 | using ::frc971::control_loops::drivetrain::DrivetrainConfig; |
| 11 | |
Comran Morshed | 6c6a0a9 | 2016-01-17 12:45:16 +0000 | [diff] [blame^] | 12 | namespace y2016 { |
Comran Morshed | 9a9948c | 2016-01-16 15:58:04 +0000 | [diff] [blame] | 13 | namespace control_loops { |
| 14 | |
| 15 | const DrivetrainConfig &GetDrivetrainConfig() { |
| 16 | static DrivetrainConfig kDrivetrainConfig{ |
| 17 | ::frc971::control_loops::drivetrain::ShifterType::HALL_EFFECT_SHIFTER, |
| 18 | |
Comran Morshed | 6c6a0a9 | 2016-01-17 12:45:16 +0000 | [diff] [blame^] | 19 | ::y2016::control_loops::drivetrain::MakeDrivetrainLoop, |
| 20 | ::y2016::control_loops::drivetrain::MakeVelocityDrivetrainLoop, |
| 21 | ::y2016::control_loops::drivetrain::MakeKFDrivetrainLoop, |
Comran Morshed | 9a9948c | 2016-01-16 15:58:04 +0000 | [diff] [blame] | 22 | |
Comran Morshed | 6c6a0a9 | 2016-01-17 12:45:16 +0000 | [diff] [blame^] | 23 | drivetrain::kDt, |
| 24 | drivetrain::kStallTorque, |
| 25 | drivetrain::kStallCurrent, |
| 26 | drivetrain::kFreeSpeedRPM, |
| 27 | drivetrain::kFreeCurrent, |
| 28 | drivetrain::kJ, |
| 29 | drivetrain::kMass, |
| 30 | drivetrain::kRobotRadius, |
| 31 | drivetrain::kWheelRadius, |
| 32 | drivetrain::kR, |
| 33 | drivetrain::kV, |
| 34 | drivetrain::kT, |
Comran Morshed | 9a9948c | 2016-01-16 15:58:04 +0000 | [diff] [blame] | 35 | |
Comran Morshed | 6c6a0a9 | 2016-01-17 12:45:16 +0000 | [diff] [blame^] | 36 | constants::GetValues().turn_width, |
| 37 | constants::GetValues().high_gear_ratio, |
Comran Morshed | 9a9948c | 2016-01-16 15:58:04 +0000 | [diff] [blame] | 38 | constants::GetValues().low_gear_ratio, |
Comran Morshed | 6c6a0a9 | 2016-01-17 12:45:16 +0000 | [diff] [blame^] | 39 | constants::GetValues().left_drive, |
| 40 | constants::GetValues().right_drive}; |
Comran Morshed | 9a9948c | 2016-01-16 15:58:04 +0000 | [diff] [blame] | 41 | |
| 42 | return kDrivetrainConfig; |
| 43 | }; |
| 44 | |
| 45 | } // namespace control_loops |
Comran Morshed | 6c6a0a9 | 2016-01-17 12:45:16 +0000 | [diff] [blame^] | 46 | } // namespace y2016 |