CTR Can too stale

Trying to run the tutorial ramsete command from frc. We’re using falcon 500s, and its throwing these two errors:
ERROR  -3  CTR: CAN frame not received/too-stale.  Talon FX 1 GetActiveTrajectoryVelocity 
ERROR  -3  CTR: CAN frame not received/too-stale.  Talon FX 2 GetActiveTrajectoryVelocity

Here is our code: https://github.com/SOTACyberdragons/frc-robot-2022

1 Like

Have you double checked your CAN IDs against what you have in Phoenix Tuner to make sure everything is matched up?

The ids are matched correctly

I’m one of the mentors for the team having the issue mentioned above so adding a few more details. Outside of path following, the drivetrain functions as expected (encoders are good, etc). The issue occurs just when trying to execute a simple Ramsete command found in https://github.com/SOTACyberdragons/frc-robot-2022/blob/main/src/main/java/frc/robot/RobotContainer.java.

Talon 1 and 2 are masters, with 0 following to 1 and 3 following 2. Asides from the error message, we’re getting a lot of what appears to be jitter on the drive train; are we voltage starving the motors or is it packet drops?. The graphs in Phoenix Tuner look good in that we’re getting consistent feedback on the CAN bus from the devices in question.

Like most teams, we’ve had a lot of brain drain, but the platform we’re doing development testing on is our old 2020 bot, so it should be sound hardware-wise. How to work with Falcons properly, that’s another story ;). I suspect it’s a bad configuration or constraint settings when we configure the motors in drivetrain class. It doesn’t help that the issue is so domain-specific that there’s very little Google picks up to at least point us in the right direction.

Your RamseteCommand has been given your getWheelSpeeds method, which uses WPI_TalonFX.getActiveTrajectoryVelocity. Docs:
https://store.ctr-electronics.com/content/api/java/html/interfacecom_1_1ctre_1_1phoenix_1_1motorcontrol_1_1_i_motor_controller.html#a86fefad06e1761649f060785de965afd

This is meant to be used for getting the target velocity of a motion profile. You want WPI_TalonFX.getSelectedSensorVelocity.

I was thinking it was wheelSpeed. There was old bug in the code that I saw after taking a break (the * 10 thing). With the bug fix and your recommendation, it makes a lot more sense. Thanks for taking the time to look and providing some valuable advice (and saving us a lot of time!). We’ll give it a try tomorrow.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.