First question when you say sparkmax encoders do you mean an encoder plugged into the sparkmax or the internal neo encoders? You’ll need external absolute encoders to avoid having to manually set your wheels before every match. I’ve only worked with exclusively ctre drivetrains, but this problem is often 1 or a combination of several things.
Check that your magnets are glued into the modules correctly so they aren’t spinning.
Check and double each modules can IDs are correct. Ctre has a function in their desktop software to blink the motors for a given motor which helps verify this. I believe rev has something similar.
Verify you put the can IDs into code in the expected order. Not exactly sure what yagsl expects but others often use front left front right back left back right.
Check you’re following any instructions for orienting your imu relative to the modules. It’s not enough for the wheels to all be pointed in the same direction, they need to be pointed in the correct direction relative to the imu.
Your front right json contents shown below. The id is the SparkMax or Cancoder Can-bus address. The
‘canbus” should be blank.
Make sure you can flash each device using Rev Hardware Manager.
{
“location”: {
“front”: -11.75,
“left”: 11.75
},
“absoluteEncoderOffset”: 0,
“drive”: {
“type”: “sparkmax”,
“id”: 113,
“canbus”: 13
},
“angle”: {
“type”: “sparkmax”,
“id”: 116,
“canbus”: 16
},
“encoder”: {
“type”: “cancoder”,
“id”: 1,
“canbus”: 21
},
“inverted”: {
“drive”: false,
“angle”: false
},
“absoluteEncoderInverted”: false
}
you just solidified my choice on not releasing 2025 until i get a proper JSON schema.
The id field is THE CAN ID! The canbus field is THE NAME OF A CANIVORE! The canbus field is a string. The following would be your config assuming the id field is your CAN ID!
{
“location”: {
“front”: -11.75,
“left”: 11.75
},
“absoluteEncoderOffset”: 0, // I break things here for a reason. Please watch the videos and read the documentation at https://docs.yagsl.com
“drive”: {
“type”: “sparkmax”,
“id”: 113,
“canbus”: null
},
“angle”: {
“type”: “sparkmax”,
“id”: 116,
“canbus”: null
},
“encoder”: {
“type”: “cancoder”,
“id”: 1,
“canbus”: null
},
“inverted”: {
“drive”: false,
“angle”: false
},
“absoluteEncoderInverted”: false
}
Your front right json contents shown below. The id is the SparkMax or Cancoder Can-bus address. The
‘canbus” should be blank.
Make sure you can flash each device using Rev Hardware Manager.
Thanks so much! This seems like it solved out issues. Our programmers are new this year so we truly appreciate the help.