OCCRA
Go to Post Viva la geek! - Andy Baker [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 03-23-2018, 06:37 PM
keco185's Avatar
keco185 keco185 is offline
Registered User
FRC #0484 (Roboforce)
Team Role: Programmer
 
Join Date: Jan 2015
Rookie Year: 2012
Location: United States
Posts: 28
keco185 is an unknown quantity at this point
Talon SRX don't Work

I apologize for the nondescript title, but as of now, I've been unable to isolate the problem to any degree. Nothing hardware or software wise changed on the robot, but suddenly, none of the Talon SRXs work. I get the following error in the console:
Code:
java.lang.UnsatisfiedLinkError: com.ctre.phoenix.motorcontrol.can.MotControllerJNI.Set_4(JIDDI)V
	at com.ctre.phoenix.motorcontrol.can.MotControllerJNI.Set_4(Native Method)
	at com.ctre.phoenix.motorcontrol.can.BaseMotorController.set(BaseMotorController.java:156)
	at com.ctre.phoenix.motorcontrol.can.BaseMotorController.set(BaseMotorController.java:94)
	at com.ctre.phoenix.motorcontrol.can.WPI_TalonSRX.set(WPI_TalonSRX.java:68)
	at com.ctre.phoenix.motorcontrol.can.WPI_TalonSRX.set(WPI_TalonSRX.java:46)
	at edu.wpi.first.wpilibj.SpeedControllerGroup.set(SpeedControllerGroup.java:41)
	at edu.wpi.first.wpilibj.drive.DifferentialDrive.tankDrive(DifferentialDrive.java:318)
	at edu.wpi.first.wpilibj.drive.DifferentialDrive.tankDrive(DifferentialDrive.java:287)
	at org.usfirst.frc.team484.robot.subsystems.DriveSub.doNothing(DriveSub.java:26)
	at org.usfirst.frc.team484.robot.commands.JoystickDrive.end(JoystickDrive.java:29)
	at edu.wpi.first.wpilibj.command.Command.interrupted(Command.java:308)
	at edu.wpi.first.wpilibj.command.Command.removed(Command.java:206)
	at edu.wpi.first.wpilibj.command.Scheduler.remove(Scheduler.java:281)
	at edu.wpi.first.wpilibj.command.Scheduler.run(Scheduler.java:221)
	at org.usfirst.frc.team484.robot.Robot.disabledPeriodic(Robot.java:130)
	at edu.wpi.first.wpilibj.IterativeRobotBase.loopFunc(IterativeRobotBase.java:190)
	at edu.wpi.first.wpilibj.TimedRobot.lambda$new$0(TimedRobot.java:30)
	at edu.wpi.first.wpilibj.Notifier.lambda$new$0(Notifier.java:97)
	at java.lang.Thread.run(Thread.java:748)
This repeats hundreds of times per second for each WPI_TalonSRX.set() that gets run. I have ensured that each talon has a unique ID and they all show up and can be sent messages from the RoboRIO web GUI. Since nothing hardware or software has changed, I don't know what the problem could be.

Our full robot code can be found on github here: https://github.com/team484/C45513
Reply With Quote
  #2   Spotlight this post!  
Unread 03-23-2018, 06:51 PM
keco185's Avatar
keco185 keco185 is offline
Registered User
FRC #0484 (Roboforce)
Team Role: Programmer
 
Join Date: Jan 2015
Rookie Year: 2012
Location: United States
Posts: 28
keco185 is an unknown quantity at this point
Re: Talon SRX don't Work

The problem was resolved by uninstalling and reinstalling the Pheonix Lifeboat config on the roboRIO. Still seems to be an unusual bug.
Reply With Quote
  #3   Spotlight this post!  
Unread 03-24-2018, 01:55 PM
Manseon's Avatar
Manseon Manseon is offline
Registered User
FRC #0068 (Truck Town Thunder)
Team Role: Programmer
 
Join Date: Jan 2017
Rookie Year: 2017
Location: Ortonville, MI
Posts: 4
Manseon is an unknown quantity at this point
Re: Talon SRX don't Work

We just had the same problem as well. Luckily I found your post and redeploying LifeBoat made it work. Thanks!
Reply With Quote
  #4   Spotlight this post!  
Unread 03-31-2018, 12:53 AM
robot_rover's Avatar
robot_rover robot_rover is offline
Registered User
FRC #2225 (R.U.S.T.)
Team Role: Programmer
 
Join Date: Jan 2017
Rookie Year: 2016
Location: Minnesota
Posts: 8
robot_rover is an unknown quantity at this point
Re: Talon SRX don't Work

Java's Unsatisfied Link Error happens when the JVM attempts to load a native library and it cannot be located. It is likely that this happened because the CTRE API was separated from WPILib this year, so whatever you had installed from last year was not sufficient.Re-installing it would put the library in the correct location.
Reply With Quote
  #5   Spotlight this post!  
Unread 03-31-2018, 08:12 AM
keco185's Avatar
keco185 keco185 is offline
Registered User
FRC #0484 (Roboforce)
Team Role: Programmer
 
Join Date: Jan 2015
Rookie Year: 2012
Location: United States
Posts: 28
keco185 is an unknown quantity at this point
Re: Talon SRX don't Work

Quote:
Originally Posted by robot_rover View Post
Java's Unsatisfied Link Error happens when the JVM attempts to load a native library and it cannot be located. It is likely that this happened because the CTRE API was separated from WPILib this year, so whatever you had installed from last year was not sufficient.Re-installing it would put the library in the correct location.
This happened at our second competition this year. We had already deployed code dozens of times with the API separation. But suddenly after one of the deployments it stopped working.
Reply With Quote
  #6   Spotlight this post!  
Unread 04-17-2018, 09:23 AM
MrP_Hack's Avatar
MrP_Hack MrP_Hack is offline
Mentor
FRC #3414 (Hackbots)
Team Role: Mentor
 
Join Date: Feb 2016
Rookie Year: 2013
Location: Michigan
Posts: 9
MrP_Hack is an unknown quantity at this point
Re: Talon SRX don't Work

We have had this happen a few times this year as well. Is there anyone from CTRE who has insight?
Reply With Quote
  #7   Spotlight this post!  
Unread 04-17-2018, 09:50 AM
Jacob C. Jacob C. is offline
Engineer at CTR Electronics
FRC #4130 (The Blue Devils)
Team Role: Mentor
 
Join Date: Nov 2009
Rookie Year: 2009
Location: Richmond, MI
Posts: 64
Jacob C. has much to be proud ofJacob C. has much to be proud ofJacob C. has much to be proud ofJacob C. has much to be proud ofJacob C. has much to be proud ofJacob C. has much to be proud ofJacob C. has much to be proud ofJacob C. has much to be proud of
Re: Talon SRX don't Work

This type of error is caused by the version of the low-level binary not matching the jar file.

Do you have multiple computers that are used at some point to deploy code to the robot?

The few instances of this that have been reported to us have been the result of different versions of Phoenix on different computers that are used to deploy code.

Re-running the LifeBoat install for the roboRIO would fix the issue because it forces the current version of the binary down to the roboRIO.

This seems to be more on the deploy side with the Eclipse plug-ins (and making sure your software versions all match), but I'd still like to be able to reproduce the issue.

If anyone has steps that can reliably reproduce the issue, please send them to support@ctr-electronics.com
__________________
FiM Volunteer
Since 2015: Controls Mentor for FRC 4130, The Blue Devils (Richmond, MI)
2009-2014: FRC Team 1718, The Fighting Pi

Full Disclosure: I am an Engineer for CTR Electronics
Reply With Quote
  #8   Spotlight this post!  
Unread 04-17-2018, 10:10 AM
francis66 francis66 is offline
Registered User
FRC #3414
 
Join Date: Jan 2018
Location: Farmington, MI
Posts: 2
francis66 is an unknown quantity at this point
Re: Talon SRX don't Work

I am one of the programming mentors from 3414 Hackbots, and from what I can recall, the error we were receiving in the DS console was different than the one in the start of this thread. We encountered a problem 2-3 times this season and it was always while we were deploying code from the same laptop wirelessly. Code would build and deploy successful, but DS would show the no Robot Code error and the console would repeat some sort of CTRE error repeatedly. Tried many things including rebooting the RIO, closing & reopening DS, rebooting the laptop, USB tethering to the RIO. Finally the fix came when redeploying lifeboat. If my memory serves me well, the Talons were not visible in the RIO web dashboard when we were thethered while the issue was going on.

Will be sure to post an update if I can recreate.
Reply With Quote
  #9   Spotlight this post!  
Unread 04-17-2018, 10:17 AM
ColbyG's Avatar
ColbyG ColbyG is offline
Registered User
AKA: Colby
FRC #1777 (Viking Robotics)
Team Role: Programmer
 
Join Date: Aug 2017
Rookie Year: 2018
Location: Kansas City
Posts: 76
ColbyG is just really niceColbyG is just really niceColbyG is just really niceColbyG is just really niceColbyG is just really nice
Re: Talon SRX don't Work

Quote:
Originally Posted by robot_rover View Post
Java's Unsatisfied Link Error happens when the JVM attempts to load a native library and it cannot be located. It is likely that this happened because the CTRE API was separated from WPILib this year, so whatever you had installed from last year was not sufficient.Re-installing it would put the library in the correct location.
Java teams should use GradleRIO to help with this. It automatically deploys all necessary CTRE libraries if they aren't already on your RIO, so you don't have to deal with errors like this.
__________________
The code should work!

Our team's GitHub organization

2018-current: FRC #1777 Viking Robotics
2018-current: Mentor for FTC #13161 Westridge Robotics Club


Reply With Quote
  #10   Spotlight this post!  
Unread 04-17-2018, 10:37 AM
francis66 francis66 is offline
Registered User
FRC #3414
 
Join Date: Jan 2018
Location: Farmington, MI
Posts: 2
francis66 is an unknown quantity at this point
Re: Talon SRX don't Work

Thanks Colby. Will definitely look into GradleRIO. Iím not certain if it would address the issue we encountered specifically. Our issue appeared in the middle of testing the robot and making code changes on the fly. So we already had successfully installed the CTRE libraries to the RIO. It was almost as though something became corrupt in the runtime.
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 01:44 AM.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi