Projectile trajectory planner and optimizer for FRC (FIRST Robotics Competition) shooters. Simulates ball trajectories with and without air drag, finds optimal shooting parameters, and visualizes flywheel drop tolerance.
Forked from Skyehawk/shotPlanner2025, originally shared on Chief Delphi — the primary community forum for FRC teams.
- Interactive simulators — real-time trajectory visualization with adjustable launch angle and velocity (
interactive.py,interactive_drag.py, polar variants) - Error budget analysis —
interactive_error_budget.pyshows how position and speed errors affect shot success - Shot optimizer — finds the optimal distance and flywheel speed that maximizes drop tolerance (
fit_optimized_shots.py) - Center shot finder — computes the center-of-target trajectory for a grid of angles and distances (
find_center_shots.py) - Jupyter notebooks — step-by-step derivations and explorations (
simulate_shot.ipynb,parabola_calc.ipynb,shoot_on_move.ipynb) - Web app — Flask-based interactive frontend (
webapp/)
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
# Run the interactive simulator
python3 interactive_drag.py
# Find optimal shooting config for a given hood angle
python3 fit_optimized_shots.pySee README_Optimizer.md for detailed optimizer usage.
Configurable parameters (2022 Rapid React defaults):
- Goal height: 2.64 m (upper hub)
- Ball radius: 0.12 m (9.5 in cargo)
- Ball mass: 0.27 kg
- Drag coefficient: 0.47
Supports both idealized (no drag) and realistic (quadratic drag) trajectory models.