Stage 1A Rev Solution Code#24
Conversation
| 0.546, // Distance between wheels in meters. | ||
| null); | ||
|
|
||
| private final StructPublisher<Pose2d> simPosePublisher = |
There was a problem hiding this comment.
Should this use the telemetry api? I think that makes it the most effective teaching tool
There was a problem hiding this comment.
Does the Telemetry API exist? Last I heard it was still WIP.
Either way, these are just sim internals, shouldn't be student facing. We definitely should cover actual Telemetry once that API is ready, but I'm thinking we do that at some point in Stage 1B once we really start getting into commands and stuff.
| public SparkMax intake = new SparkMax(0, 4, MotorType.kBrushless); | ||
| public SparkMax shooter = new SparkMax(0, 5, MotorType.kBrushless); |
There was a problem hiding this comment.
I would place these two underneath the drivetrain so that all of the public 'subsystem' fields are together
| private SparkMax rightFollower = new SparkMax(0, 3, MotorType.kBrushless); | ||
| public SparkMax intake = new SparkMax(0, 4, MotorType.kBrushless); | ||
| public SparkMax shooter = new SparkMax(0, 5, MotorType.kBrushless); | ||
| private OnboardIMU imu = new OnboardIMU(MountOrientation.FLAT); |
There was a problem hiding this comment.
Yeah, not planning to use the IMU in Stage 1A, but was thinking we should use it in 1B - have something like a turn-in-place auto command as an exercise.
|
You should add spotless formating |
|
You're creating the mechanism sim and publishing inline in drivetrainSim but in the custructor in flywheelSim. |
For #25
Solution for Stage 1A - going to go back and strip stuff out for the starter code once this is merged.
Note that REV SparkSim is currently bugged (wpilibsuite/SystemcoreTesting#284), so we're rolling our own sim implementation for the time being. While this sim implementation doesn't support the REV APIs, it does everything it needs to do as far as Stage 1 is concerned.