Skip to content

Stage 1A Rev Solution Code#24

Open
DylanB5402 wants to merge 8 commits into
frcsoftware:mainfrom
DylanB5402:stage1a-rev-starter
Open

Stage 1A Rev Solution Code#24
DylanB5402 wants to merge 8 commits into
frcsoftware:mainfrom
DylanB5402:stage1a-rev-starter

Conversation

@DylanB5402

@DylanB5402 DylanB5402 commented Jun 6, 2026

Copy link
Copy Markdown
Collaborator

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.

@DylanB5402 DylanB5402 changed the title Stage1a rev starter Stage 1A Rev Jun 6, 2026
Comment thread stage1/rev/solution/src/main/java/first/robot/Robot.java Outdated
Comment thread stage1/rev/solution/src/main/java/first/robot/opmode/MyAuto.java Outdated
@DylanB5402 DylanB5402 changed the title Stage 1A Rev Stage 1A Rev Solution Code Jun 7, 2026
@DylanB5402 DylanB5402 marked this pull request as ready for review June 14, 2026 20:04
0.546, // Distance between wheels in meters.
null);

private final StructPublisher<Pose2d> simPosePublisher =

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this use the telemetry api? I think that makes it the most effective teaching tool

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +28 to +29
public SparkMax intake = new SparkMax(0, 4, MotorType.kBrushless);
public SparkMax shooter = new SparkMax(0, 5, MotorType.kBrushless);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

imu looks to be unused here?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@Spaceman113138

Copy link
Copy Markdown

You should add spotless formating

@Spaceman113138

Copy link
Copy Markdown

You're creating the mechanism sim and publishing inline in drivetrainSim but in the custructor in flywheelSim.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants