James Kuszmaul | 886675c | 2024-10-09 20:32:00 -0700 | [diff] [blame] | 1 | #ifndef FRC971_CONTROL_LOOPS_SWERVE_LINEARIZATION_UTILS_H_ |
| 2 | #define FRC971_CONTROL_LOOPS_SWERVE_LINEARIZATION_UTILS_H_ |
| 3 | |
| 4 | namespace frc971::control_loops::swerve { |
| 5 | template <typename State, typename Input> |
| 6 | struct DynamicsInterface { |
| 7 | virtual ~DynamicsInterface() {} |
| 8 | // To be overridden by the implementation; returns the derivative of the state |
| 9 | // at the given state with the provided control input. |
| 10 | virtual State operator()(const State &X, const Input &U) const = 0; |
| 11 | }; |
| 12 | } // namespace frc971::control_loops::swerve |
| 13 | #endif // FRC971_CONTROL_LOOPS_SWERVE_LINEARIZATION_UTILS_H_ |