How marcuszhu67/fdu-introduction-to-electronic-systems works
This is a Raspberry Pi/OpenCV vision-car project. The principal workflow is camera-based green-target search and approach, encoder-guided orbit, then yellow/wall-aware finish navigation and stopping; CarRunner coordinates perception, motion, and encoder feedback. A separate interactive calibration workflow tests hardware and visual thresholds, while the HSV tuner supports manual threshold exploration. The main implementation is concentrated in car_main.py; calibration and tuner relationships are based on the README and sampled excerpts, so unsampled details are not expanded.
Main entry points: car_main.py CarRunner · calibrate_car.py Calibration Session · hsv_tuner.py HSV Tuner · color_tracker2.py Color Tracker Example
Components 17
Autonomous Driving
- CarRunner
car_main.py - Green Search
car_main.py - Green Approach
car_main.py - Green Orbit
car_main.py - Finish Navigation
car_main.py - Color Detector
car_main.py - Vision History
car_main.py
Hardware I/O
- Motor Controller
car_main.py - Encoder Counter
car_main.py - CarConfig
car_main.py
Calibration Tools
- Calibration Session
calibrate_car.py - HSV Tuner
hsv_tuner.py - Color Tracker Example
例程/color_tracker2.py - Calibration Hardware
calibrate_car.py
Other components
- Operator
- USB Camera
- GPIO Hardware
Connections 30
- Operator → CarRunner: starts or stops
- CarRunner → USB Camera: opens and reads
- CarRunner → Color Detector: processes frames
- Color Detector → CarRunner: returns detections
- CarRunner → Vision History: updates history
- CarRunner → Green Search: dispatches state
- CarRunner → Green Approach: dispatches state
- CarRunner → Green Orbit: dispatches state
- CarRunner → Finish Navigation: dispatches state
- Green Search → Motor Controller: commands motion
- Green Search → Encoder Counter: reads counts
- Green Approach → Motor Controller: commands motion
- Green Approach → Encoder Counter: reads counts
- Green Orbit → Motor Controller: commands motion
- Green Orbit → Encoder Counter: reads counts
- Finish Navigation → Motor Controller: commands motion
- Finish Navigation → Encoder Counter: reads counts
- Motor Controller → GPIO Hardware: drives motors
- GPIO Hardware → Encoder Counter: signals pulses
- Calibration Session → USB Camera: captures frames
- Calibration Session → Color Detector: requests detections
- Calibration Session → Motor Controller: tests motion
- Calibration Session → Encoder Counter: measures pulses
- Calibration Session → Calibration Hardware: uses GPIO
- Calibration Hardware → GPIO Hardware: drives and reads
- Operator → Calibration Session: runs calibration
- Operator → HSV Tuner: adjusts thresholds
- HSV Tuner → USB Camera: reads frames
- Operator → Color Tracker Example: runs example
- Color Tracker Example → USB Camera: reads frames