Revitalized auto-aiming suite for Purdue RoboMaster Club 2024-2025.
- Detect an enemy armor plate in the camera's FOV.
- Meet the following detection rate and accuracy requirements:
- 5 meters: 90% detection rate, 5% pixel loss
- 3 meters: 95% detection rate, 5% pixel loss
- 2 meters: 95% detection rate, 5% pixel loss
- Reduce search area around previously detected plates ("search area reduction").
- Achieve 120 Hz detection frequency.
- Classify the robot type based on its armor plate sticker.
- Meet the following detection rate and accuracy requirements:
- Compute camera-relative XYZ pose via PnP solving with 5% error margin.
- Filter out false positives and noise in the detection results.
- Use a Kalman filter to smooth XYZ pose estimates.
- Apply a "validity filter" for erroneous detection/pose results (e.g., based on distance, XYZ shifts).
- Compute the gimbal angles (yaw and pitch) required to accurately land projectiles on the detected armor plate.
- Compute pitch using an easily-adjustable lookup table or ballistic model based on distance to target.
- Compute yaw using a predictive model using the detected armor's XYZ pose, rotation, and velocity
- Send the computed gimbal angles to the STM32 control board via UART.
- Performance
- Ensure real-time end-to-end performance of 120 Hz.
- Testability
- Include a comprehensive suite of unit tests for all modules to verify component correctness.
- Maintainability
- Maintain modularity by separating ROS2 and C++ logic into
xyzNode.cpp
andxyz.cpp
files. - Provide thorough documentation, including doxygen-style comments for functions and README files for modules.
- Maintain modularity by separating ROS2 and C++ logic into
Clone this repository into your ros2-ws
directory. We provide a run
script that can be used to build, run, test, and clean the workspace with the following options:
- Build
./auto-aiming/run build
- Launch ROS2 code
./auto-aiming/run run <launch_file>
- Run automated tests (GTest)
./auto-aiming/run test
- Clean the workspace
./auto-aiming/run clean
- Optional flags
--quiet
: Suppresses console output, logs output tocommand_output.log
.--debug
: Builds with debug flags enabled.
./auto-aiming/run --debug --quiet run video2detector.py