Skip to content

Fix flywheel velocity naming conventions in ShooterSetpoint - #3

Open
jovapo wants to merge 1 commit into
devfrom
fix/shooter-velocity-units
Open

Fix flywheel velocity naming conventions in ShooterSetpoint#3
jovapo wants to merge 1 commit into
devfrom
fix/shooter-velocity-units

Conversation

@jovapo

@jovapo jovapo commented Mar 2, 2026

Copy link
Copy Markdown

Summary

  • ShooterSetpoint field renamed from flywheelSurfaceSpeed: LinearVelocity to flywheelVelocity: AngularVelocity — the LUT values are RPS, not m/s, so the type and name now match the actual unit
  • targetLinearVelocity() renamed to targetFlywheelVelocity() for the same reason
  • Removed redundant commented-out code and a resolved review comment in runShooterControl()
  • No change to real robot behavior

Sim fixes

  • Sim LUT now uses the real robot values as a baseline instead of a separate uncalibrated set
  • Sim projectile speed now correctly converts RPS → m/s via convertAngularVelocityToLinear() before applying kEstimatedFlywheelSpeedToFuelSpeed
  • kEstimatedFlywheelSpeedToFuelSpeed tuned from 0.3 → 0.33 to better match observed sim trajectories

Test plan

  • Sim builds and runs without errors
  • Projectiles land near the hub at various distances in sim
  • Real robot shooter behavior unchanged

ShooterSetpoint stored flywheel speed as LinearVelocity (flywheelSurfaceSpeed)
but the LUT values are rotations per second. Renamed to AngularVelocity
(flywheelVelocity) so the type matches the actual unit. No change to real
robot behavior. Also updates sim LUT to use real values and corrects the
sim projectile speed conversion to use proper RPS->m/s math.
@jovapo
jovapo force-pushed the fix/shooter-velocity-units branch from 1b628e4 to bb35dbd Compare March 3, 2026 03:40
@jovapo
jovapo requested a review from me-it-is March 3, 2026 03:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant