Hi everyone, our team has developed our own motion profiler library, and I am thinking of re-writing it to use JNI for better performance and RAM usage. I already have some experience with JNI, but I’ve never attempted to use it with Gradle or use it for the roboRIO. I’ve found a few sources online with some snippets of code, but I haven’t been able to get any of them working.
With that said, can anyone offer me a beginner’s guide to using JNI in FRC? Specifically, I’m interested in these questions:
- How do I modify
build.gradleto generate JNI headers and compile JNI?
- How to cross-compile for the roboRIO?
- And finally, once I have the
.sofile with my jar, how do I use it/deploy it to the robot?
(I can build on both Windows 10 and Ubuntu 18.04 LTS)
Any help would be really appreciated. Thanks!