We’re trying out the CTRE swerve api, but we’re having some problems:
the generated code assumes that our pigeon and modules are connected to the same CANBUS. Our pigeon is connected to the rio’s bus and everything else to the CANIvore.
Any suggestions on how to change the code to make is work? ( changing the bus is not an option)
This may be an oversight in the API, but if their API does not allow this, it may be for other reasons, e.g. the module controllers are getting status messages directly from the Pigeon. If everything is separately constructed in the generated code, you may be able to just change the constructor for the Pigeon and see if it works?
Why is changing the bus not an option?
Well, we tried changing the pigeon variable after initializing the SwerveDrivetrain class but it’s private and final.
We tried copying the library to a folder in the project but it makes a lot of errors(even after changing the package deleration).
Not sure how to approach this.
To your question why changing the bus is not an option:
and this is the better way to access the CANIvore

Any suggestions?
The odometry thread in our swerve API requires all devices to be on the same CAN bus to be able to properly take advantage of timesync (when Pro-licensed) and the waitForAll
/refreshAll
APIs (which require all signals passed in to be on the same CAN bus).
It’s not clear from that image why the Pigeon 2 can’t be on the CANivore.
Makes sense, we’ll do our best.
the pigeon’s placement on the robot is borderline unreachable, which is very unfortunate sense we had 0 electrical problems this year. we are competing in week 1 and trying to compete in the pregional we have next week so the 2 hours we’ll spend on wiring are expensive
Sincerely,
the bird
You’ll probably want to move the Pigeon 2 to a better location anyways. If something happens to your Pigeon 2 during an event and it gets damaged, you’ll want to be able to quickly swap it out with a backup. If it’s in an unreachable location, then you could sacrifice a few matches trying to get it replaced.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.