-
Notifications
You must be signed in to change notification settings - Fork 65
Add AdvantageKit auto chooser #1349
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
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: Tyler Veness <[email protected]>
919e48c to
169330b
Compare
|
My take on a LoggedAutoChooser: https://gist.github.com/DJ-Laser/e0c11d7b835489ff63e6e4d2f72e089f |
Your implementation does seem correct, but isn't alliance info automatically replayed as well? If no alliance info is given, the auto should default to a null-op. |
|
In a real robot, starting an auto without alliance info would be a no-op, but in simulation, it forces the command to generate, which would cause a difference in behavior in replay. // AutoChooser.class line 213
public Command selectedCommand() {
if (RobotBase.isSimulation() && nameAtGeneration == DO_NOTHING_NAME) {
select(selected, true);
}
return generatedCommand;
}I don't think calling select() an issue since that's what happens when it is set via networktables anyway? |
This was always a thing that we should have added to the docs, so here it is.
Also, I fixed a couple of small things related to the AutoChooser too.