blob: ff25c31b3d79f093d9d9de3d1a251f50891f0c66 [file] [log] [blame]
namespace frc971.controls;
// This provides a minimal output from the localizer that can be forwarded to
// the roborio and used for corrections to its (simpler) localizer.
struct Quaternion {
w:double (id: 0);
x:double (id: 1);
y:double (id: 2);
z:double (id: 3);
}
// Used to tell different LEDs to be on or off
enum LedOutput : byte {
ON,
OFF
}
table LocalizerOutput {
// Timestamp (on the source node) that this sample corresponds with. This
// may be older than the sent time to account for delays in sensor readings.
monotonic_timestamp_ns:int64 (id: 0);
// Current x/y position estimate, in meters.
x:double (id: 1);
y:double (id: 2);
// Current heading, in radians.
theta:double (id: 3);
// Current estimate of the robot's 3-D rotation.
orientation:Quaternion (id: 4);
// Whether we have zeroed the IMU (may go false if we observe a fault with the
// IMU).
zeroed:bool (id: 5);
// Whether each led should be on.
// Indices correspond to pi number.
led_outputs:[LedOutput] (id: 6);
// Cumulative number of accepted images.
image_accepted_count:uint (id: 7);
}
root_type LocalizerOutput;