Has anybody gotten any of the AprilTag packages for Python to install? If so, can you please let me know what you did. I’m using Python 3.10.5 and have had no luck with any of the ones that I’ve tried to install (apriltag, apriltags, dt-apriltags, pupil-apriltags, and pyAprilTag). The error messages that are coming back haven’t been the most useful either.
Try python 3.9.
I’ve been using opencv-contrib-python-headless
My understanding is that there will be some sort of recommended library for FRC + AprilTags. Once that is announced, will certainly have RobotPy bindings made for it.
@aph5 This should help you get rolling.
I am not sure why we’d have to wait for a “recommended” version. Using a non-wpilib bound version would allow us to a lot more flexible with our platform choice.
They never said you’d have to. They’re just saying there will eventually be a working solution recommended to teams.
As of now I have successfully detected and localized the position of apriltags using python on the raspberry pi. I suggest using pip to install packages on python. I have used pupil-apriltags · PyPI and apriltag · PyPI very successfully. You can also just clone the github repositories for either libraries, if nothing works you might want to reinstall python on your computer.
You might find this tutorial useful. I haven’t fully went through it, but thought of this post when I saw it.
Using Windows or Linux machine?
I’m not sure what your question is.
All testing I have seen here is using co-processors such as a Raspberry Pi to do this testing.
OP did not specify. As you stated most of these examples are it working in Linux.
841 has used Windows coprocessors in the past (2017, mini gamepad pc, which we still use as a driver station sometimes)
This is something I have been VERY curious about. Do you have a link to the gamepad you are using?
This is not the one we own, but I think it is a GPD. I’ll try to remember to look for the part number next time I’m in the lab. Google is not cooperating
I think ours is physically smaller but with worse specs (works fine)
As a simple update, I just did a side by side performance update based on FPS.
My test system is a Raspberry Pi CM4 on a CM IO board. I have a Pi Camera v2 and a generic USB camera connected to it.
Using Python and a multithreaded acquisition thread and a processing thread, I compared FPS between the USB and Pi Camera.
Both cameras were able to identify tags at 28-29 FPS at a resolution of 640x480.
Based simply on the fragile nature of the Pi Cam ribbon cable, I would lean toward using a USB camera . YMMV
As mentioned, these are all Linux. But either can be used to play. On-robot implementation using windows might be more pain than it is worth.
I asked since I was able to get dt-aprilTags running on a laptop with Ubuntu 22.04 but not on Windows
I wonder if the snake eyes product is compatible with the pi4?
Even if the LEDs aren’t super required there is enough good about the packaging that might help.
Plus CSI cameras can be very low latency.
Yes. Per the datasheet it only depends upon GPIO pins to control the LED’s, and transforms POE input (from the 4 pin header) to regulated 5V at the header. Both are supported by the Pi4 with the same pinout as the Pi 3.
Romi apriltagshttps://www.rpanion.com/blog/2021/05/27/aprilmav-using-a-raspberry-pi-for-indoor-robot-navigation/
The AprilTag repo says it has a python wrapper included: https://github.com/AprilRobotics/apriltag
Have you tried building the official one yourself?