Rev 2m Distance Sensor Issues

I’ve run into an issue using the Rev 2m Distance Sensor on our robot. I’m using the Java FRC library provided by Rev. https://github.com/REVrobotics/2m-Distance-Sensor

I’ve written a bit of code that very closely follows Rev’s example code, yet when deployed the Rio crashes on startup and spits this error out to the driverstation.

ERROR  1  Unhandled exception instantiating robot com.revrobotics.jni.VL53L0XJNI java.lang.UnsatisfiedLinkError: ‘void com.revrobotics.jni.VL53L0XJNI.Init(int, int)’  com.revrobotics.jni.VL53L0XJNI.Init(Native Method) 
Warning at edu.wpi.first.wpilibj.RobotBase.runRobot(RobotBase.java:244): Robots should not quit, but yours did! 
ERROR  1  Could not instantiate robot com.revrobotics.jni.VL53L0XJNI!  edu.wpi.first.wpilibj.RobotBase.runRobot(RobotBase.java:245)

I’ve tried replacing both the sensor and the cable, neither of those are the problem.

Any thoughts?

Are you using the color sensor as well? They use the same i2c address. I wonder if that is the issue.

~Mr. R^2

Rev does not appear to have ported their library to work with the 2020 wpilib.

I am also trying to connect the 2m Distance sensor via I2C. Rev just released an updated maven/vendordeps file https://github.com/REVrobotics/2m-Distance-Sensor/releases that is supposed to fix the Port to 2020 issue, ruling that out as the error’s cause. Any ideas on how to make this work? The code builds fine, but the Driver Station won’t run it.

ERROR  1  Unhandled exception: java.lang.UnsatisfiedLinkError: ‘void com.revrobotics.jni.VL53L0XJNI.Init(int, int)’  com.revrobotics.jni.VL53L0XJNI.Init(Native Method) 
Warning at edu.wpi.first.wpilibj.RobotBase.runRobot(RobotBase.java:291): Robots should not quit, but yours did! 
ERROR  1  The startCompetition() method (or methods called by it) should have handled the exception above.  edu.wpi.first.wpilibj.RobotBase.runRobot(RobotBase.java:293) 
Warning at edu.wpi.first.wpilibj.IterativeRobotBase.printLoopOverrunMessage(IterativeRobotBase.java:276): Loop time of 0.02s overrun 
ERROR  1  Unhandled exception: java.lang.UnsatisfiedLinkError: ‘void com.revrobotics.jni.VL53L0XJNI.Init(int, int)’  com.revrobotics.jni.VL53L0XJNI.Init(Native Method) 
ERROR  1  The startCompetition() method (or methods called by it) should have handled the exception above.  edu.wpi.first.wpilibj.RobotBase.runRobot(RobotBase.java:293) 
Warning at edu.wpi.first.wpilibj.RobotBase.runRobot(RobotBase.java:291): Robots should not quit, but yours did!

I’m having the same issue as you