Source code for navigation_v2_compact_encoder

"""
Obstacle course navigation state machine using encoder-based odometry.
24-state FSM coordinating line following, heading control, and obstacle avoidance.
Uses encoder distance and heading instead of IMU for improved scheduler performance.

Hardware:
    - Motor Encoders: 1437.1 ticks/rev differential encoders
    - IR Sensor Array: 7 reflectance sensors for line detection
    - Bump Sensor: Wall collision detection

Notes:
    - Distance thresholds measured in mm from encoder odometry
    - Heading control uses encoder differential (not IMU)
    - State 15 triggers bump sensor wall interaction sequence (States 16-23)
    - Line following bias adjustable per state for curve navigation
    - Force-straight mode overrides line following for precise heading control
"""