Hi, I’m attempting to use Team 5190’s Kotlin Falcon Library to read the encoder value from a Falcon 500. The code compiles and deploys without error but throws “java.lang.NoSuchMethodError: 'double org.ghrobotics.lib.motors.ctre.FalconCTREEncoder.getPosition-2uoJ-EI()” upon execution. Any insight on what is causing this and how to fix it?
I don’t think that FalconLib was updated to 2022, so that would probably be the issue.
Another possible issue: is your code in Kotlin? Calling Kotlin from Java can be a bit tricky, especially with value classes etc.
Also, I just want to make sure that this isn’t the problem: If you want to interact with CTRE CAN devices, you need the Phoenix vendordep. 5190’s FalconLib is named after their team name, it has nothing to do with the Falcon500/TalonFX. (It has some convenience wrappers to make the API more Kotlin-idiomatic, but that’s it.)
Sorry for the late reply. The code I am writing is in Kotlin. This project also happened to be using the 2021.3.1 version of the WPI library which was published before the last update of 5190’s FalconLib. I also have the most recent Phoenix vendordep as well.
When you say “most recent” do you mean 2022? You can’t mix vendordeps across years, so if you’re using the 2021 libraries you need to use the 2021 vendordeps.
Also note that for 2022 competition you will need to use the 2022 version of WPILib (due to a transitive dependency on the 2022 RoboRIO image). If this project is not for competition you’re fine though.
I moved the project to use both the 2022 WPI library along with the proper phoenix vendordeps, updated the TalonFX firmware and the problem still persisted.
Did you also update Falcon Library so it used the 2022 Phoenix?
I did not write the library so I don’t think I am able to do so, and if I am able to, I don’t know how.
In order to use that library for 2022, since it appears to no longer be maintained, you will have to update it yourself. If you don’t know how to update it, you won’t be able to use it.
The source code is open so you could fork it and update it. https://github.com/FRC5190/FalconLibrary
I was the maintainer of FalconLibrary when I was a student on 5190 a couple years ago. Recently, we switched to Java for a variety of reasons and therefore, FalconLibrary will no longer be maintained.
As Peter mentioned above, you can fork the repo and update all the dependencies yourself.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.