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

CommandRobot discussion #6624

Open
spacey-sooty opened this issue May 14, 2024 · 1 comment
Open

CommandRobot discussion #6624

spacey-sooty opened this issue May 14, 2024 · 1 comment

Comments

@spacey-sooty
Copy link
Contributor

There has been some discussion about how a CommandRobot might be implemented and why. It seems to be a generally positive change to move away from RobotContainer and TimedRobot to a single unified class with clarity about its purpose. From the discussions that I've seen there are still some questions to be answered:

  1. Should it extend IterativeRobotBase or TimedRobot?
  2. How much of IterativeRobotBase should it exposed? (eg. making RobotPeriodic or TeleopPeriodic final)
  3. How much of the RobotContainer structure should be maintained? (eg. still have a configure bindings function?)
@UserC2
Copy link

UserC2 commented May 18, 2024

From how my team (2609) uses RobotContainer and TimedRobot, I think:

  1. TimedRobot, because TimedRobot adds a few methods necessary for a Command-Based robot (e.g. startCompetition()), although these could be moved into IterativeRobotBase.
  2. robotPeriodic() and teleopPeriodic() could be marked final to force teams to use commands (and use addPeriodic() for any functions that should run repeatedly)
  3. RobotContainer has getAutonomousCommand() and configureBindings(), which could both be eliminated as they are called once and never used again: getAutonomousCommand() is called once in autonomousInit(), and configureBindings() is called in the constructor. If teams had a long list of bindings to configure or a long method of choosing their autonomous mode, they could create their own function (no need to require teams to use one).

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

No branches or pull requests

2 participants