Odyssey defines aDocumentation 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.
HeadingInterpolator interface with four built-in implementations that control robot orientation independently of the translational cubic Bézier path. Because translation and rotation are decoupled, you can combine any heading strategy with any path shape — for example, keeping the robot pointed at a fixed target while it curves through a complex trajectory.
Interface: HeadingInterpolator
Package: org.firstinspires.ftc.teamcode.odyssey.path.heading
Returns the desired robot heading in radians at path parameter
t.Normalized path parameter in the range [0, 1].
0 is the start of the segment; 1 is the end.The active Bézier curve. Implementations that depend on current position or tangent direction query this object.
ConstantInterpolator
Holds a single fixed heading for the entire segment regardless of position or progress. Use this for sideways strafing segments or any manoeuvre where the robot must maintain a specific orientation throughout. Package:org.firstinspires.ftc.teamcode.odyssey.path.heading
Constructor
The constant heading to return for all values of
t, in radians.Example
LinearInterpolator
Smoothly rotates the robot fromstartHeading to endHeading over the segment, proportional to t. The interpolation always takes the shortest angular path, handled by normalizing the angular delta with MathUtils.normalizeAngle. This means transitions like 170° → −170° (a 20° rotation) work correctly without spinning the wrong way.
Package: org.firstinspires.ftc.teamcode.odyssey.path.heading
Constructor
Example
TangentInterpolator
Sets the heading equal tocurve.getTangentAngle(t) so the robot always faces the direction of travel. This mimics the behaviour of a conventional differential-drive robot and is the natural choice for high-speed forward runs where facing the direction of motion minimises lateral error.
Package: org.firstinspires.ftc.teamcode.odyssey.path.heading
Constructor
No parameters. The heading is derived entirely from the curve’s tangent at each
t.Example
FaceTargetInterpolator
Continuously rotates the robot to face a fixed field-frame point regardless of where the robot is along the path. At eacht, it evaluates curve.getPoint(t) and computes the bearing to the target via Math.atan2. Use this when a sensor (e.g. a camera or distance sensor) mounted on the front of the robot must track a landmark continuously during motion.
Package: org.firstinspires.ftc.teamcode.odyssey.path.heading
Constructor
Fixed field-frame point to face at all times, in millimetres.
Example
Comparison
| Interpolator | Typical use case | Heading depends on |
|---|---|---|
ConstantInterpolator | Sideways strafe, timed approach | Fixed angle — ignores t and curve |
LinearInterpolator | Smooth rotation during transit | Path progress t |
TangentInterpolator | High-speed forward runs | Curve tangent direction |
FaceTargetInterpolator | Camera/sensor tracking | Current field position on the curve |
All angles are in radians throughout Odyssey. Use
Math.toRadians() to convert from degrees when constructing interpolators, and Math.toDegrees() when displaying values in telemetry.