Skip to content

Stage 1A Rev Solution Code#24

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

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

Conversation

@DylanB5402

@DylanB5402 DylanB5402 commented Jun 6, 2026

Copy link
Copy Markdown
Member

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
Comment thread stage1/rev/solution/src/main/java/first/robot/simulation/DrivetrainSim.java Outdated
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

Comment thread stage1/rev/solution/src/main/java/first/robot/Robot.java
@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.

@DylanB5402 DylanB5402 requested a review from ArchdukeTim June 18, 2026 01:29
Comment thread stage1/rev/solution/simgui-ds.json
Adrianamm
Adrianamm previously approved these changes Jun 19, 2026
@DylanB5402

DylanB5402 commented Jun 19, 2026

Copy link
Copy Markdown
Member Author

Rename subsystems: IntakeLauncher and Feeder

context: https://discord.com/channels/1516145538297368707/1516151527126073434/1517358128814100641

@DylanB5402

Copy link
Copy Markdown
Member Author

Updated the controls to more closely match the real kitbot. Note that the kitbot has some logic for spinning up the shooter. For simplicity's sake, I've chosen to omit that from here, though we could actually implement it in Stage 1B for the command based kitbot

@DylanB5402 DylanB5402 requested a review from Adrianamm June 20, 2026 20:04
@Override
public void periodic() {
if (timer.hasElapsed(4)) {
robot.drivetrain.arcadeDrive(0.0, 0.0); // Stop the robot after 4 seconds

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Should there also be something to tell the robot to shoot?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I don't think it's worth it, I think implementing any sort of sequential behavior is the point at which you go to use commands, which takes us into stage 1B

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

It could provide an example of where commands are useful. Contrasting the if statements with a command sequence.

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.

5 participants