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

Send back score of a duplicate report #572

Merged
merged 3 commits into from
Aug 25, 2020
Merged

Send back score of a duplicate report #572

merged 3 commits into from
Aug 25, 2020

Conversation

nkoenig
Copy link
Contributor

@nkoenig nkoenig commented Aug 24, 2020

This will resolved issue #548.

A duplicate artifact report ACK will now contain score_change = 1 if the original artifact report scored a point, or `score_change = 0' if the original report did not score.

Signed-off-by: Nate Koenig nate@openrobotics.org

Signed-off-by: Nate Koenig <nate@openrobotics.org>
@@ -1317,12 +1317,9 @@ double GameLogicPluginPrivate::ScoreArtifact(const ArtifactType &_type,
this->LogEvent(stream.str());

this->duplicateReportCount++;
return 0.0;
return uniqueReport->second;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the score change also gets added to the total score here so a duplicate report will end up scoring a point. I think that's not intended? Here's output from a quick test of reporting the same artifact twice which shows a total score of 2 instead of 1:

[Msg] SimTime[10 568000000] OnNewArtifact Msg=type: 5
pose {
  position {
    x: 191.80000000009215
    y: 20.00000000000043
    z: -15.069500004108624
  }
}

[Msg]   [Total]: 1
[Msg] Total score: 1
[Dbg] [VisibilityRfModel.cc:80] Range: 12.3695, Exp: 2.5, TX: 20, RX: -47.3088
[Dbg] [VisibilityRfModel.cc:80] Range: 12.3695, Exp: 2.5, TX: 20, RX: -47.3088
[Msg] SimTime[10 861000000] OnNewArtifact Msg=type: 5
pose {
  position {
    x: 191.80000000009215
    y: 20.00000000000043
    z: -15.069500004108624
  }
}

[Msg] This report has been received before
[Msg] Total score: 2

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 24b37a1

Signed-off-by: Nate Koenig <nate@openrobotics.org>
Copy link
Contributor

@iche033 iche033 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there are some conflicts with the base branch, otherwise changes look good

Signed-off-by: Nate Koenig <nate@openrobotics.org>
@nkoenig nkoenig merged commit 08c5241 into master Aug 25, 2020
@nkoenig nkoenig deleted the ack_duplicate_score branch December 10, 2020 22:31
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.

2 participants