Comran Morshed | 5323ecb | 2015-12-26 20:50:55 +0000 | [diff] [blame] | 1 | #ifndef FRC971_CONTROL_LOOPS_DRIVETRAIN_CONSTANTS_H_ |
| 2 | #define FRC971_CONTROL_LOOPS_DRIVETRAIN_CONSTANTS_H_ |
| 3 | |
| 4 | #include <functional> |
| 5 | |
James Kuszmaul | 6802533 | 2024-01-20 17:06:02 -0800 | [diff] [blame] | 6 | #include "aos/flatbuffer_merge.h" |
Austin Schuh | a062edb | 2019-01-03 13:17:13 -0800 | [diff] [blame] | 7 | #if defined(__linux__) |
| 8 | #include "frc971/control_loops/hybrid_state_feedback_loop.h" |
James Kuszmaul | 6802533 | 2024-01-20 17:06:02 -0800 | [diff] [blame] | 9 | #include "frc971/control_loops/hybrid_state_feedback_loop_converters.h" |
Austin Schuh | a062edb | 2019-01-03 13:17:13 -0800 | [diff] [blame] | 10 | #endif |
James Kuszmaul | 6802533 | 2024-01-20 17:06:02 -0800 | [diff] [blame] | 11 | #include "frc971/control_loops/drivetrain/drivetrain_config_static.h" |
Comran Morshed | 5323ecb | 2015-12-26 20:50:55 +0000 | [diff] [blame] | 12 | #include "frc971/control_loops/state_feedback_loop.h" |
James Kuszmaul | 6802533 | 2024-01-20 17:06:02 -0800 | [diff] [blame] | 13 | #include "frc971/control_loops/state_feedback_loop_converters.h" |
Austin Schuh | a062edb | 2019-01-03 13:17:13 -0800 | [diff] [blame] | 14 | #include "frc971/shifter_hall_effect.h" |
Comran Morshed | 5323ecb | 2015-12-26 20:50:55 +0000 | [diff] [blame] | 15 | |
Stephan Pleines | d99b1ee | 2024-02-02 20:56:44 -0800 | [diff] [blame] | 16 | namespace frc971::control_loops::drivetrain { |
Comran Morshed | 5323ecb | 2015-12-26 20:50:55 +0000 | [diff] [blame] | 17 | |
James Kuszmaul | c29f457 | 2023-02-25 17:02:33 -0800 | [diff] [blame] | 18 | // Configuration for line-following mode. |
| 19 | struct LineFollowConfig { |
| 20 | // The line-following uses an LQR controller with states of [theta, |
| 21 | // linear_velocity, angular_velocity] and inputs of [left_voltage, |
| 22 | // right_voltage]. |
| 23 | // These Q and R matrices are the costs for state and input respectively. |
| 24 | Eigen::Matrix3d Q = |
| 25 | Eigen::Matrix3d((::Eigen::DiagonalMatrix<double, 3>().diagonal() |
| 26 | << 1.0 / ::std::pow(0.1, 2), |
| 27 | 1.0 / ::std::pow(1.0, 2), 1.0 / ::std::pow(1.0, 2)) |
| 28 | .finished() |
| 29 | .asDiagonal()); |
| 30 | Eigen::Matrix2d R = |
| 31 | Eigen::Matrix2d((::Eigen::DiagonalMatrix<double, 2>().diagonal() |
| 32 | << 1.0 / ::std::pow(12.0, 2), |
| 33 | 1.0 / ::std::pow(12.0, 2)) |
| 34 | .finished() |
| 35 | .asDiagonal()); |
| 36 | |
| 37 | // The driver can use their steering controller to adjust where we attempt to |
| 38 | // place things laterally. This specifies how much range on either side of |
| 39 | // zero we allow them, in meters. |
| 40 | double max_controllable_offset = 0.1; |
James Kuszmaul | 6802533 | 2024-01-20 17:06:02 -0800 | [diff] [blame] | 41 | |
| 42 | static LineFollowConfig FromFlatbuffer(const fbs::LineFollowConfig *fbs) { |
| 43 | if (fbs == nullptr) { |
| 44 | return {}; |
| 45 | } |
Austin Schuh | 6bdcc37 | 2024-06-27 14:49:11 -0700 | [diff] [blame] | 46 | CHECK(fbs->q() != nullptr); |
| 47 | CHECK(fbs->r() != nullptr); |
James Kuszmaul | 6802533 | 2024-01-20 17:06:02 -0800 | [diff] [blame] | 48 | return LineFollowConfig{ |
Austin Schuh | 6bdcc37 | 2024-06-27 14:49:11 -0700 | [diff] [blame] | 49 | .Q = ToEigenOrDie<3, 3>(*fbs->q()), |
| 50 | .R = ToEigenOrDie<2, 2>(*fbs->r()), |
James Kuszmaul | 6802533 | 2024-01-20 17:06:02 -0800 | [diff] [blame] | 51 | .max_controllable_offset = fbs->max_controllable_offset()}; |
| 52 | } |
James Kuszmaul | c29f457 | 2023-02-25 17:02:33 -0800 | [diff] [blame] | 53 | }; |
| 54 | |
James Kuszmaul | 6e5f825 | 2024-03-17 21:00:08 -0700 | [diff] [blame] | 55 | struct SplineFollowerConfig { |
| 56 | // The line-following uses an LQR controller with states of |
| 57 | // [longitudinal_position, lateral_positoin, theta, left_velocity, |
| 58 | // right_velocity] and inputs of [left_voltage, right_voltage]. These Q and R |
| 59 | // matrices are the costs for state and input respectively. |
| 60 | Eigen::Matrix<double, 5, 5> Q = Eigen::Matrix<double, 5, 5>( |
| 61 | (::Eigen::DiagonalMatrix<double, 5>().diagonal() << ::std::pow(60.0, 2.0), |
| 62 | ::std::pow(60.0, 2.0), ::std::pow(40.0, 2.0), ::std::pow(30.0, 2.0), |
| 63 | ::std::pow(30.0, 2.0)) |
| 64 | .finished() |
| 65 | .asDiagonal()); |
| 66 | Eigen::Matrix2d R = Eigen::Matrix2d( |
| 67 | (::Eigen::DiagonalMatrix<double, 2>().diagonal() << 5.0, 5.0) |
| 68 | .finished() |
| 69 | .asDiagonal()); |
| 70 | |
| 71 | static SplineFollowerConfig FromFlatbuffer( |
| 72 | const fbs::SplineFollowerConfig *fbs) { |
| 73 | if (fbs == nullptr) { |
| 74 | return {}; |
| 75 | } |
Austin Schuh | 6bdcc37 | 2024-06-27 14:49:11 -0700 | [diff] [blame] | 76 | CHECK(fbs->q() != nullptr); |
| 77 | CHECK(fbs->r() != nullptr); |
| 78 | return SplineFollowerConfig{.Q = ToEigenOrDie<5, 5>(*fbs->q()), |
| 79 | .R = ToEigenOrDie<2, 2>(*fbs->r())}; |
James Kuszmaul | 6e5f825 | 2024-03-17 21:00:08 -0700 | [diff] [blame] | 80 | } |
| 81 | }; |
| 82 | |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 83 | template <typename Scalar = double> |
Comran Morshed | 5323ecb | 2015-12-26 20:50:55 +0000 | [diff] [blame] | 84 | struct DrivetrainConfig { |
| 85 | // Shifting method we are using. |
| 86 | ShifterType shifter_type; |
| 87 | |
Comran Morshed | 76ca8f5 | 2016-02-21 17:26:28 +0000 | [diff] [blame] | 88 | // Type of loop to use. |
| 89 | LoopType loop_type; |
| 90 | |
Campbell Crowley | 2527ed2 | 2017-02-17 21:10:02 -0800 | [diff] [blame] | 91 | // Type of gyro to use. |
| 92 | GyroType gyro_type; |
| 93 | |
Diana Burgess | d0180f1 | 2018-03-21 21:24:17 -0700 | [diff] [blame] | 94 | // Type of IMU to use. |
James Kuszmaul | 6802533 | 2024-01-20 17:06:02 -0800 | [diff] [blame] | 95 | ImuType imu_type; |
Diana Burgess | d0180f1 | 2018-03-21 21:24:17 -0700 | [diff] [blame] | 96 | |
Comran Morshed | 5323ecb | 2015-12-26 20:50:55 +0000 | [diff] [blame] | 97 | // Polydrivetrain functions returning various controller loops with plants. |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 98 | ::std::function<StateFeedbackLoop<4, 2, 2, Scalar>()> make_drivetrain_loop; |
| 99 | ::std::function<StateFeedbackLoop<2, 2, 2, Scalar>()> make_v_drivetrain_loop; |
| 100 | ::std::function<StateFeedbackLoop<7, 2, 4, Scalar>()> make_kf_drivetrain_loop; |
Austin Schuh | a062edb | 2019-01-03 13:17:13 -0800 | [diff] [blame] | 101 | #if defined(__linux__) |
| 102 | ::std::function< |
| 103 | StateFeedbackLoop<2, 2, 2, Scalar, StateFeedbackHybridPlant<2, 2, 2>, |
| 104 | HybridKalman<2, 2, 2>>()> |
| 105 | make_hybrid_drivetrain_velocity_loop; |
| 106 | #endif |
Comran Morshed | 5323ecb | 2015-12-26 20:50:55 +0000 | [diff] [blame] | 107 | |
Austin Schuh | bb735b7 | 2019-01-03 12:58:41 -0800 | [diff] [blame] | 108 | ::std::chrono::nanoseconds dt; // Control loop time step. |
| 109 | Scalar robot_radius; // Robot radius, in meters. |
| 110 | Scalar wheel_radius; // Wheel radius, in meters. |
| 111 | Scalar v; // Motor velocity constant. |
Comran Morshed | 5323ecb | 2015-12-26 20:50:55 +0000 | [diff] [blame] | 112 | |
Austin Schuh | 09fa9bb | 2016-02-16 11:47:40 -0800 | [diff] [blame] | 113 | // Gear ratios, from wheel to motor shaft. |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 114 | Scalar high_gear_ratio; |
| 115 | Scalar low_gear_ratio; |
Comran Morshed | 5323ecb | 2015-12-26 20:50:55 +0000 | [diff] [blame] | 116 | |
Austin Schuh | e6a9fdf | 2019-01-12 16:05:43 -0800 | [diff] [blame] | 117 | // Moment of inertia and mass. |
| 118 | Scalar J; |
| 119 | Scalar mass; |
| 120 | |
Comran Morshed | 5323ecb | 2015-12-26 20:50:55 +0000 | [diff] [blame] | 121 | // Hall effect constants. Unused if not applicable to shifter type. |
James Kuszmaul | 6802533 | 2024-01-20 17:06:02 -0800 | [diff] [blame] | 122 | ShifterHallEffect left_drive; |
| 123 | ShifterHallEffect right_drive; |
Adam Snaider | bc918b6 | 2016-02-27 21:03:39 -0800 | [diff] [blame] | 124 | |
| 125 | // Variable that holds the default gear ratio. We use this in ZeroOutputs(). |
| 126 | // (ie. true means high gear is default). |
| 127 | bool default_high_gear; |
Austin Schuh | 889fee8 | 2016-04-13 22:16:36 -0700 | [diff] [blame] | 128 | |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 129 | Scalar down_offset; |
Adam Snaider | 94a5237 | 2016-10-19 20:06:01 -0700 | [diff] [blame] | 130 | |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 131 | Scalar wheel_non_linearity; |
Adam Snaider | 94a5237 | 2016-10-19 20:06:01 -0700 | [diff] [blame] | 132 | |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 133 | Scalar quickturn_wheel_multiplier; |
Austin Schuh | d91c0d2 | 2016-10-15 21:24:28 -0700 | [diff] [blame] | 134 | |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 135 | Scalar wheel_multiplier; |
Austin Schuh | e8a54c0 | 2018-03-05 00:25:58 -0800 | [diff] [blame] | 136 | |
James Kuszmaul | 8bad241 | 2019-03-10 10:47:56 -0700 | [diff] [blame] | 137 | // Whether the shift button on the pistol grip enables line following mode. |
| 138 | bool pistol_grip_shift_enables_line_follow = false; |
| 139 | |
James Kuszmaul | 2215d92 | 2020-02-11 17:17:26 -0800 | [diff] [blame] | 140 | // Rotation matrix from the IMU's coordinate frame to the robot's coordinate |
| 141 | // frame. |
| 142 | // I.e., imu_transform * imu_readings will give the imu readings in the |
| 143 | // robot frame. |
James Kuszmaul | d478f87 | 2020-03-16 20:54:27 -0700 | [diff] [blame] | 144 | Eigen::Matrix<Scalar, 3, 3> imu_transform = |
| 145 | Eigen::Matrix<Scalar, 3, 3>::Identity(); |
James Kuszmaul | 2215d92 | 2020-02-11 17:17:26 -0800 | [diff] [blame] | 146 | |
| 147 | // True if we are running a simulated drivetrain. |
| 148 | bool is_simulated = false; |
| 149 | |
James Kuszmaul | 6802533 | 2024-01-20 17:06:02 -0800 | [diff] [blame] | 150 | DownEstimatorConfigT down_estimator_config{}; |
James Kuszmaul | 207ae32 | 2022-02-25 21:15:31 -0800 | [diff] [blame] | 151 | |
James Kuszmaul | c29f457 | 2023-02-25 17:02:33 -0800 | [diff] [blame] | 152 | LineFollowConfig line_follow_config{}; |
| 153 | |
Maxwell Henderson | 24f89f3 | 2023-03-25 15:55:46 -0700 | [diff] [blame] | 154 | PistolTopButtonUse top_button_use = PistolTopButtonUse::kShift; |
| 155 | PistolSecondButtonUse second_button_use = PistolSecondButtonUse::kShiftLow; |
| 156 | PistolBottomButtonUse bottom_button_use = PistolBottomButtonUse::kSlowDown; |
| 157 | |
James Kuszmaul | 6e5f825 | 2024-03-17 21:00:08 -0700 | [diff] [blame] | 158 | SplineFollowerConfig spline_follower_config{}; |
| 159 | |
James Kuszmaul | 88e9441 | 2024-04-04 21:23:01 -0700 | [diff] [blame] | 160 | // If set, then the IMU must be zeroed before we will send any outputs. |
| 161 | bool require_imu_for_output = true; |
| 162 | |
Austin Schuh | d91c0d2 | 2016-10-15 21:24:28 -0700 | [diff] [blame] | 163 | // Converts the robot state to a linear distance position, velocity. |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 164 | static Eigen::Matrix<Scalar, 2, 1> LeftRightToLinear( |
| 165 | const Eigen::Matrix<Scalar, 7, 1> &left_right) { |
| 166 | Eigen::Matrix<Scalar, 2, 1> linear; |
Austin Schuh | d91c0d2 | 2016-10-15 21:24:28 -0700 | [diff] [blame] | 167 | linear(0, 0) = (left_right(0, 0) + left_right(2, 0)) / 2.0; |
| 168 | linear(1, 0) = (left_right(1, 0) + left_right(3, 0)) / 2.0; |
| 169 | return linear; |
| 170 | } |
| 171 | // Converts the robot state to an anglular distance, velocity. |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 172 | Eigen::Matrix<Scalar, 2, 1> LeftRightToAngular( |
| 173 | const Eigen::Matrix<Scalar, 7, 1> &left_right) const { |
| 174 | Eigen::Matrix<Scalar, 2, 1> angular; |
Austin Schuh | d91c0d2 | 2016-10-15 21:24:28 -0700 | [diff] [blame] | 175 | angular(0, 0) = |
| 176 | (left_right(2, 0) - left_right(0, 0)) / (this->robot_radius * 2.0); |
| 177 | angular(1, 0) = |
| 178 | (left_right(3, 0) - left_right(1, 0)) / (this->robot_radius * 2.0); |
| 179 | return angular; |
| 180 | } |
| 181 | |
Alex Perry | e32eabc | 2019-02-08 19:51:19 -0800 | [diff] [blame] | 182 | Eigen::Matrix<Scalar, 2, 2> Tlr_to_la() const { |
| 183 | return (::Eigen::Matrix<Scalar, 2, 2>() << 0.5, 0.5, |
Austin Schuh | d749d93 | 2020-12-30 21:38:40 -0800 | [diff] [blame] | 184 | -1.0 / (2 * robot_radius), 1.0 / (2 * robot_radius)) |
| 185 | .finished(); |
Alex Perry | e32eabc | 2019-02-08 19:51:19 -0800 | [diff] [blame] | 186 | } |
| 187 | |
| 188 | Eigen::Matrix<Scalar, 2, 2> Tla_to_lr() const { |
| 189 | return Tlr_to_la().inverse(); |
| 190 | } |
| 191 | |
Austin Schuh | d91c0d2 | 2016-10-15 21:24:28 -0700 | [diff] [blame] | 192 | // Converts the linear and angular position, velocity to the top 4 states of |
| 193 | // the robot state. |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 194 | Eigen::Matrix<Scalar, 4, 1> AngularLinearToLeftRight( |
| 195 | const Eigen::Matrix<Scalar, 2, 1> &linear, |
| 196 | const Eigen::Matrix<Scalar, 2, 1> &angular) const { |
Austin Schuh | d749d93 | 2020-12-30 21:38:40 -0800 | [diff] [blame] | 197 | Eigen::Matrix<Scalar, 2, 1> scaled_angle = angular * this->robot_radius; |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 198 | Eigen::Matrix<Scalar, 4, 1> state; |
Austin Schuh | d91c0d2 | 2016-10-15 21:24:28 -0700 | [diff] [blame] | 199 | state(0, 0) = linear(0, 0) - scaled_angle(0, 0); |
| 200 | state(1, 0) = linear(1, 0) - scaled_angle(1, 0); |
| 201 | state(2, 0) = linear(0, 0) + scaled_angle(0, 0); |
| 202 | state(3, 0) = linear(1, 0) + scaled_angle(1, 0); |
| 203 | return state; |
| 204 | } |
James Kuszmaul | 6802533 | 2024-01-20 17:06:02 -0800 | [diff] [blame] | 205 | |
| 206 | static DrivetrainConfig FromFlatbuffer(const fbs::DrivetrainConfig &fbs) { |
| 207 | std::shared_ptr<aos::FlatbufferDetachedBuffer<fbs::DrivetrainConfig>> |
| 208 | fbs_copy = std::make_shared< |
| 209 | aos::FlatbufferDetachedBuffer<fbs::DrivetrainConfig>>( |
| 210 | aos::RecursiveCopyFlatBuffer(&fbs)); |
Austin Schuh | 6bdcc37 | 2024-06-27 14:49:11 -0700 | [diff] [blame] | 211 | CHECK(fbs_copy->message().loop_config()->drivetrain_loop() != nullptr); |
| 212 | CHECK(fbs_copy->message().loop_config()->velocity_drivetrain_loop() != |
| 213 | nullptr); |
| 214 | CHECK(fbs_copy->message().loop_config()->kalman_drivetrain_loop() != |
| 215 | nullptr); |
| 216 | CHECK( |
| 217 | fbs_copy->message().loop_config()->hybrid_velocity_drivetrain_loop() != |
| 218 | nullptr); |
| 219 | CHECK(fbs.imu_transform() != nullptr); |
James Kuszmaul | 6802533 | 2024-01-20 17:06:02 -0800 | [diff] [blame] | 220 | return { |
| 221 | #define ASSIGN(field) .field = fbs.field() |
| 222 | ASSIGN(shifter_type), ASSIGN(loop_type), ASSIGN(gyro_type), |
| 223 | ASSIGN(imu_type), |
| 224 | .make_drivetrain_loop = |
| 225 | [fbs_copy]() { |
Austin Schuh | 6bdcc37 | 2024-06-27 14:49:11 -0700 | [diff] [blame] | 226 | return MakeStateFeedbackLoop<4, 2, 2>( |
| 227 | *fbs_copy->message().loop_config()->drivetrain_loop()); |
James Kuszmaul | 6802533 | 2024-01-20 17:06:02 -0800 | [diff] [blame] | 228 | }, |
| 229 | .make_v_drivetrain_loop = |
| 230 | [fbs_copy]() { |
| 231 | return MakeStateFeedbackLoop<2, 2, 2>( |
Austin Schuh | 6bdcc37 | 2024-06-27 14:49:11 -0700 | [diff] [blame] | 232 | *fbs_copy->message() |
| 233 | .loop_config() |
| 234 | ->velocity_drivetrain_loop()); |
James Kuszmaul | 6802533 | 2024-01-20 17:06:02 -0800 | [diff] [blame] | 235 | }, |
| 236 | .make_kf_drivetrain_loop = |
| 237 | [fbs_copy]() { |
| 238 | return MakeStateFeedbackLoop<7, 2, 4>( |
Austin Schuh | 6bdcc37 | 2024-06-27 14:49:11 -0700 | [diff] [blame] | 239 | *fbs_copy->message() |
| 240 | .loop_config() |
| 241 | ->kalman_drivetrain_loop()); |
James Kuszmaul | 6802533 | 2024-01-20 17:06:02 -0800 | [diff] [blame] | 242 | }, |
| 243 | #if defined(__linux__) |
| 244 | .make_hybrid_drivetrain_velocity_loop = |
| 245 | [fbs_copy]() { |
| 246 | return MakeHybridStateFeedbackLoop<2, 2, 2>( |
Austin Schuh | 6bdcc37 | 2024-06-27 14:49:11 -0700 | [diff] [blame] | 247 | *fbs_copy->message() |
| 248 | .loop_config() |
| 249 | ->hybrid_velocity_drivetrain_loop()); |
James Kuszmaul | 6802533 | 2024-01-20 17:06:02 -0800 | [diff] [blame] | 250 | }, |
| 251 | #endif |
| 252 | .dt = std::chrono::nanoseconds(fbs.loop_config()->dt()), |
| 253 | .robot_radius = fbs.loop_config()->robot_radius(), |
| 254 | .wheel_radius = fbs.loop_config()->wheel_radius(), |
| 255 | .v = fbs.loop_config()->motor_kv(), |
| 256 | .high_gear_ratio = fbs.loop_config()->high_gear_ratio(), |
| 257 | .low_gear_ratio = fbs.loop_config()->low_gear_ratio(), |
| 258 | .J = fbs.loop_config()->moment_of_inertia(), |
James Kuszmaul | 2549e75 | 2024-01-20 17:42:51 -0800 | [diff] [blame] | 259 | .mass = fbs.loop_config()->mass(), |
| 260 | .left_drive = |
| 261 | fbs.has_left_drive() ? *fbs.left_drive() : ShifterHallEffect{}, |
| 262 | .right_drive = |
| 263 | fbs.has_right_drive() ? *fbs.right_drive() : ShifterHallEffect{}, |
| 264 | ASSIGN(default_high_gear), ASSIGN(down_offset), |
| 265 | ASSIGN(wheel_non_linearity), ASSIGN(quickturn_wheel_multiplier), |
| 266 | ASSIGN(wheel_multiplier), |
James Kuszmaul | 6802533 | 2024-01-20 17:06:02 -0800 | [diff] [blame] | 267 | ASSIGN(pistol_grip_shift_enables_line_follow), |
Austin Schuh | 6bdcc37 | 2024-06-27 14:49:11 -0700 | [diff] [blame] | 268 | .imu_transform = ToEigenOrDie<3, 3>(*fbs.imu_transform()), |
James Kuszmaul | 6802533 | 2024-01-20 17:06:02 -0800 | [diff] [blame] | 269 | ASSIGN(is_simulated), |
| 270 | .down_estimator_config = |
| 271 | aos::UnpackFlatbuffer(fbs.down_estimator_config()), |
| 272 | .line_follow_config = |
| 273 | LineFollowConfig::FromFlatbuffer(fbs.line_follow_config()), |
| 274 | ASSIGN(top_button_use), ASSIGN(second_button_use), |
James Kuszmaul | 6e5f825 | 2024-03-17 21:00:08 -0700 | [diff] [blame] | 275 | ASSIGN(bottom_button_use), |
| 276 | .spline_follower_config = SplineFollowerConfig::FromFlatbuffer( |
| 277 | fbs.spline_follower_config()), |
James Kuszmaul | 88e9441 | 2024-04-04 21:23:01 -0700 | [diff] [blame] | 278 | ASSIGN(require_imu_for_output), |
James Kuszmaul | 6802533 | 2024-01-20 17:06:02 -0800 | [diff] [blame] | 279 | #undef ASSIGN |
| 280 | }; |
| 281 | } |
Comran Morshed | 5323ecb | 2015-12-26 20:50:55 +0000 | [diff] [blame] | 282 | }; |
Stephan Pleines | d99b1ee | 2024-02-02 20:56:44 -0800 | [diff] [blame] | 283 | } // namespace frc971::control_loops::drivetrain |
Comran Morshed | 5323ecb | 2015-12-26 20:50:55 +0000 | [diff] [blame] | 284 | |
| 285 | #endif // FRC971_CONTROL_LOOPS_DRIVETRAIN_CONSTANTS_H_ |