• OctoMY API
  • OctoMY API Reference
  • C++ Classes
  • OctoMY
  • PathFollower
  • PathFollower Class

    Agent-side autonomous-driving subsystem: drives the locomotion channel's intent inputs from AgentStateCourier::targetPosition. More...

    Header: #include <PathFollower>
    Since: Phase PF-1
    Inherits: AgentSubsystem

    Detailed Description

    Subscribes to AgentStateCourier values (polled at the tick rate to keep the wiring simple — the underlying SyncParameter signal API uses per-parameter hookSignals; we re-evaluate the activation predicate every tick and react to AgentRuntimeService::activePresetChanged for preset transitions).

    Active when ALL of: - mode is AUTO_PILOT or COMPLETE_AUTONOMY - ControlFlags::WAYPOINT_MISSION_ACTIVE bit set - targetPosition is valid - currentPosition is valid AND fresh (timestamp within staleThresholdMs of the clock, the wall clock unless setClock() installed another) - the autonomous stanza id resolves to a stanza with both intent:ground-drive-2d.forward and .yaw input ports

    When active, runs a 10 Hz timer that computes (forward, yaw) commands via equirectangular projection + proportional control on the heading error, clamped to [-1, +1], and writes them through AgentSubsystem::writeInput().

    On deactivation (predicate flips false): writes a single (0, 0) command and stops the timer.

    Output is observable for tests via the intentWritten signal.