You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ball approach Y setpoint — higher = closer to ball
rotErrorGap
30 px
X tolerance before state transitions
flingErrorGap
12 px
Y tolerance before state transitions
alignErrorGap
4°
Yaw tolerance before entering APPROACH
goalFli
23 px
Min goal Y (size) to attempt shot
minApproachSpd
40
Min motor speed to overcome dead zone
idleSpd
65
Spin speed when searching for ball
rot_Kp / rot_Kd
0.6 / 0.6
Rotation PID gains
fli_Kp
0.9
Approach PID gain
head_Kp
1.5
Heading hold PID gain
Soccer.ino — Vision Filters
Parameter
Default
Effect
ballSizeMin
10 px
Reject blocks smaller than this (noise / too far)
ballSizeMax
200 px
Reject blocks larger than this (false positive up close)
ballMaxJump
80 px
Reject position jumps larger than this per frame
ballConfirmMin
2 frames
Consecutive detections required before accepting as ball
ballMissMax
3 frames
Hold last ball position this many frames after losing sight
goalMissMax
5 frames
Hold last goal position this many frames after losing sight
Play.ino — Per-mode presets (in Hardware.ino setup)
Parameter
Effect
goalID
Which HuskyLens block ID is the target goal (2=Yellow, 3=Blue)
orbitRadius
Orbit circle size around ball during ALIGN — higher = wider arc
driveSpeed
Speed driving toward goal in APPROACH
steerScale
How aggressively to steer toward goal center
shootDist
Goal Y threshold to trigger shoot — higher = shoot from farther
Mode
goalID
orbitRadius
driveSpeed
steerScale
shootDist
ATK-Yellow
2
1.4
40
1.5
15
ATK-Blue
3
1.2
60
1.5
20
DEF-Yellow
2
1.2
60
1.2
13
DEF-Blue
3
1.2
40
1.2
13
Wiring
Part
Interface
Pin
MPU6050
UART
Serial1 (115200 baud)
HuskyLens
I2C
SDA / SCL
Kicker limit switch
Analog
A0
IR sensor front
Analog
analog(1)
IR sensor side
Analog
analog(2)
IR sensor rear
Analog
analog(3)
Wheels
PWM
motor(1–3)
Kicker
PWM
motor(4)
HuskyLens Object IDs
ID
Object
Used by
1
Ball
All modes
2
Yellow goal
ATK-Yellow, DEF-Yellow
3
Blue goal
ATK-Blue, DEF-Blue
Hardware Improvement Roadmap
Ordered by impact vs effort.
1. Camera angle — tilt down 10–15°
Cut background clutter (audience, objects outside field) from HuskyLens field of view.
Before: camera level → sees background. After: tilted down → sees only field.
Impact: high / Effort: low
2. Hood / baffle around lens
Black plastic or cardboard shield around the lens — limits side and top field of view, cuts glare from overhead lights.
Impact: medium / Effort: low
3. LED ring around camera
White LED ring around HuskyLens — provides consistent illumination on the ball regardless of ambient light. Makes detection stable across indoor/outdoor environments.
Impact: high / Effort: medium
4. Anti-vibration camera mount
Rubber or foam between camera and chassis — reduces motion blur from motor vibration, especially after wall bounces.
Impact: medium / Effort: low