Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/saquer916/odyssey/llms.txt

Use this file to discover all available pages before exploring further.

Localizer is the odometry abstraction interface that decouples Odyssey’s Follower from any specific sensor or algorithm. By depending only on this two-method contract, Odyssey can work with dead-wheel pods, IMU-based odometry, visual odometry, the GoBILDA Pinpoint computer, or any other localization system — as long as it can report a Pose2d. Implement this interface in your TeamCode to integrate a custom odometry solution without modifying any Odyssey-core classes. Package: org.firstinspires.ftc.teamcode.odyssey.localization

Interface definition

public interface Localizer {
    Pose2d getPose();
    void update();
}

Methods

getPose()
Pose2d
Returns the current best estimate of the robot’s pose. X and Y are in millimetres; heading is in radians, normalized to (−π, π]. This method should be pure — it must not trigger any hardware reads or state mutations. All sensor polling should happen inside update().
update()
void
Polls the underlying hardware and integrates new measurements to refresh the internal pose estimate. You must call this method once per OpMode loop iteration before calling Follower.update(), otherwise Follower will act on a stale pose.

Custom implementation

The skeleton below shows how to wrap a pair of dead-wheel encoders. Fill in the odometry integration logic inside update():
public class MyDeadWheelLocalizer implements Localizer {
    private double x, y, heading;

    @Override
    public Pose2d getPose() {
        return new Pose2d(x, y, heading);
    }

    @Override
    public void update() {
        // read encoders, integrate odometry, update x/y/heading
    }
}
Pass your localizer to Follower during OpMode initialisation:
Localizer localizer = new MyDeadWheelLocalizer();
Follower follower = new Follower(localizer, /* ... other params */);

Built-in implementation

Odyssey ships with PinpointLocalizer, which wraps the GoBILDA Pinpoint odometry computer. It lives in TeamCode rather than odyssey-core because it depends on FTC hardware classes, but it serves as a complete, production-ready reference implementation.
Odyssey does not call update() internally. You are responsible for calling localizer.update() at the top of every OpMode loop iteration before any Follower calls. Forgetting this is a common source of sluggish or incorrect path-following behaviour.

Build docs developers (and LLMs) love