A vision and pose estimation system for FIRST Robotics Competition robots. Inspired by Team 6328's Northstar and Team 1678's fork of it, Polaris.
Currently only tested on an Orange Pi 5 running Armbian Bookworm 24.5.5, with an Arducam OV9281 camera
- Tag detection using OpenCV's ArUco module
- Multi-target and single-target pose estimation
- Hardware video decoding using GStreamer
- Configuration and output over NT4
- MJPEG stream for debugging
- Achieves 70-90 FPS with tested configuration
- OpenCV doesn't come with GStreamer support by default, so we need to build it from source. Run the following command:
This will install OpenCV and GStreamer's dependencies and build an OpenCV Python wheel from source. This may take a while (around 45 minutes to an hour on an Orange Pi 5).
source build-opencv.sh
- Poetry is used to manage dependencies. If it's not installed, follow the instructions here,
and then run the following to set up a Poetry virtual environment and install all dependencies:
poetry install
- Make a copy of
./device-config/example-network-config.json
as./device-config/network-config.json
, and set the fields as needed. Thedevice_id
field will be the name of the subtable of theorion
table that this device will use, and should be unique. Theserver_ip
field should be the IP address of the NT4 server. This will usually be the RoboRIO's IP (10.TE.AM.2
). Thestream_port
will be the port that the MJPEG stream will be served on. This only needs to be changed if there is more than one instance running on the same device. - Use CalibDB to calibrate your camera and export the calibration file using OpenCV formatting.
Save this file to
./device-config/calibration.json
. - Run
to start the vision system.
poetry run python -m orion