I have been having problems with my robot code deploying to our robot. The code will deploy successfully, but the DS will still be red for robot code. For the past few days, I was unable to figure out my problem and I’ve troubleshooted using different threads on here. However, my problem involves the CTRE library. I’ve tested and tried a sample code, which on its own runs perfectly, but when I import ctre in it, it runs the same as my own code. I’ve tried multiple times installing the library as given on the Robotpy Documentation (https://robotpy.readthedocs.io/en/stable/install/ctre.html). The command prompt tells me that I have successfully installed the library, but still get errors when I run my code with it. I have no idea what to do from here.
Hi there! I use python on my team and I have a sense of where you are coming from. My first recommendation would be restart the robot. I imagine you’ve none that, so I’d connect to your robot now, and try running a netconsole, and monitor that. Check to see if it crashes there. Do you have required updates on your code(Ex. CTRE libs) and the updated v14 roborio? I think it’s 14, but not positive. Those are my suggestions. Let me know if this helps! If not, I’ll further my research.
As @auscompgeek mentioned, the error you’re getting indicates that you haven’t properly installed robotpy-ctre on your RoboRIO. As the documentation says, you need to install it on your computer AND on the RoboRIO.
If you believe you have installed it on the RoboRIO, can you try installing it again and try running your code again? If it still doesn’t work, can you paste the output of the installation process here? Probably some error occurred.
This happened to me too. Even though my motor controllers Victor SPX were connected and properly chained, it couldn’t detect my motor controllers. My solution to that was to reimage the roborio. MAKE SURE to use 2019 update suite’s reimaging tool. Also after doing that, I had to rewire my CAN and change the IDs one by one.
Make sure to double check because it’s my first year in FRC too.