YAGSL 2024 Swerve Example Code startCompetition() method error

Hi my team and i trying to set the yagsl swerve code. We use yagsl exapmple code and just change the deploy json file for configuration. Build is succesfull but on drive station we have some errors and it says “No Robot Code” and this error. I cannot figure it out where is the problem. i need some help.

********** Robot program starting ********** 
 NT: Listening on NT3 port 1735, NT4 port 5810 
 “conversionFactors”: { 
 “angle”: {“factor”: 28.125 }, 
 “drive”: {“factor”: 0.047286787200699704 } 
 } 
ERROR  1  Unhandled exception: com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize value of type double from Object value (token JsonToken.START_OBJECT)
at [Source: (File); line: 3, column: 14] (through reference chain: swervelib.parser.json.PhysicalPropertiesJson[“conversionFactor”]->swervelib.parser.json.MotorConfigDouble[“drive”])  com.fasterxml.jackson.databind.exc.MismatchedInputException.from(MismatchedInputException.java:59) 
 Error at com.fasterxml.jackson.databind.exc.MismatchedInputException.from(MismatchedInputException.java:59): Unhandled exception: com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize value of type double from Object value (token JsonToken.START_OBJECT) 
 at [Source: (File); line: 3, column: 14] (through reference chain: swervelib.parser.json.PhysicalPropertiesJson[“conversionFactor”]->swervelib.parser.json.MotorConfigDouble[“drive”]) 
 at com.fasterxml.jackson.databind.exc.MismatchedInputException.from(MismatchedInputException.java:59) 
 at com.fasterxml.jackson.databind.DeserializationContext.reportInputMismatch(DeserializationContext.java:1752) 
 at com.fasterxml.jackson.databind.DeserializationContext.handleUnexpectedToken(DeserializationContext.java:1526) 
 at com.fasterxml.jackson.databind.DeserializationContext.handleUnexpectedToken(DeserializationContext.java:1431) 
Warning  1  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.  edu.wpi.first.wpilibj.RobotBase.runRobot(RobotBase.java:379) 
 at com.fasterxml.jackson.databind.DeserializationContext.extractScalarFromObject(DeserializationContext.java:943) 
 at com.fasterxml.jackson.databind.deser.std.StdDeserializer._parseDoublePrimitive(StdDeserializer.java:1139) 
ERROR  1  The startCompetition() method (or methods called by it) should have handled the exception above.  edu.wpi.first.wpilibj.RobotBase.runRobot(RobotBase.java:386) 
 at com.fasterxml.jackson.databind.deser.std.NumberDeserializers$DoubleDeserializer.deserialize(NumberDeserializers.java:682) 
 at com.fasterxml.jackson.databind.deser.std.NumberDeserializers$DoubleDeserializer.deserialize(NumberDeserializers.java:663) 
 at com.fasterxml.jackson.databind.deser.impl.FieldProperty.deserializeAndSet(FieldProperty.java:138) 
 at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:314) 
 at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:177) 
 at com.fasterxml.jackson.databind.deser.impl.FieldProperty.deserializeAndSet(FieldProperty.java:138) 
 at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:314) 
 at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:177) 
 at com.fasterxml.jackson.databind.deser.DefaultDeserializationContext.readRootValue(DefaultDeserializationContext.java:323) 
 at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4825) 
 at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3637) 
 at swervelib.parser.SwerveParser.(SwerveParser.java:55) 
 at frc.robot.subsystems.swervedrive.SwerveSubsystem.(SwerveSubsystem.java:90) 
 at frc.robot.RobotContainer.(RobotContainer.java:33) 
 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.

at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:177) 
 at com.fasterxml.jackson.databind.deser.DefaultDeserializationContext.readRootValue(DefaultDeserializationContext.java:323) 
 at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4825) 
 at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3637) 
 at swervelib.parser.SwerveParser.(SwerveParser.java:55) 
 at frc.robot.subsystems.swervedrive.SwerveSubsystem.(SwerveSubsystem.java:90) 
 at frc.robot.RobotContainer.(RobotContainer.java:33) 
 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) 
 
