-
Warning at swervelib.motors.SparkMaxSwerve.setAbsoluteEncoder(SparkMaxSwerve.java:156): IF possible configure the duty cycle encoder offset in the REV Hardware Client instead of using the absoluteEncoderOffset in the Swerve Module JSON!
-
Unhandled exception: java.lang.RuntimeException: No Conversion Factor configured! Please create SwerveDrive using
SwerveParser.createSwerveDrive(driveFeedforward, maxSpeed, angleMotorConversionFactor, driveMotorConversion)
OR
SwerveParser.createSwerveDrive(maxSpeed, angleMotorConversionFactor, driveMotorConversion)
OR
Set the conversion factor in physicalproperties.json OR the module JSON file.REMEMBER: You can calculate the conversion factors using SwerveMath.calculateMetersPerRotation AND SwerveMath.calculateDegreesPerSteeringRotation -
Error at swervelib.parser.json.ModuleJson.createModuleConfiguration(ModuleJson.java:73): Unhandled exception: java.lang.RuntimeException: No Conversion Factor configured! Please create SwerveDrive using
-
SwerveParser.createSwerveDrive(driveFeedforward, maxSpeed, angleMotorConversionFactor, driveMotorConversion)
-
The robot program quit unexpectedly. This is usually due to a code error.
The above stacktrace can help determine where the error occurred.
See Reading Stacktraces — FIRST Robotics Competition documentation for more information. -
OR
-
SwerveParser.createSwerveDrive(maxSpeed, angleMotorConversionFactor, driveMotorConversion)
-
OR
-
The startCompetition() method (or methods called by it) should have handled the exception above.
-
Set the conversion factor in physicalproperties.json OR the module JSON file.REMEMBER: You can calculate the conversion factors using SwerveMath.calculateMetersPerRotation AND SwerveMath.calculateDegreesPerSteeringRotation
-
at swervelib.parser.json.ModuleJson.createModuleConfiguration(ModuleJson.java:73)
-
at swervelib.parser.SwerveParser.createSwerveDrive(SwerveParser.java:189)
-
at swervelib.parser.SwerveParser.createSwerveDrive(SwerveParser.java:115)
-
at frc.robot.subsystems.swervedrive.SwerveSubsystem.(SwerveSubsystem.java:71)
-
at frc.robot.RobotContainer.(RobotContainer.java:30)
-
at frc.robot.Robot.robotInit(Robot.java:49)
-
at edu.wpi.first.wpilibj.TimedRobot.startCompetition(TimedRobot.java:107)
-
at edu.wpi.first.wpilibj.RobotBase.runRobot(RobotBase.java:365)
-
at edu.wpi.first.wpilibj.RobotBase.startRobot(RobotBase.java:453)
-
at frc.robot.Main.main(Main.java:27)
-
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 Reading Stacktraces — FIRST Robotics Competition documentation 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.
I mean… Have you done this part yet as it’s recommending? It seems to me you’ve put your offsets in the wrong location and it doesn’t like it
Hello! Welcome to the wonderful world of software development!
Unfortunately, symptoms like stack traces rarely have a single root cause. If someone guesses root cause correctly, it’s likely because they have seen similar things before. However, it’s still just a guess.
Your post contains the directions for starting out your investigation:
Can you describe what investigation you’ve done so far? What have you tried? What are you not sure about?
1 Like
Nevermind, just did not calculate the conversion factor correctly and did not implement the code properly.
2 Likes