Space Academy 3.0 is open — want to become a project contributor?Join in

Electrical

Sensors

Encoders, IMUs, distance and colour sensors, and how to trust their data.

1 min readUpdated Jul 26, 2026

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.

SensorGood forLimitation
Motor encoderPosition, velocityDrifts with wheel slip
Odometry podField positionNeeds constant ground contact
IMUHeadingYaw drift over long matches
Distance (2m)Wall alignmentConfused by angled surfaces
ColourElement detectionHighly lighting dependent

Reading the IMULink to this section

java
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);