CTRE CANcoder report wrong value in BEGIN

Running SDS Mk4i’s.

Anyone run into a issue where the CANcorder doesn’t seem to be reporting the correct value in BEGIN?

We moved it to Periodic and tell it to run only once. And that seems to have removed the issue. I see other teams init their Swerve Pod angle in BEGIN.

Has anyone seen this issue as well?

It reports the wrong value or it errors? It erroring due to CAN utilization has been a very common problem and teams need to keep retrying until it works.

There’s a bug with CANCoders where the position and absolute position will sometimes desync, even if you set the initialization strategy to “boot to absolute”. (At least this is the behavior our team has seen. We also use LabVIEW). I would recommend adding a dashboard readout of both the position and absolute position of each CANCoder, and adding a button to set the position to the absolute position.

I’ve seen other teams report having to wait 10 seconds for the CANCoders to report correct values after turning the robot on, but I haven’t looked into this much. no clue if this is the same for teams using LabVIEW or not.

It seems like CTRE made a blog post about this issue.

6 Likes

We ran into this and worked with CTRE on it some. We have a button on operator stick to sync positions and we call sync in our ctors. Since we started syncing in our ctors we haven’t had a problem. CTRE linked to an update in there blog that does alot more validation on boot up. We were at comp this weekend so we haven’t made the update yet.

It is not n a canivore and utilization seems ok. We also tried putting the camcorder init in a while loop and doesn’t allow it to him exit until two consecutive readings are within 1 degree of each other.

But that still lead to issues.

Didn’t see this until now. It’s good to know that we aren’t the only team who had this issue, and that there is a fix for it

What is a Ctor?

Constructor for classes in C++/Java.