ERROR  1  The startCompetition() method (or methods called by it) should have handled the exception above.  edu.wpi.first.wpilibj.RobotBase.runRobot(RobotBase.java:386) 
 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. 
 ********** Robot program starting ********** 
 NT: Listening on NT3 port 1735, NT4 port 5810 
 “conversionFactors”: { 
 “angle”: {“factor”: 28.125 }, 
 “drive”: {“factor”: 0.047286787200699704 } 
 } 
ERROR  1  Unhandled exception: com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize value of type double from Object value (token JsonToken.START_OBJECT)
at [Source: (File); line: 3, column: 14] (through reference chain: swervelib.parser.json.PhysicalPropertiesJson[“conversionFactor”]->swervelib.parser.json.MotorConfigDouble[“drive”])  com.fasterxml.jackson.databind.exc.MismatchedInputException.from(MismatchedInputException.java:59) 
 Error at com.fasterxml.jackson.databind.exc.MismatchedInputException.from(MismatchedInputException.java:59): Unhandled exception: com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize value of type double from Object value (token JsonToken.START_OBJECT) 
 at [Source: (File); line: 3, column: 14] (through reference chain: swervelib.parser.json.PhysicalPropertiesJson[“conversionFactor”]->swervelib.parser.json.MotorConfigDouble[“drive”]) 
Warning  1  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.  edu.wpi.first.wpilibj.RobotBase.runRobot(RobotBase.java:379) 
 at com.fasterxml.jackson.databind.exc.MismatchedInputException.from(MismatchedInputException.java:59) 
 at com.fasterxml.jackson.databind.DeserializationContext.reportInputMismatch(DeserializationContext.java:1752) 
 at com.fasterxml.jackson.databind.DeserializationContext.handleUnexpectedToken(DeserializationContext.java:1526) 
ERROR  1  The startCompetition() method (or methods called by it) should have handled the exception above.  edu.wpi.first.wpilibj.RobotBase.runRobot(RobotBase.java:386) 
 at com.fasterxml.jackson.databind.DeserializationContext.handleUnexpectedToken(DeserializationContext.java:1431) 
 at com.fasterxml.jackson.databind.DeserializationContext.extractScalarFromObject(DeserializationContext.java:943) 
 at com.fasterxml.jackson.databind.deser.std.StdDeserializer._parseDoublePrimitive(StdDeserializer.java:1139) 
 at com.fasterxml.jackson.databind.deser.std.NumberDeserializers$DoubleDeserializer.deserialize(NumberDeserializers.java:682) 
 at com.fasterxml.jackson.databind.deser.std.NumberDeserializers$DoubleDeserializer.deserialize(NumberDeserializers.java:663) 
 at com.fasterxml.jackson.databind.deser.impl.FieldProperty.deserializeAndSet(FieldProperty.java:138) 
 at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:314) 
 at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:177) 
 at com.fasterxml.jackson.databind.deser.impl.FieldProperty.deserializeAndSet(FieldProperty.java:138) 
 at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:314) 
 at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:177) 
 at com.fasterxml.jackson.databind.deser.DefaultDeserializationContext.readRootValue(DefaultDeserializationContext.java:323) 
 at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4825) 
 at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3637) 
 at swervelib.parser.SwerveParser.(SwerveParser.java:55) 
 at frc.robot.subsystems.swervedrive.SwerveSubsystem.(SwerveSubsystem.java:90) 
 at frc.robot.RobotContainer.(RobotContainer.java:33) 
 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.

The error is right at the top. Its failing to parse the JSON file.

I don’t remember the exact limits offhand, but my guess is its having issues parsing the decimal value for your drive factor due to too many digits.

i change just the deploy files and I think I changed the values ​​in accordance with the document. I posted the deploy folder on github in case you want to check it out. GitHub - FRC9232/yagsl-deploy

Yep i got the problem there was a missing " { " :slight_smile:

1 Like