WPILIB Simulation - CTRE VictorSPX & General Confusion

It’s our team’s first time using WPILIB Simulator. We are a Java team using VSCode with pretty basic drive code right now. We started up the simulator and it built successfully. We see the Robot Simulation GUI (big green window) and it appears to be working fine. Joystick buttons work, we can swap between robot states, and we can see boxes for PWM Output, etc.

We are using CTRE VictorSPX motor controllers via CAN, but have absolutely no idea where they are in this simulator GUI.

How do we see how our code is controlling the motor controllers?

General Simulator tips also welcome!

If I remember correctly, for the CTRE motor controllers to work in the simulation, you have to use WPI_VictorSPX instead of just VictorSPX. The WPI_ variants give the CTRE classes simulation functionality.

Here’s a few threads that had this same question:

1 Like