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

Multiple Robot Support #24

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open

Multiple Robot Support #24

wants to merge 9 commits into from

Conversation

blaze-developer
Copy link
Contributor

@blaze-developer blaze-developer commented Oct 16, 2024

Organizes the RobotContainer and Subsystem initialization into different runtime environments, to allow for different IO implementations for different robots, and using different drivebase constants for different robots.

This also organizes Constants.java by making the robot automatically select between different states.

This will work as follows:

  • If the code is running on a real robot, run code for a real robot based on the specified robot in constants. If it is set to simulation bot on a real robot, the code will exit due to invalid configuration.

  • If the code is running on a laptop / a simulation, it will run code based on the specified robot, if the robot is specified as the comp or practice bot, it will assume that you are running a log replay. If it is specified as a simbot, it will run as a simulation, (aka run real robot code but with simulated hardware layers).

@blaze-developer
Copy link
Contributor Author

This also changes where the IO implementation is instantiated, instead of being created inside the TunerConstants, they are created inside the RobotContainer, depending on the robot it's running on. This requires very small changes to the TunerConstants. (Deleting 2 lines and changing private to public 5 times)

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.

1 participant