blob: 0eb506eee93c19101584d96e390fd1c31eea8d91 [file] [log] [blame]
Diana Vandenberg223703d2017-01-28 17:39:53 -08001#include "y2017/control_loops/drivetrain/drivetrain_base.h"
2
3#include "frc971/control_loops/drivetrain/drivetrain_config.h"
4
5#include "frc971/control_loops/state_feedback_loop.h"
6#include "y2017/control_loops/drivetrain/drivetrain_dog_motor_plant.h"
7#include "y2017/control_loops/drivetrain/polydrivetrain_dog_motor_plant.h"
8#include "y2017/control_loops/drivetrain/kalman_drivetrain_motor_plant.h"
9#include "y2017/constants.h"
10
11using ::frc971::control_loops::drivetrain::DrivetrainConfig;
12
13namespace y2017 {
14namespace control_loops {
15namespace drivetrain {
16
17using ::frc971::constants::ShifterHallEffect;
18
19const ShifterHallEffect kThreeStateDriveShifter{0.0, 0.0, 0.0, 0.0, 0.25, 0.75};
20
21const DrivetrainConfig &GetDrivetrainConfig() {
22 static DrivetrainConfig kDrivetrainConfig{
Austin Schuhaab05dc2017-02-04 22:13:38 -080023 ::frc971::control_loops::drivetrain::ShifterType::NO_SHIFTER,
Diana Vandenberg223703d2017-01-28 17:39:53 -080024 ::frc971::control_loops::drivetrain::LoopType::CLOSED_LOOP,
25
26 ::y2017::control_loops::drivetrain::MakeDrivetrainLoop,
27 ::y2017::control_loops::drivetrain::MakeVelocityDrivetrainLoop,
28 ::y2017::control_loops::drivetrain::MakeKFDrivetrainLoop,
29
30 drivetrain::kDt,
31 drivetrain::kRobotRadius,
32 drivetrain::kWheelRadius,
33 drivetrain::kV,
34
35 drivetrain::kHighGearRatio,
36 drivetrain::kHighGearRatio,
37 kThreeStateDriveShifter,
38 kThreeStateDriveShifter,
39 true,
40 constants::GetValues().down_error,
Austin Schuhaab05dc2017-02-04 22:13:38 -080041 0.4,
Diana Vandenberg223703d2017-01-28 17:39:53 -080042 1.0};
43
44 return kDrivetrainConfig;
45};
46
47} // namespace drivetrain
48} // namespace control_loops
49} // namespace y2017