ThriftyBot Swerve Programming

Im using Java and YEGSL to try and get ThriftyBot swerve modules running. Using 2 spark Max and Neos with a Thrifty absolute encoder. I got the program to build, and deploy to the robot. I never get Robot Code shown on the driver station and keep getting
CANSparkMax object created for CAN ID 5, which is not a SPARK MAX. Some functionalities may not work.
for all of my Spark Max.

is a link to my program. Its not complete and is not tuned for actual driving, however I was trying to hopefully get some movement out of the modules.

Based on the configuration in the deploy folder you have in fact set the motors to can id 5. Please double check the IDs in those files to validate against your actual id’s. These modules are set up in the “deploy” folder in the project. There is one file per module. It seems like this was set up too the back right module.

Sorry for not clarifying. I’m getting them for all motors, I just pulled the CAN ID5 as the example. All of my motors and CAN ids are throwing the error

Is there any reason you are not explicitly pulling down the YAGSL-Example repo setting your Id’s there and attempting to deploy that ? Might be worth a good try before you jump into building it with a brand new project.

Ill give it a try

Maybe it could be a wiring issue, or maybe it’s defective? I suggest booting up the REV Hardware Client, and checking verifying that the client recognizes all of your spark max’s.

Try clearing all sticky faults, reconnect the motor controller, or use a different SparkMax.

Also, I noticed that you are using an outdated version of the NavX library , you should delete the vendordep and download the lastest version

https://dev.studica.com/releases/2025/Studica-2025.1.1-beta-4.json

Using the example, configured to our robot, Which is here

Im getting
ERROR  4  [CAN SPARK] IDs: 2, 3, 4, 5, 6, 7, 8, 9, WPILib or External HAL Error: CAN: Message not found Periodic Status 2

with all my sparks still. I am able to see them all and the RoboRio/PDP on the Rev Client and I made sure everything was up to date. Im able to drive all of the Sparks from the Rev Client over CAN with the rio disconnected. So I dont think I have a bad Spark.

On the rev hardware client you’ve set the Ids of the motors properly ? They should match the configs.

Yes they all match. Ive checked all ids several times as I suspected this problem as well.

Are you running 2025 wpilib beta ? if so did you upload your roborio too 2025?

I am running the beta. The roboRIO has been updated to the 2025 version and I am using the 2025 edition of all the game tools

Hmm. Can you post the full output where it errors?
Might need to call the expert in here : @nstrike

I am no where near an expert, i prefer the term “experienced idiot” :laughing:.

Anyways this error is normally the result of a broken can line between the last working id and the first error ID. There are a few other things that it can be which i am checking now. It does not look like it can be anything else rn

Im getting
[CAN SPARK] IDs: 2, 3, 4, 5, 6, 7, 8, 9, WPILib or External HAL Error: CAN: Message not found Periodic Status 2.

ive checked all of the CAN wiring, and im able to see all the controllers, PDP and roboRio in the revClient with no CAN errors. Ive tried updating everything to the 2025 release that came out today and am getting the same error. Im also able to drive all of the spark maxes manually from the rev client. So im guessing there is something stopping the roboRio from communicating with them.

Im also getting
CANSparkMax object created for CAN ID 5, which is not a SPARK MAX. Some functionalities may not work.
for all my CAN ID of spark maxes. Im assuming this is related to them not communicating.

Did you update the firmware on the sparkmax to the beta one?

My spark max is updated to the highest firmware that the Rev Client allows. Is there a beta firmware somewhere that I need to get?

Upon further investigation, yep that was the problem. Sparks are working now

1 Like