Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autonomous #22

Merged
merged 8 commits into from
Mar 22, 2022
Merged

Autonomous #22

merged 8 commits into from
Mar 22, 2022

Conversation

ky28059
Copy link
Member

@ky28059 ky28059 commented Feb 18, 2022

Tasks to do before merge:

@ky28059 ky28059 self-assigned this Feb 20, 2022
This introduces some semi-sketchy callback logic to InternalSubsystem to implement a "WaitUntilShotFired" command. Perhaps we should think of a better way to do this.
@ky28059 ky28059 mentioned this pull request Feb 25, 2022
}

@Override
public boolean isFinished() {
boolean doneShooting = shotRequested && !internals.shotRequested();
this.finished = finished || doneShooting; // in case someone ever queues a new shot before successive isFinished calls (???)
Copy link
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 realistic for a driver to request a new shot in the 20ms periodic window between the first tick after the old shot is fired and the tick immediately following it. Also, drivers won't be able to request shots in autonomous (which is when this command would be used) and there's no way for two calls to this command in a SequentialCommandGroup to trigger this because the first command's isFinished() needs to return true before the second command's initialize() runs.

For isFinished(), we may not have to store shotRequested either; if initialize() always runs before the first call to isFinished(), isFinished() can be implemented like

@Override
public boolean isFinished() {
    return !internals.shotRequested();
}

Copy link
Contributor

Choose a reason for hiding this comment

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

ok, does it hurt?

Copy link
Member Author

Choose a reason for hiding this comment

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

I guess not? But it's an impossible scenario anyways and it adds another field variable

@ky28059
Copy link
Member Author

ky28059 commented Mar 10, 2022

We'll need to think about how team color plays into the auton sequences. Do we just write 6 command groups or should we try to dynamically set which balls we're pathfinding to in the code? Will start positions change?

@e3l
Copy link
Contributor

e3l commented Mar 10, 2022

We'll need to think about how team color plays into the auton sequences. Do we just write 6 command groups or should we try to dynamically set which balls we're pathfinding to in the code? Will start positions change?

I think it makes sense to have 6 command groups, because we'll be starting in different positions. It seems easiest to me to return a different commandgroup based on some state variable that can be adjusted from shuffleboard

@ky28059 ky28059 changed the base branch from develop to shooter-testing March 22, 2022 00:38
@ky28059 ky28059 marked this pull request as ready for review March 22, 2022 00:40
@ky28059 ky28059 merged commit 4e78c13 into shooter-testing Mar 22, 2022
@ky28059 ky28059 deleted the auton branch March 22, 2022 00:40
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.

2 participants