CANBus VictorSPX Simulation in Robotpy

Hello There!

I’m currently trying to simulate our intake system via WPILIB’s simulation GUI.
The drivetrain and gyro code in pyhsics.py is not original (Can’t thank @virtuald for the #6367 github repository enough!).

The problem is that I can’t see whether the other subsystems’ motors are working or not. I can’t get “belt_upper_sim” to show up on The “other devices” section on the GUI, unlike #6367’s code.

Here’s my code:
python-qubit.zip (11.7 KB)

Thanks for taking the time to help!
-Berke from Qubit Robotics #7439

Your belt_upper_sim is a DCMotorSim, which won’t show up in ‘other devices’.

How can I monitor it’s output?

In our code, the output of the motor sim is used to control the mechanism2d objects.

If you just want to see the output value, you can either use print(belt_upper_sim.getAngularVelocity() or put it on NetworkTables.

You can use SimDevice to add your own device to the “Other Devices” panel, and then put the sim output as a value for that device.

1 Like

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