FRC4561TerrorBytes / TB2024

Terror Bytes #4561 Robot code for 2024 FRC season: Crescendo
http://www.terrorbytes.org/
Other
6 stars 0 forks source link

Build error #16

Closed mamipro-123 closed 7 months ago

mamipro-123 commented 7 months ago

Hello, I really liked the real shooter you made. When I wanted to build your code, CAN frame not received/too-stale. Check the CAN bus wiring, CAN bus utilization, and power to the device. talon fx 5 () Status Signal DutyCycle CAN frame not received/too-stale. Check the CAN bus wiring, CAN bus utilization, and power to the device. pigeon 2 20 () Status Signal Yaw CAN frame not received/too-stale. Check the CAN bus wiring, CAN bus utilization, and power to the device. pigeon 2 20 () Status Signal AngularVelocityZWorld CAN frame not received/too-stale. Check the CAN bus wiring, CAN bus utilization, and power to the device. pigeon 2 20 () Status Signal QuatW CAN frame not received/too-stale. Check the CAN bus wiring, CAN bus utilization, and power to the device. pigeon 2 20 () Status Signal QuatX CAN frame not received/too-stale. Check the CAN bus wiring, CAN bus utilization, and power to the device. pigeon 2 20 () Status Signal QuatY CAN frame not received/too-stale. Check the CAN bus wiring, CAN bus utilization, and power to the device. pigeon 2 20 () Status Signal QuatZ CAN frame not received/too-stale. Check the CAN bus wiring, CAN bus utilization, and power to the device. talon fx 1 () Status Signal DutyCycle DataLog: Log file deleted, recreating as fresh log 'wpilog_1326a3cf89b79d52.2.wpilog' DataLog: Could not open log file '/U/wpilog_1326a3cf89b79d52.2.wpilog': No such file or directory DataLog: Could not open log file '/U/wpilog_7a06bb48cf851e7d.wpilog': No such file or directory DataLog: Could not open log file '/U/wpilog_131b1e04b704e4a4.wpilog': No such file or directory DataLog: Could not open log file '/U/wpilog_934a3803ecb8498a.wpilog': No such file or directory DataLog: Could not open log file '/U/wpilog_69e8c89cdec20ed7.wpilog': No such file or directory DataLog: Could not open log file, no log being saved Warning at com.revrobotics.CANSparkMax.(CANSparkMax.java:50): CANSparkMax object created for CAN ID 2, which is not a SPARK MAX. Some functionalities may not work. at com.revrobotics.CANSparkMax.(CANSparkMax.java:50) at frc.robot.subsystems.drive.ModuleIOTBSwerve.(ModuleIOTBSwerve.java:67) at frc.robot.RobotContainer.(RobotContainer.java:74) at frc.robot.Robot.robotInit(Robot.java:93) at org.littletonrobotics.junction.LoggedRobot.startCompetition(LoggedRobot.java:79) at edu.wpi.first.wpilibj.RobotBase.runRobot(RobotBase.java:365) at edu.wpi.first.wpilibj.RobotBase.lambda$startRobot$0(RobotBase.java:433) at java.base/java.lang.Thread.run(Thread.java:833)

[CAN SPARK] IDs: 2, Parameter type mismatch for parameter id Getting Product ID parameter failed. Unable to account for device-specific behavior differences.

CAN frame not received/too-stale. Check the CAN bus wiring, CAN bus utilization, and power to the device. cancoder 21 () Status Signal Position Error at java.base/java.lang.System.arraycopy(Native Method): Unhandled exception: java.lang.ArrayStoreException: arraycopy: element type mismatch: can not cast one of the elements of java.lang.Object[] to the type of the destination array, java.lang.String at java.base/java.lang.System.arraycopy(Native Method) at java.base/java.util.Arrays.copyOf(Arrays.java:3514) at java.base/java.util.ArrayList.toArray(ArrayList.java:400) at frc.robot.subsystems.SelfCheck.SelfCheckingPhoenixMotor.faultsInArray(SelfCheckingPhoenixMotor.java:79) at frc.robot.subsystems.drive.ModuleIOTBSwerve.(ModuleIOTBSwerve.java:132) at frc.robot.RobotContainer.(RobotContainer.java:74) at frc.robot.Robot.robotInit(Robot.java:93) at org.littletonrobotics.junction.LoggedRobot.startCompetition(LoggedRobot.java:79) at edu.wpi.first.wpilibj.RobotBase.runRobot(RobotBase.java:365) at edu.wpi.first.wpilibj.RobotBase.lambda$startRobot$0(RobotBase.java:433) at java.base/java.lang.Thread.run(Thread.java:833)

Warning at edu.wpi.first.wpilibj.RobotBase.runRobot(RobotBase.java:379): The robot program quit unexpectedly. This is usually due to a code error. The above stacktrace can help determine where the error occurred. See https://wpilib.org/stacktrace for more information. Error at edu.wpi.first.wpilibj.RobotBase.runRobot(RobotBase.java:386): The startCompetition() method (or methods called by it) should have handled the exception above. [phoenix-diagnostics] Server shutdown cleanly. (dur:0)

[phoenix] Library shutdown cleanly

I'm getting errors can you help me?

MGuron commented 7 months ago

Make sure your CAN IDs are correct, the Real-Shooter branch was built for testing the shooter on a testing board and not connected to the rest of the robot. The CAN IDs used on the shooter were 1 & 2, which will clash with the drivetrain CAN IDs.

mamipro-123 commented 7 months ago

This is what I see when I simulate the default code directly after building it. I didn't change anything.

MGuron commented 7 months ago

In that case, you need to make sure you change the currentMode constant to Mode.Sim in Constants.java

mamipro-123 commented 7 months ago

Thanks for your help, your software is amazing.