Lidar Scanse Sweep Code Compliation Issue

Hello,

We are attempting to use the Scanse Sweep Java library provided at

but are running into an issue when attempting to push code to the roboRio.

The code compiles fine and is pushed succesfully, but we get this error when attempting to the run code:

java.lang.UnsatisfiedLinkError: /usr/local/frc/lib/libsweepDriver.so: libFRC_NetworkCommunication.so.17: cannot open shared object file: No such file or directory

So it looks like the .so is attempting to use last year’s Network Communication protocol, and seeing as the new update uses the .18 version the code is unable to run.

Is anyone else using the Scanse Sweep Lidar? Have you had any luck in getting it to run off the Rio?

I’ve not updated that repo for 2018 yet. It also needs updating to the latest Scanse upstream library. I’m working on it and will post again here when it’s ready to use.

With the help of Thad House, I’ve updated the sweep-sdk vendor library for 2018.

Thanks for the update! The issue we were running into with the 2017 communication protocol is resolved.

Unfortunately, we are now running into a new error:

java.lang.UnsatisfiedLinkError: com.armabot.SweepJNI.construct(Ljava/lang/String;I)J com.armabot.SweepJNI.construct(Native Method)
at com.armabot.SweepJNI.construct(Native Method)
at com.armabot.Sweep.<init>(Sweep.java:12)
at org.usfirst.frc.team500.robot.subsystems.LiDARSubsystem.<init>(LiDARSubsystem.java:27)
at org.usfirst.frc.team500.robot.subsystems.LiDARSubsystem.<clinit>(LiDARSubsystem.java:18)
at org.usfirst.frc.team500.robot.Robot.teleopPeriodic(Robot.java:120)
at edu.wpi.first.wpilibj.IterativeRobotBase.loopFunc(IterativeRobotBase.java:213)
at edu.wpi.first.wpilibj.IterativeRobot.startCompetition(IterativeRobot.java:41)
at edu.wpi.first.wpilibj.RobotBase.main(RobotBase.java:250)

I have attempted to do
new Sweep(“port”, 115200)

  and 
  
  SweepJNI.construct("port", 115200)

but both give the above error.

Is this anything you saw in your testing?

Thanks again for your post/help so far!

Sorry about that, I missed a file. Should be fixed in the 2018.1.2 release.

We’re trying to use your library but we are currently running into an error when trying to access the methods of the Sweep.class.

When try to access getMotorSpeed() Eclipse is throwing out a “The method getMotorSpeed) from the type Sweep in not visible.”

I’m new to Java and not sure whether we are doing something incorrectly or something is wrong with the class.

Any help would be greatly appreciated.

Thanks to Peter Jonhson for updating the libraries!

Hey Piotr M we got the code working by using the SweepJNI class, you are correct in that the Sweep class is unusable. Instead of using the Sweep() initialize you need to use the SweepJNI initialize and preserve the device as a long to pass to SweepJNI functions later on the code. If you have any other questions or this didn’t make sense feel free to pm me!

Weird, I must have an issue with packaging somehow. I’ll take a look.