-
Notifications
You must be signed in to change notification settings - Fork 11
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
combine exploration and production phase and support markerless gameplay #120
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Light patterns need to be consistent between exploration and production steps and without overlaps
When reporting machines that do not have AR tags teams can only report a machine type and zone at first. They need to get feedback about the actual name and team color in return (if the report was correct), which then can be used to properly report the specific machine (or its mirrored counterpart in case a machine of the opposite team was encountered).
If a team wants to report a machine that does not have an AR tag, then it can only report a machine type and not its name. Therefore, the refbox needs to answer by providing the name and the team of the reported mps in case an incoming report has set the type + a zone instead of the name. This is done using MachineTypeFeedback messages. Those only contain the name + zone, if an mps of the matching type is actually in that zone and if a team did not try to report that machine type to often already. That means that for stations that only occur once (BS, SS, DS) a team can only report these types once in hope to get an answer. Reporting it again (e.g., at a different zone) leads to the report being ignored. Similarly, each team has two attempts to report RS and CS types.
1 |
This is important, as otherwise teams could "probe" whether their zone is correct by reporting just the machine type first, even if they play with tags.
TarikViehmann
force-pushed
the
tviehmann/combine-exploration
branch
from
April 7, 2022 09:49
df3be83
to
dbb5772
Compare
TarikViehmann
force-pushed
the
tviehmann/combine-exploration
branch
from
April 18, 2022 10:07
c184326
to
52dcda5
Compare
snoato
requested changes
Apr 19, 2022
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.
Thanks for the hard work integrating the changes in the refbox quickly! Only a few minor comments and suggestions.
Co-authored-by: Daniel Swoboda <swoboda@kbsg.rwth-aachen.de>
Co-authored-by: Daniel Swoboda <swoboda@kbsg.rwth-aachen.de>
snoato
approved these changes
Apr 22, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR implements the changes required for robocup-logistics/rcll-rulebook#50 and should be merged only if the rule changes are accepted.
It takes care about 2 major things:
1. Markerless Machine Reporting
If a team decides to play without AR Tags, then they need to be able to report machines based on the type, zone and rotation. This will be possible through minor changes to the MachineReport messages:
1. The name is not a required field anymore in the reported machine, instead a type might be provided.
rcll-refbox/src/msgs/MachineReport.proto
Lines 54 to 59 in bdd9069
2. The MachineReportInfo that is returned will now contain feedback about a machine name and the belonging team, if a report with a correct type + zone was received
rcll-refbox/src/msgs/MachineReport.proto
Lines 95 to 114 in bdd9069
The procedure to report a machine based on the machine type is now:
. This gives the usual points for machine reports.
Therefore, the refbox distinguishes between reports where the name is set and those, where the name is not set, but the type and the zone is set.
As before, once information about a machine name (zone, orientation) is reported, all attempts to re-report that info are ignored.
For reports only containing a machine type similar measurements are taken to prevent abuse by spamming report attempts:
rcll-refbox/src/games/rcll/exploration.clp
Lines 11 to 19 in ac99f29
rcll-refbox/src/games/rcll/exploration.clp
Lines 21 to 34 in ac99f29
To give a few example scenarios, where C-CS1 is at C_Z22 and C-CS2 is at C_Z44:
CS
inM_Z22
-> reportC-CS1
inC_Z22
-> reportCS
inC_Z44
-> reportC-CS2
inC_Z44
. This results in 2 correct zone reports (+2 for the 2 correct partial reports)CS
inM_Z55
-> wrong zone report -> reportCS
inC_Z44
-> reportC-CS2
inC_Z44
. This results in 1 correct zone report (+1), one deduction for a wrong zone report (-1), all further attempts to report the machine C-CS1 are ignored, but the team could still report the type CS once, which would lead to either of the two scenarios:CS
in a correct zone, e.g.,C_Z22
(feedback thatC-CS1
is in that zone is given, but no points are awarded and reports about C-CS1 are still ignored)CS
in a wrong zone, e.g.,C_Z23
(-1 point for a wrong zone report is given)CS
inM_Z55
-> wrong zone report -> reportCS
inC_Z66
-> wrong zone report. This results in 0 correct reports, deductions for the two wrongly reported zones (-2), all further attempts to report the machine C-CS1, C-CS2 or a machine of type CS are ignored.2. Combined Exploration + Production
A regular production phase now spans 20 minutes. If a machine is fully correctly reported, it can be used for production right away (before minute 3). Machine positions are only revealed after 3 minutes, which is also where all machines become usable for production (even if they were not or wrongly reported before).
The refbox also will switch from Setup to Production instead of Exploration now after 5 minutes of Setup.