Thrifty Swerve Code problems

My team is trying to use Thrifty-Bot’s swerve code, which uses stryke force’s code and libraries, however, when we try to run it we get errors saying that the stryke force libraries are trying to use methods that do not exist. Has anyone else had this problem?

As a general rule, if you could provide at least the error messages reported that would be helpful. A link to your repo would be more ideal since it would let folks recreate your set up.

Sorry about that. I’m not very active here, so I wasn’t quite sure what to do.

1 Like

Here is our repository link: https://github.com/team2383/2021TestCode.git

1 Like

I haven’t done too much digging but are you missing something with the ctre libraries?

It seems to be complaining about that.

We checked, we aren’t missing anything, and they are up to date.

If It takes a while for someone to get back to you I will try to get some people in touch.

The libraries, what about the Talons themselves? Those “CTRE Firmware could not be retrieved” concerns me. As does the fact that the method not found error should be a compile time error yet this is clearly at least starting.

Doing a quick pass nothing looks super wrong with the code (from a 10k foot view).

Thanks.

Oh, those are just that we haven’t connected all of our talons yet, but our firmware is also up to date. But I don’t think the code errors have to do with the missing talons.

What’s going to happen when azimuthTalon.getSelectedSensorPosition(0) is called on a talon that doesn’t exist? Honest question, idk how the CTRE library responds to method calls on a device that doesn’t exist these days.

Sorry if I seem to be harping on the CTRE side, but that error doesn’t make a lot of sense given that method does exist

Simple check, only initialize talons that actually exist?

I’m pretty sure the only error that I should be getting is that it can’t retrieve the firmware version.

The other weird thing is, if you check out the code that they use to zero the talons, they call a method from ctre that does not exist. I had to comment out us zeroing the talons to stop getting that error.

It looks like it is confirming the Azimuth talon is non null.

That is a very different check than doesn’t exist.

That is verifying that the Java object exists not that the device is capable of responding to requests.

So I guess the question is are the TalonSRX’s you have using CANids 0-3?

Not sure, but I think we have some with those IDs.

Suggestion - structure your code such that you can use any id for those.

The simplest way is to create a constant array of the IDs that you then iterate through.

I’ll try to do that, and it makes sense, since the only error that we have is for ID 0, and that is the only ID that does not have a talon.

Well and it’ll be the first one they loop through and it throws an error it’ll crash your code.