Closed RushilNA closed 8 months ago
Which branch are you using?
I tested with new swerve however twomorrow im going to test with the phoenix new phoenix 6 code and see how that works.
Those two branches do not currently work. Please use the code on master. Although it shows up as deprecated, it is not fully deprecated until next year and the code should work fine for now.
I can expand on that answer. The new-swerve is an attempt to migrate to PhoenixV6 and has not shown to work even with our robot (sorry we will clear that up in our READMEs soon). The migrate-to-phoenix6 branch is another attempt to migrate which shows signs of hope but are still under heavy development. As of right now we will test and continue developing in the migrate-to-phoenix6 branch Saturday afternoon EST. For best current swerve function using our code we recommend re-imaging PhoenixV5 onto your encoders (even though it indicates that it is deprecated, it is marked for removal in 2025, so the code should still temporarily work). Sorry for the inconvenience, but we are trying our best to make V6 work. Check for any merges from migrate-from-phoenix6 to subsystem-update, which indicates that it works for us and is being used to develop software for our new robot.
Oh ok thanks for the clarification
I tested the master brach code today however when I ran the code the motors made a humming noise. When i moved the left joystick it would stutter fro a second then stop. Affter that happened the offsets would be completly off. I looked into the code when i changed the modules that were in the code to mk4is instead mk4 it make less of a humming noise but it would still stuter and break the offsets.
https://github.com/frc461/Rowdy24/assets/59945459/5f9affa4-bb45-41a9-9ba1-c80839340532
We have not had this issue before so I am not sure why it is happening, but I have some things that you could try. Have you updated the firmware on your cancoders and pigeon (in Phoenix Tuner) and Spark Maxes (in REV hardware client)? Please make sure that the cancoders and pigeon are on Phoenix 5 and not Phoenix 6. In REV hardware client you can also run your rotation motors through USB-C to make sure that they are actually spinning around correctly (you will need to unplug the CAN from the RIO for the motor to actually spin). This will rule out any issues with the encoder of the rotation NEO. Finally, we have heard that Vortexes are sometimes causing issues with the CAN (https://www.chiefdelphi.com/t/rev-robotics-spark-flex-and-neo-vortex/442595/546). So if that Vortex is connected to the CAN, it would be great if you could disconnect it and run the drivetrain without it. Please let us know if those things do not work.
I ran the angle motors in a separate blank code and they were running completely fine. All of the can devices are on the right firmware. When ever that humming noise happened th spark max color would go to yellow but I could not find what that means. There is something for brushed motors but not for brushless motors which we use.
If the sparks are blinking orange and yellow that means theres a CAN fault. You can try double checking your CAN connections and removing the Vortex from the CAN.
ok will do that
Ok so i removed the vortex from the drivetrain and the same issuue still persists.
First, check for Orange/Yellow Slow Blink to confirm that it is a CAN fault. Otherwise, check very intently how it flashes when the motor hums and refer to the color codes. If it only flashes yellow then you might be mistaken on what your operating mode is. If it is orange/yellow blink, then there is a CAN fault. It will be shown after the first time the device is plugged into the CAN port and a fault later occurs. Check your CAN wiring when you see this fault.
I asked someone on our tech team and they said that it could be a mechanical issue with your turning motors. They say that you may have installed a gear wrong that causes it to jitter.
Hey there, just wanted to let you know that I was able to fix/configure Phoenix6 swerve drive correctly (at least for our robots). Check out commit bb476cc for the least personalized version of the implementation (we had to rotate gyro/offset equations by 90 degrees since then because our drive train was built with some swapped modules). Please let us know if you have any questions!
I dont know if this is just me but when ever I try to set the offset for the robot it dose not work. The turnning motor sounds like it is fighting another motor or it is ocilating im not sure. Affter that happens the when the robot tries to resetthemodule positions it goes to a completly diffrent spot. My team is running mk4 with neos cancoders and a pidgeon.