Hi, we are a new team developed in Turkey and we’ve been experimenting with WpilibPi lately. We’ve been wondering if we can add external libraries to RaspberryPi for vision processing. Also, do you have any suggestions that new teams should know about WpilibPi?
I ran into the same problem experimenting with python apriltag detection on the wpilibpi image. If you connect your pi to the internet and ssh into the pi you can install anything you want (like the apriltag python library). Hopefully they include it in the 2023 image.
What’s an easy way to do this if my cable modem is far away? Thanks.
You could re-enable WiFi on the Pi (it takes a bit of config to do it). Or use a wireless bridge.
I can’t 100% verify this works as I don’t have a blank wpilibpi image, but this installed the package offline after I had uninstalled it. First, download the package on another computer using
pip download apriltag
This will create a file apriltag-0.0.16.tar.gz in whatever directory you run it in. Upload that to the pi using the web interface (Application/File Upload, don’t extract it) and finally ssh into the pi and run:
pip3 install apriltag --no-index --find-links ./
If you are using pip, apt-get, or any similar command to install libraries using the WPILibPI image, you may need to force an ntp update, otherwise the commands won’t install due to a SSL error.
sudo service ntp stop
sudo ntpd -gq
sudo service ntp start
For all you linux guys out there on ubuntu server would this be sufficient for static ip (since the phonton vision static ip setting only works on pi)
netplan / 00-installer-config.yaml
# This is the network config written by 'subiquity'
network:
ethernets:
enp2s0:
dhcp4: false
addresses:
- 10.50.13.11/32
version: 2
or would i need to do more. When i tried this on my local i couldn’t connect to the 50.13 ip but someone on the discord said it would only work on the ratio/rio
Note the the apriltags package on pypi is not maintained (hasn’t been update in 4 years) and isn’t maintained by the u of m apriltag group. It’s not guaranteed to be up to date or to work.
Are there instructions for this? I haven’t been able to figure out how to re-enable wifi.
It’s not documented (somewhat intentionally, as it’s against the rules to have WiFi running at competition events), but what you need to do is found here: https://github.com/wpilibsuite/WPILibPi/blob/main/stage5/02-net-tweaks/01-run.sh (the Romi image is built on top of WPILibPi, so it re-enables WiFi).
Thank you, that’s super helpful! Much easier to get packages installed and test on home networks.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.