blob: 2e5138cdb1df6dbe53adf86affc5c01673c7421b [file] [log] [blame]
Comran Morshed6c6a0a92016-01-17 12:45:16 +00001#include "y2016/control_loops/drivetrain/drivetrain_base.h"
Comran Morshed9a9948c2016-01-16 15:58:04 +00002
3#include "frc971/control_loops/drivetrain/drivetrain_config.h"
4
Comran Morshed6c6a0a92016-01-17 12:45:16 +00005#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 Morshed9a9948c2016-01-16 15:58:04 +00009
10using ::frc971::control_loops::drivetrain::DrivetrainConfig;
11
Comran Morshed6c6a0a92016-01-17 12:45:16 +000012namespace y2016 {
Comran Morshed9a9948c2016-01-16 15:58:04 +000013namespace control_loops {
14
15const DrivetrainConfig &GetDrivetrainConfig() {
16 static DrivetrainConfig kDrivetrainConfig{
17 ::frc971::control_loops::drivetrain::ShifterType::HALL_EFFECT_SHIFTER,
18
Comran Morshed6c6a0a92016-01-17 12:45:16 +000019 ::y2016::control_loops::drivetrain::MakeDrivetrainLoop,
20 ::y2016::control_loops::drivetrain::MakeVelocityDrivetrainLoop,
21 ::y2016::control_loops::drivetrain::MakeKFDrivetrainLoop,
Comran Morshed9a9948c2016-01-16 15:58:04 +000022
Comran Morshed6c6a0a92016-01-17 12:45:16 +000023 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 Morshed9a9948c2016-01-16 15:58:04 +000035
Comran Morshed6c6a0a92016-01-17 12:45:16 +000036 constants::GetValues().turn_width,
37 constants::GetValues().high_gear_ratio,
Comran Morshed9a9948c2016-01-16 15:58:04 +000038 constants::GetValues().low_gear_ratio,
Comran Morshed6c6a0a92016-01-17 12:45:16 +000039 constants::GetValues().left_drive,
40 constants::GetValues().right_drive};
Comran Morshed9a9948c2016-01-16 15:58:04 +000041
42 return kDrivetrainConfig;
43};
44
45} // namespace control_loops
Comran Morshed6c6a0a92016-01-17 12:45:16 +000046} // namespace y2016