Skip to content

Initialize acoustic perception score #747

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

Merged
merged 4 commits into from
Oct 26, 2023
Merged

Conversation

caguero
Copy link
Contributor

@caguero caguero commented Oct 13, 2023

This is a bug fix for the acoustic perception task. While running phase 2, I noticed an issue with the scoring. The score should be equal to the elapsed time needed to reach the pinger. However, if the team doesn't reach the pinger, the plugin was reporting a score of 0. Keep in mind that the lower the score the better. Instead, in that case the score should equal to the total running time (e.g. 300).

How to test it?

Run this task and let it timeout while watching the score.

ros2 launch vrx_gz competition.launch.py world:=practice_2023_acoustic_perception0_task

And then:

ros2 topic echo /vrx/task/info

@caguero caguero requested review from crvogt and j-herman October 13, 2023 15:09
@caguero caguero added this to the 2.3.3 milestone Oct 13, 2023
@j-herman
Copy link
Collaborator

@caguero This doesn't seem to be working as intended. The score stays at zero when I run the acoustic perception task.
I didn't dig in too far, but it looks like SetScore isn't available until we get to the running state, and the remaining time stays at zero for the first couple of task message updates. Maybe use the timeout score?

@caguero
Copy link
Contributor Author

caguero commented Oct 16, 2023

6ac1771

Sorry, wrong code. It should work now.

Copy link
Collaborator

@j-herman j-herman left a comment

Choose a reason for hiding this comment

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

Works as described!

@caguero caguero merged commit 93f8b7d into main Oct 26, 2023
@caguero caguero deleted the caguero/acoustic_perception_fix branch October 26, 2023 13:38
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