Simulating Spark Maxes over CAN?

Hey all, I can’t seem to get my Spark Maxes to initialize in the simulation (the halsim_gui.dll simulation built into WPILib). I have this running regardless of if Robot.isReal() == true: rightFront = new CANSparkMax(Constants.CANRightFrontMasterController, MotorType.kBrushless); rightFollower = new CANSparkMax(Constants.CANRightFrontFollowerController, MotorType.kBrushless); leftFront = new CANSparkMax(Constants.CANLeftFrontMasterController, MotorType.kBrushless); leftFollower = new CANSparkMax(Constants.CANLeftFrontFollowerController, MotorType.kBrushless); rightEncoder = new CANEncoder(rightFront); leftEncoder = new CANEncoder(leftFront);
But that doesn’t get the encoders or the Spark Maxes to appear on the HalSim GUI. Are Spark Maxes not supported by this? Thanks!

Currently, SparkMax’s do not support the GUI. You can create a wrapper class using the SimDevice class to build support for this if you want it now. You can look at the ADXRS530_Gyro class in allwpilib for an example how to use the sim support classes.

SnobotSim has that support.

https://www.chiefdelphi.com/t/snobotsim-2020/372251/2

Great! Thank you!

I must be thick but can’t seem to find ADXRS530_gyro in ALLWPILIB ???

ADXRS450_Gyro

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