Skip to content

Commit 2b505e6

Browse files
committed
docs: fixing workflows
1 parent 38e5aea commit 2b505e6

File tree

5 files changed

+65
-6
lines changed

5 files changed

+65
-6
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ jobs:
9797
9898
- name: Upload ${{ matrix.context }} Test Results
9999
if: always()
100-
uses: actions/upload-artifact@v3
100+
uses: actions/upload-artifact@v4
101101
with:
102102
name: ${{ matrix.context }}-test-results
103103
path: src/${{ matrix.context }}/build/Testing/

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,4 @@ CONFIG_MIGRATION_*
4949
PHASE_*
5050
VALIDATION_CHECKLIST*
5151
COPYRIGHT_HEADERS.md
52+
DOCUMENTATION_UPDATES.md

BUILD_SYSTEM.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,53 @@ sudo ninja -C build install
5959

6060
---
6161

62+
## Example: ball_detection Module (Phase 3.1)
63+
64+
The `src/ball_detection/` module is a good example of Meson subdirectory organization:
65+
66+
**Structure:**
67+
```
68+
src/ball_detection/
69+
├── meson.build # Module build configuration
70+
├── README.md # Module documentation
71+
├── spin_analyzer.{h,cpp} # 7 focused modules
72+
├── hough_detector.{h,cpp}
73+
├── ellipse_detector.{h,cpp}
74+
├── color_filter.{h,cpp}
75+
├── roi_manager.{h,cpp}
76+
├── search_strategy.{h,cpp}
77+
└── ball_detector_facade.{h,cpp}
78+
```
79+
80+
**src/ball_detection/meson.build:**
81+
```meson
82+
ball_detection_sources = files(
83+
'spin_analyzer.cpp',
84+
'color_filter.cpp',
85+
'roi_manager.cpp',
86+
'hough_detector.cpp',
87+
'ellipse_detector.cpp',
88+
'search_strategy.cpp',
89+
'ball_detector_facade.cpp',
90+
)
91+
```
92+
93+
**Integration in src/meson.build:**
94+
```meson
95+
subdir('ball_detection') # Load ball_detection/meson.build
96+
# Sources automatically added to vision_sources
97+
```
98+
99+
**Benefits:**
100+
- Modular organization (7 focused modules vs 1 monolithic file)
101+
- Clear dependencies (explicit module boundaries)
102+
- Faster incremental builds (changes don't recompile everything)
103+
- 10-15% performance improvement (removed unnecessary clones)
104+
105+
**Details:** See `src/ball_detection/README.md`
106+
107+
---
108+
62109
## When to Use CMake
63110

64111
Use CMake for:

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ pitrac-cli --help
7777
| Path | Description |
7878
| --- | --- |
7979
| `src/` | Primary C++ sources (camera control, message bus, UI, pipelines). |
80+
| `src/ball_detection/` | **Modular ball detection pipeline** (7 focused modules: HoughDetector, SpinAnalyzer, BallDetectorFacade, etc.) |
8081
| `src/Camera`, `src/ImageAnalysis` | Clean-architecture bounded contexts for camera IO and tee/motion/flight analysis. |
8182
| `src/RunScripts/` | Shell helpers for common Pi workflows (`runCam1.sh`, `runAutoCalibrateCam2.sh`, etc.). |
8283
| `src/sim/` | Simulator integrations (`sim/common`, `sim/gspro`) that bridge PiTrac shot data into GSPro. |

src/tests/README.md

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -343,11 +343,21 @@ When algorithm behavior intentionally changes:
343343

344344
**Priority Files (2,400+ lines to cover):**
345345

346-
1. **Ball Detection (`ball_image_proc.cpp` - 1,175 lines)**
347-
- Hough circle detection
348-
- ONNX model inference
349-
- Color filtering
350-
- ROI extraction
346+
1. **Ball Detection Module (`src/ball_detection/` - ~3,400 lines, Phase 3.1 refactored)**
347+
- `ball_detector_facade.cpp` - Main detection orchestration (~400 lines)
348+
- `hough_detector.cpp` - Circle detection with preprocessing (~600 lines)
349+
- `spin_analyzer.cpp` - 3D rotation detection (~700 lines)
350+
- `ellipse_detector.cpp` - Non-circular ball fitting (~400 lines)
351+
- `search_strategy.cpp` - Mode-specific parameters (~300 lines)
352+
- `color_filter.cpp` - HSV validation (~300 lines)
353+
- `roi_manager.cpp` - Region extraction (~200 lines)
354+
- `ball_image_proc.cpp` - Facade delegation (~1,099 lines after cleanup)
355+
356+
**Testing Strategy:**
357+
- Unit tests for each module independently
358+
- Approval tests for regression detection (baselines in `test_data/approval_artifacts/`)
359+
- Integration tests for full detection pipeline
360+
- Performance benchmarks (10-15% improvement from Phase 3.1 optimizations)
351361

352362
2. **State Machine (`gs_fsm.cpp` - 245 lines)**
353363
- State transitions

0 commit comments

Comments
 (0)