J-The-Fox / FRC-Team-5098

The FRC team 5098 GitHub repo!
https://northtownrobotics.com/
GNU General Public License v3.0
3 stars 1 forks source link

Phoenix 5 API has been deprecated #21

Open J-The-Fox opened 7 months ago

J-The-Fox commented 7 months ago

Overview

As of the latest update of Phoenix5 (5.32.0-beta-3), parts of the Phoenix 5 API has been deprecated and is scheduled for removal for the 2025 release. For us, this includes the CANCoder (com.ctre.phoenix.sensors.CANCoder) and TalonFX (com.ctre.phoenix.motorcontrol.can.TalonFX) classes.

There are 2 options we can do

First Option:

We can just leave it be for this season as it won't go into effect until next season. This would, of course, be the easiest of the options as this isn't scheduled for removal until the 2024-2025 season

Second Option:

Migrate all of our code to use the new Phoenix 6 API. This would be more work in the start but once it's complete we wouldn't have to change it again until the next major release of the Phoenix API. This is my preferred method as this will give us the knowledge of this new API while also having it be an easy start for the next season as we won't have to figure out how to migrate about-to-be-removed API code. There is a migration post here to help make the migration a little easier.

I personally prefer that we plan to update to the new Phoenix 6 API but that can be up for discussion here, let me know your thoughts on the matter

Dreadfall commented 6 months ago

Updated SwerveWheel file, specifically

Dreadfall commented 6 months ago

TEST Replace Phoenix code

J-The-Fox commented 6 months ago

Update

The branch for our Phoenix 6 API test looks okay. However, I do want to do some testing with our old bot to see if what we change here still works before I merge the branches together. I should do some testing later today

J-The-Fox commented 5 months ago

Update

So a bit of an update on the Phoenix 6 code. It is pretty much working how we want it to be but it does seem to be a little slower than we would have liked and the PID is also not tuned 100% for our motors so it still is a little flaky. But it is working. Which is something we could not say last week as it was pretty much broken. When we were in the progress of migrating from Phoenix 5 to Phoenix 6, we learned that 2 other teams that we talk to a lot have switched back to Phoenix 5 as Phoenix 6 was a bit of a challenge. So Phoenix 6 was on pause just so our drive team could practice. As stated earlier, Phoenix 6 is working, just not 100%. We were mainly testing it on our old robot chassis as the new robot hasn't been fully built enough to drive yet which should be changing soon. I will post the Phoenix 6 code soon for last years bot. The only thing that we haven't gotten around to fixing was the arm and pneumatics.

Just posting this here as a little update for what's been going on at the shop. Phoenix 6 should hopefully be fully up and running in the next week or two.

christopher443ew commented 3 weeks ago

The Phoenix 5 API has been officially deprecated, signaling a significant shift for developers relying on this technology. This change necessitates a transition to newer, more advanced APIs that offer enhanced functionality and better support. Developers must now adapt their applications to ensure continued performance Wisdom Teeth Removal Phoenix and compatibility. The deprecation of Phoenix 5 API also emphasizes the importance of staying updated with current technological advancements to leverage improved security, efficiency, and scalability. While this transition may pose challenges, it also presents an opportunity to innovate and integrate more robust solutions into existing systems.

J-The-Fox commented 3 weeks ago

Are we talking about the same Phoenix API? The Phoenix 5 API that's being used, and in this case, deprecated as of v5.32.0 is used for First Robotics Competition teams to allow us to communicate with Cross The Road Electronic's motor controllers/motors. Phoenix 5 API Documentation

The only controller we use that still requires Phoenix 5 is the TalonSRX. But as of writing, all of our code has been translated successfully from Phoenix 5 to the new Phoenix 6 API although there is still a few more tweaks that could be required such as getting Path Planning working on our swerve drive code.

I'm not entirely sure what Wisdom Teeth Removal Phoenix has to do with with this however