A sensor is only useful if you know its noise, its latency, and its failure mode. Log every sensor before you build logic on top of it.
| Sensor | Good for | Limitation |
|---|---|---|
| Motor encoder | Position, velocity | Drifts with wheel slip |
| Odometry pod | Field position | Needs constant ground contact |
| IMU | Heading | Yaw drift over long matches |
| Distance (2m) | Wall alignment | Confused by angled surfaces |
| Colour | Element detection | Highly lighting dependent |
Reading the IMULink to this section
IMU imu = hardwareMap.get(IMU.class, "imu");
imu.initialize(new IMU.Parameters(new RevHubOrientationOnRobot(
RevHubOrientationOnRobot.LogoFacingDirection.UP,
RevHubOrientationOnRobot.UsbFacingDirection.FORWARD)));
double heading = imu.getRobotYawPitchRollAngles()
.getYaw(AngleUnit.RADIANS);