-
Notifications
You must be signed in to change notification settings - Fork 56
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
Implement substitutions using the deploy.toml #1670
base: main
Are you sure you want to change the base?
Conversation
tools/pepsi/src/deploy_config.rs
Outdated
fn assignments(&self) -> HashMap<PlayerNumber, NaoAddress> { | ||
let mut assignments: HashMap<_, _> = self | ||
.assignments | ||
.iter() | ||
.map(|assignment| (assignment.player_number, assignment.nao_address)) | ||
.collect(); | ||
|
||
for substitution in &self.substitutions { | ||
assignments.insert(substitution.player_number, substitution.nao_address); | ||
} | ||
|
||
assignments | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you had a duplicate player number in the assignments, you would no longer throw an error anymore, correct? I don't think that's what we want
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, I now reintroduced a check for duplicates in the initial assignment.
61bb4d0
to
3499176
Compare
Ok, iirc you wanted to check the correctness of assignments separately from the substitutions, right? Please ping me when finished |
Why? What?
Blocked in #1669.
This PR implements in-game substitutions using the
deploy.toml
.The substitutions specified in the
deploy.toml
are applied in order, with the final assignment determining the currently playing robots (for pregame). The postgame is applied to all NAOs listed in thedeploy.toml
to ensure that all logs are retrieved.Resolves #1660.
ToDo / Known Issues
None.
Ideas for Next Iterations (Not This PR)
None.
How to Test
Now, add a substitution to the
deploy.toml
and observe how the behavior of the pre- and postgame commands change regarding their player number assignments and NAOs to upload to/download from.