|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Problem with 254's library
So we are looking into using 254's library, which was released in 2015. This is the code in question: https://github.com/Team254/FRC-2015. However, we are running into issues. Deploying is successful, but there is no robot code. From the Riolog, we get the error below. Any idea what could be causing it and how to fix it? Thanks.
Exception in thread "main" java.lang.UnsatisfiedLinkError: /var/volatile/tmp/libwpilibJavaJNI1540268506574750731.so: libFRC_NetworkCommunication.so.1: cannot open shared object file: No such file or directory at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.jav a:1929) at java.lang.ClassLoader.loadLibrary(ClassLoader.java :1814) at java.lang.Runtime.load0(Runtime.java:809) at java.lang.System.load(System.java:1083) at edu.wpi.first.wpilibj.hal.JNIWrapper.<clinit>(JNIW rapper.java:53) at edu.wpi.first.wpilibj.RobotBase.initializeHardware Configuration(RobotBase.java:167) at edu.wpi.first.wpilibj.RobotBase.main(RobotBase.jav a:179) |
|
#2
|
|||
|
|||
|
Re: Problem with 254's library
libwpilibJava is depending on libFRC_NetworkCommunication.so.1 and cannot find it.
Perhaps you need to check if the FRC java is installed correctly? Can you deploy a simple java robot program and have it load correctly? |
|
#3
|
|||
|
|||
|
Re: Problem with 254's library
A potential fix we tried was to switch away from their snapshotted WPI and replace it with the newest version. When we did that, the gyrothread broke, so we commented out the parts of the code that used it to see if it worked. That resulted in a successful deploy.
Any ideas on what could be wrong with the gyrothread? I'll post the exact error we get without gyrothread commented out once I get to the lab today. |
|
#4
|
||||
|
||||
|
Re: Problem with 254's library
Well, the code was written against the 2015 API, and you probably have the 2016 API loaded. There are compatibility issues when using different versions of the API!
A little googling turned up a copy of the 2015 API Javadoc and the 2016 API Javadoc. Since you mentioned Gyro code, I checked out that area... It seems that 2015 had a Gyro class, while 2016 instead had a Gyro Interface, which lists several known implementations. So, that's one possible difference in the API that would cause old code to have serious issues with the newer API! That said, I'm not going to go through and do any code analysis to figure out what the exact problem is and where to fix it... that I leave up to you! |
|
#5
|
|||
|
|||
|
Re: Problem with 254's library
Quote:
Last edited by toodles9 : 08-11-2016 at 10:12 PM. Reason: added description of error |
|
#6
|
|||
|
|||
|
Re: Problem with 254's library
The error that we get when switching to the updated library is below:
Any ideas how to fix the notifier or JNI? We will also be looking into these meanwhile. Error at edu.wpi.first.wpilibj.RobotBase.main(RobotBase.jav a:206): ERROR Unhandled exception instantiating robot com.team254.frc2015.Robot java.lang.UnsatisfiedLinkError: com.team254.lib.util.NotifierJNI.initializeNotifie rJVM(Ljava/nio/IntBuffer V at [com.team254.lib.util.NotifierJNI.initializeNotifie rJVM(Native Method), com.team254.lib.util.Notifier.<clinit>(Notifier.ja va:27), com.team254.lib.util.gyro.GyroThread.<init>(GyroTh read.java:27), com.team254.frc2015.HardwareAdaptor.<clinit>(Hardw areAdaptor.java:46), com.team254.frc2015.OperatorInterface.<init>(Opera torInterface.java:12), com.team254.frc2015.Robot.<init>(Robot.java:40), sun.reflect.NativeConstructorAccessorImpl.newInsta nce0(Native Method), sun.reflect.NativeConstructorAccessorImpl.newInsta nce(NativeConstructorAccessorImpl.java:62), sun.reflect.DelegatingConstructorAccessorImpl.newI nstance(DelegatingConstructorAccessorImpl.java:45) , java.lang.reflect.Constructor.newInstance(Construc tor.java:408), java.lang.Class.newInstance(Class.java:433), edu.wpi.first.wpilibj.RobotBase.main(RobotBase.jav a:204)] |
|
#7
|
|||
|
|||
|
Re: Problem with 254's library
Our robot code this year was written in Java and ran fine.
|
|
#8
|
||||||
|
||||||
|
Re: Problem with 254's library
Are you also running the 2015 image?
|
|
#9
|
|||
|
|||
|
Re: Problem with 254's library
We have v19 on the roborio right now. Do you know which version the 2015 image corresponds to?
|
|
#10
|
|||
|
|||
|
Re: Problem with 254's library
We managed to get drivetrain code running using the updated version of wpi. We added try-catch statements inside the Notifier, which allowed us to enable successfully. However, we obtained the Notifier class by decompiling the old wpi version and copy pasting it, so we were wondering if this is acceptable or if there is a better way of doing it? Additionally, we were wondering about the general changes from the 2015 to 2016 libraries, and would we likely have to make further changes to use the 2017 wpi library? Thanks.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|