Running WPILibPi on linux?

@Peter_Johnson - I was wondering if there is a way and/or guide for installing WPILibPi camera server on a linux PC instead of a Pi - using a .jar install or the like (not a full image).

I see there is a .java option in github for this project - I assume this could be used to directly run the server?

With the rarity of Pis these days, we might look at mini-PCs for running things like photonivision, etc - and I was wondering a single mini-PC could run both.

There’s no guide to do it, but it’s quite possible, especially for an x86-based Linux setup. Regarding the camera server project, the build.gradle in that project isn’t set up to use the standard desktop dependencies, although it shouldn’t be too hard to update it to do so (you need to use desktop dependencies to get the right native binaries). The “web interface” to wpilibpi (to provide camera configuration etc) is a separate build… it can be built on a standard Linux system (I do that for testing purposes) but it takes a bit of twiddling with Makefile options and also needs a locally built version of allwpilib.

How hard would it be to make a version that is somewhat turn-key to install on linux (including the web interface)? I’m guessing there will be interest this year given how hard Pis are to find.

It’s not hard, it just takes time. Are people mostly looking at x86-64 based Linux machines? For the webserver bits, just doing a CI build to a particular target would be easiest.

Yes - photonvision has been recommending this type of miniPC running linux:

To be clear the N5095 Beelink PC is just my personal recommendation. I am not a Photonvision developer, I just think it’s neat.

That said, I don’t really understand the original post - is this something that Beelink PC users will need to do if they want to use their setup on a robot?

1 Like

I’m hoping to set up the mini PC to run both photonvision and the WPI camera server.

Why do you need to run the wpilib camera server as well?

I assume the mini-PC has plenty of capacity to run both (since each can run on a Pi) - it would be more economical ($$ as well as power, space) to have it do both tasks instead of multiple coprocessor units.

What extra functionality does the wpilib camera server add? PhotonVision has the capability to handle multiple cameras and dashboard streams.

It’s by no means necessary, but having a turnkey iso image that you could install and have everything installed would be pretty nice

1 Like

Agree! I think by default the camera server and photonvision use different ports for their web GUI so should be able to run simultaneously with the default settings.

While a turnkey image might be nice, it would also be a fairly substantial amount of work to create, versus just providing the config server executable, template project, and some documentation of manual installation steps.

The Pi shortage is short term, so I’m not sure of the value of creating and maintaining an x86-based variant… once Pi’s are widely available again, are people still going to use a big/heavy x86-based coprocessor instead of a Pi?

Separately, the config server could probably use a rewrite in Python–writing it in C++ made sense when targeting Pi3b’s which really had minimal processing power and memory, but it’s definitely harder to build and less customizable than a Python-based server would be.

1 Like

I 100% agree with this, but I lack the faculties to do it myself. If anyone wants to tackle it I can send them a mini PC to fuss with.

That said, I think Photonvision is plenty for this task, if the goal is just to run cameras. I don’t know what the WPIlib option would add.

1 Like

The frame rate for april tags is 4x better on the mini-PC compared to the Pi, so even when Pis are available again their may be interest in using the mini-PC for better performance.

1 Like

I’m asking why you need to run both- photonvision has everything the wpilib camera server has built in.
Edit: by wpilib camera server are you talking about the wpilib pi image?
Second edit: for some reason I thought this was the PhotonVision thread- my apologies

Only 2x as good as a Pi4, though, and if 640x480 proves to be reliable up to 28ft you may not need more than that. GPU acceleration can also help. Either way, I don’t think there’s a need to run camera server and PV at the same time.

Yes the wpilib pi image. I wasn’t aware photonvision can do the same task - we use the camera server to compress three webcam images and put them on network tables for the driver station to display.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.