I tried to add camera library.
But I could not find a way to add external libraries to wplib c++.
orbbec/OrbbecSDK: Orbbec SDK C/C++ base core lib (github.com)
I would like to add the above library.
How do I add a .so file?
Are you talking about integrating it into a robot program? While this is possible, it’s a lot of work (you’re going to need to cross-compile the library yourself to the Rio target), and the Rio doesn’t have enough CPU horsepower to effectively process camera data. I would strongly recommend you use this with a coprocessor such as a rPi instead, and send the resulting information via NT to the robot code on the Rio. The software will be easier to get running and you’ll get useful performance out of it.
Is it absolutely possible to add it only as a cross-compilation library?
Can’t i just make it work in C++?
Also I am using VMX-PI.
In order to use a library in C++, you must build a binary .so for the target platform (in your case the VMX-Pi). It appears they only provide 64-bit binaries, so you’re going to have to build it yourself for the VMX-Pi target. It might be easiest to build it on the VMX-Pi itself. Once you have the library built you can point the build.gradle to it in a few different ways. My understanding is that the VMX-Pi still uses a 2020 version of WPILib?
Yes it is using the 2020 version. orbbec sdk supports both arm32 and arm64. Can you tell me how to modify build.gradle in more detail?
This depends on how the library is built. One way you can do it is statically linking the library into your project eg.
binaries.all {
lib project: ':wombat', library: 'Wombat', linkage: 'static'
}
If for a Gradle project wombat, called Wombat. This relies on you being able to build the project as a Gradle subproject. Probably the more useful option in your case is adding a native dependency set. We see here that this can be rather annoying but is possible. Grapple Robotics vendor library could be used as an example for this.
I just don’t understand. Can’t you easily add a so file? Just use c++
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.