Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Orange Pi 5 Pro #1315

Open
grahamgraham opened this issue May 2, 2024 · 12 comments
Open

Support for Orange Pi 5 Pro #1315

grahamgraham opened this issue May 2, 2024 · 12 comments
Labels
enhancement New feature or request

Comments

@grahamgraham
Copy link

Is your feature request related to a problem? Please describe.
None of the current images work with the newly release Orange Pi 5 Pro.
I got my hands on an OPI 5 Pro, and neither the 5 nor the 5 plus images will work (it does not boot). The linux and ubuntu images on OPI's website for the 5 Pro do boot.

Describe the solution you'd like
A release of Photon Vision for the Orange Pi 5 Pro

Describe alternatives you've considered
I've considered (and will attempt) using the "Other Debian-Based Co-Processor Install", but boot times with OPI's default image aren't super conducive for FIRST competitions.

@grahamgraham grahamgraham added the enhancement New feature or request label May 2, 2024
@srimanachanta
Copy link
Member

Take a look at this instead of the default image: https://www.armbian.com/orangepi-5/

@grahamgraham
Copy link
Author

Armbian allows me to boot into it, but there's other issues (unable to detect ethernet interface).

Does that mean if Armbian works, the current release of PV for OPI 5 should work?

@srimanachanta
Copy link
Member

Armbian's image is significantly faster for booting than Orange Pi's original image which would solve that issue. You would then need to install PV on that following the docs you sent. This would be temporary until a first class image could be made. Based on Armbian's build, a device-tree might be present regardless of board type in the image so we might be able to adapt our current image-gen with that in mind

@grahamgraham
Copy link
Author

Ok, that makes sense.
There's still ethernet issues with the Armbian images out there, but I am happy to report that the OPI 5 Pro bookworm server build that's provided on OPI's site is working well with PhotonVision.

Please let me know if you need a tester for the OPI 5 Pro's first class image.

@srimanachanta
Copy link
Member

srimanachanta commented May 2, 2024

Upon further investigation, the upstream image provider actually does have an image for OPi5-Pro found here. This is the image we use for all our image builds. Run this script to actually install and setup PV but know that this hasn't been tested on the OPi5 Pro by the PV dev team.

Edited to link the server version instead of desktop.

@grahamgraham
Copy link
Author

Out of curiosity, I see that that image is a desktop image. When PV releases an approved version, is the build typically CLI or desktop?

@srimanachanta
Copy link
Member

srimanachanta commented May 2, 2024

Out of curiosity, I see that that image is a desktop image. When PV releases an approved version, is the build typically CLI or desktop?

Server, so command line only. Also, use this instead for the server version.

@crschardt
Copy link
Contributor

With 24.04 you may also have to install gcc or else photonvision will crash at startup.

@roberttuttle
Copy link

roberttuttle commented May 8, 2024

We tried upstream 24.04 (2.0.0) server image linked above for a new Orange Pi 5 Pro we received and it failed to boot (kernel panic) ... so it doesn't appear stable yet.

In an alternate path for the near-term, we went down the path of using the official Ubuntu 24.04 / Jammy image from the Orange Pi downloads and then ran through the PV image install steps. PV working correctly with our OV9281 cams for AprilTags at that point, BUT, object detection pipeline (RKNN) not offered as an option in the pipeline list. (We have cams for both AprilTags and Object Detection for this season's robot).

I dug into the Ubuntu/OPi5 image and found that all the required libs for RKNN were in place and working outside PV.

I then dug into the PV code and logs and found that the object detection feature being offered was dependent on the platform detection successfully parsing the model name from the device tree with "Orange Pi 5". Unfortunately, the Orange Pi 5 Pro image has a compiled device tree model name of "RK3588S Opi 5 Pro" which of course doesn't match the string comparison in the PV Java code here:

return fileHasText("/proc/device-tree/model", "Orange Pi 5");

As a local fix without offering a PV code fix via PR, I was able to edit the device tree model name using the native device-tree-compiler tool with the command: sudo fdtput -t s /boot/dtb/rockchip/rk3588s-orangepi-5-pro.dtb / model "RK3588S Orange Pi 5 Pro" (followed by a reboot)

After reboot, PV correctly matched the platform and allowed object detection pipeline to show up (and work successfully with Crescendo notes out of the box).

Obviously, longer term fix is to update PV code to support whatever official Orange PI 5 Pro device tree model name is supplied for the board/images.

@grahamgraham
Copy link
Author

grahamgraham commented May 8, 2024

We tried upstream 24.04 (2.0.0) server image linked above for a new Orange Pi 5 Pro we received and it failed to boot (kernel panic) ... so it doesn't appear stable yet.

Funny enough, I was able to get that server image to boot without issue. However, PV wouldn't install properly.
I ended up using the OPi 5 Pro server release that's on OPi's site. For offseason it will work well enough for testing.

I'm stoked because this is a much nicer solution than our Limelight 2+, and way cheaper than the LL3G.

@srimanachanta
Copy link
Member

Happy to hear that worked, you might want to try installing dietpi onto orange pi's image in order to clean it up, I'm not sure how much it will reduce boot times though.

@grahamgraham
Copy link
Author

Ah, that's a great idea. I'll give that a shot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants