SingleJointedArmSim using degrees and moving very slowly

I’ve been having some issues with SingleJointedArmSim:

  • The SingleJointedArmsim, according to documentation, should use radians, but it seems to actually use degrees. This issue also seems to be new as of 2025; my older code, which didn’t have this issue, used radians successfully.
  • My SingleJointedArmSim is constructed based off of real-life values from last year’s robot, and takes upwards of 20 seconds to move 45 degrees, even when I bypass my SparkSim and give it 12 volts directly. The real arm took probably under 1 second to do so, and reca.lc agrees that it shouldn’t take 20 seconds, but rather .4 seconds.

My code is at FRC2429_2025/test_robots/sparksim_test at main · aesatchien/FRC2429_2025 · GitHub

SingleJointedArmSim was using radians all along, I just forgot that I had to turn its outputs into degrees before putting said outputs into the mechanism2d. Which makes me wonder why the mechanism2d uses degrees unlike the rest of wpilib.

1 Like