FRC Drivetrain Characterization - Spark MAX Followers

Hello CD!

We seem to be running into issues using the new characterization tool on our test bed chassis. The setup consists of 4 Spark MAX’s with associated NEOs, two per side with one specified as follower.

Left - CAN ID 3 follows 2
Right - CAN ID 5 follows 4.

When deploying the following setup, the follower’s are not moving. The signal is being sent to the leader’s correctly.

When defining both sets of motors individually (not set to follow), motor group 0 continuously gives the correct signal. However, motor group 1 (normally the followers) will periodically pause and give a stop signal (green blink to blue solid) every half second or so.

(Can’t post two images)
Motor Pair 0:
L - 2 - Not Inverted
R - 4 - Inverted

Motor Pair 1:
L - 3 - Not Inverted
R - 5 - Inverted

In 2020 we were able to set the follower state and define the controllers manually in the generated java project, however now that’s not the case. Has anyone seen similar behavior to this? Any tips or guidance is appreciated.

At least your picture isn’t correctly setup. You only have two motors. Also, I think you’ll use the internal encoders which isn’t the roboRIO quadrature, unless you are doing a separate encoder.

Here is my config for a Spark Max drivetrain: https://github.com/frc1108/Ackbar2022/blob/trunk/sysid/ackbarDrive.json

My CAN IDs are:

1 Left Main
2 Right Main
3 Left Follow
4 Right Follow

And the Right side is inverted.

So you can download the above json and load it to see and then just change it to match your CAN ID and encoders (if external).

edit: I think looking you must have an encoder (like the rev throughbore) 1:1 on the output shaft connected to the RoboRIO, which is okay. I didn’t go to that extent.

Could you send your config file?

I’m unable to link it to a post, but here is the json inside the config file for the first example:

    {
  "counts per rotation": 8192.0,
  "encoder type": "roboRIO quadrature",
  "encoding": true,
  "gearing denominator": 1.0,
  "gearing numerator": 1.0,
  "gyro": "NavX",
  "gyro ctor": "SerialPort.kMXP",
  "is drivetrain": true,
  "motor controllers": [
    "SPARK MAX (Brushless)"
  ],
  "number of samples per average": 5,
  "primary encoder inverted": false,
  "primary encoder ports": [
    0,
    1
  ],
  "primary motor ports": [
    2
  ],
  "primary motors inverted": [
    false
  ],
  "secondary encoder inverted": true,
  "secondary encoder ports": [
    2,
    3
  ],
  "secondary motor ports": [
    4
  ],
  "secondary motors inverted": [
    true
  ],
  "velocity measurement period": 100
}

Second example:

    {
  "counts per rotation": 8192.0,
  "encoder type": "roboRIO quadrature",
  "encoding": true,
  "gearing denominator": 1.0,
  "gearing numerator": 1.0,
  "gyro": "NavX",
  "gyro ctor": "SerialPort.kMXP",
  "is drivetrain": true,
  "motor controllers": [
    "SPARK MAX (Brushless)",
    "SPARK MAX (Brushless)"
  ],
  "number of samples per average": 5,
  "primary encoder inverted": false,
  "primary encoder ports": [
    0,
    1
  ],
  "primary motor ports": [
    2,
    3
  ],
  "primary motors inverted": [
    false,
    false
  ],
  "secondary encoder inverted": true,
  "secondary encoder ports": [
    2,
    3
  ],
  "secondary motor ports": [
    4,
    5
  ],
  "secondary motors inverted": [
    true,
    true
  ],
  "velocity measurement period": 100
}

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.