| include "frc971/control_loops/drivetrain/spline_goal.fbs"; |
| |
| namespace frc971.control_loops.drivetrain; |
| |
| enum ControllerType : byte { |
| POLYDRIVE, |
| MOTION_PROFILE, |
| SPLINE_FOLLOWER, |
| LINE_FOLLOWER, |
| } |
| |
| table Goal { |
| // Position of the steering wheel (positive = turning left when going |
| // forwards). |
| wheel:float (id: 0); |
| wheel_velocity:float (id: 1); |
| wheel_torque:float (id: 2); |
| |
| // Position of the throttle (positive forwards). |
| throttle:float (id: 3); |
| throttle_velocity:float (id: 4); |
| throttle_torque:float (id: 5); |
| |
| // True to shift into high, false to shift into low. |
| highgear:bool (id: 6); |
| |
| // True to activate quickturn. |
| quickturn:bool (id: 7); |
| |
| // Type of controller in charge of the drivetrain. |
| controller_type:ControllerType (id: 8); |
| |
| // Position goals for each drivetrain side (in meters) when the |
| // closed-loop controller is active. |
| left_goal:double (id: 9); |
| right_goal:double (id: 10); |
| |
| max_ss_voltage:float (id: 11); |
| |
| // Motion profile parameters. |
| // The control loop will profile if these are all non-zero. |
| linear:ProfileParameters (id: 12); |
| angular:ProfileParameters (id: 13); |
| |
| // Parameters for a spline to follow. This just contains info on a spline to |
| // compute. Each time this is sent, spline drivetrain will compute a new |
| // spline. |
| // TODO(james): Is this actually how we want to manage deprecation? |
| spline:SplineGoal (id: 14, deprecated); |
| |
| // Which spline to follow; if this is not populated, any running spline will |
| // be cancelled. |
| spline_handle:int (id: 15); |
| } |
| |
| root_type Goal; |