Motors Not visible In Simulation

Hey, we recently bought a swerve drive in the offseason and we are trying to program it. When we went to simulate our path, it shows the translational errors of the autonomous, however it does not display the devices in the sim nor the theoretical voltage applied to each device. This was something we were able to see on our 6 wheel drivetrain when we were simulating code through the offseason. Does anyone know the reason? Here is our github repo

I haven’t figured out why the devices aren’t being created in your offseason code, but even in your main code from the season your simulation does not seem to function at all in terms of actual drive base simulation.

It’s odd the devices are being created and you can query their device ID and they do report the correct CAN ID so I’m not seeing any reason they shouldn’t appear.

It’s because you’re using the TalonFX and CANCoder classes. Switch to the wrapper classes WPI_TalonFX and WPI_CANCoder and they will appear. Though I don’t see you setting sim inputs anywhere, look into the SimCollection classes before you expect to see anything change.

1 Like

It’s because we have not pushed the latest update from the laptop that we mainly use

1 Like

Okay thanks!

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