Skip to content

v1.6.0 — motion profiles, flywheel control, point moves

Latest

Choose a tag to compare

@AkshobyaRaoSWE AkshobyaRaoSWE released this 10 Jul 14:09

Added

  • clockwork::TrapezoidalProfile — a speed-up / cruise / slow-down motion profile. Give it a distance, top speed, and acceleration; get target velocity and position at any time. Triangle fallback when the distance is too short, plus reverse support.
  • clockwork::FlywheelController — feedforward + P velocity control for a flywheel. Clamped to one direction, recovers after a shot drags the speed down.
  • Motion::turnToHeading(heading, ...) — turn to an absolute field heading on the tuned turn PID.
  • Motion::moveToPoint(x, y, ...) — blocking drive to a field point via lemlib's motion profiling, with an optional backwards mode.
  • geometry.hpp signedForwardDistance — the forward-progress projection driveDistance uses, pulled out and unit-tested; driveDistance now calls it.

Stress tested

  • Host suite expanded to a real stress pass: integral windup limits, output clamps under extreme input, convergence from both directions, the slew limiter never overshooting a jumping target, curve bounds and deadband edges, the geometry conventions, and every profile/flywheel invariant. 747 checks, all green (make test).

Install

pros c add-depot clockwork https://raw.githubusercontent.com/AkshobyaRaoSWE/clockwork-lib/main/depot.json
pros c apply clockwork

Docs: https://akshobyaraoswe.github.io/clockwork-lib/ · Full changelog: CHANGELOG.md