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

Acoustic comms : Packet collision timeout #1755

Merged
merged 8 commits into from
Nov 4, 2022

Conversation

adityapande-1995
Copy link
Contributor

@adityapande-1995 adityapande-1995 commented Oct 10, 2022

🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸

🎉 New feature

Summary

This PR adds a new tag <collision_time_interval> to the acoustic comms plugin. If an address endpoint receives two data packets within that time interval, the second one will be dropped. The timeout value defaults to zero, so no packets are ever dropped if the tag is unspecified.

The time must be in seconds.

Test it

Added an integration test using acoustic_comms_packet_collision.sdf. If multiple packets are sent during a 1 second time interval, they will be dropped. In the test, I send 3 packets, and only the first one of them is received.

Checklist

  • Signed all commits for DCO
  • Added tests
  • Added example and/or tutorial
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • Consider updating Python bindings (if the library has them)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by messages.

🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸

@github-actions github-actions bot added the 🌱 garden Ignition Garden label Oct 10, 2022
Signed-off-by: Aditya <[email protected]>
@codecov
Copy link

codecov bot commented Oct 10, 2022

Codecov Report

Merging #1755 (061b93b) into gz-sim7 (c4cd2c0) will increase coverage by 0.00%.
The diff coverage is 95.83%.

@@           Coverage Diff            @@
##           gz-sim7    #1755   +/-   ##
========================================
  Coverage    64.19%   64.20%           
========================================
  Files          336      336           
  Lines        26830    26853   +23     
========================================
+ Hits         17224    17241   +17     
- Misses        9606     9612    +6     
Impacted Files Coverage Δ
src/systems/acoustic_comms/AcousticComms.cc 95.12% <95.83%> (+1.90%) ⬆️
src/SimulationRunner.cc 91.32% <0.00%> (-0.95%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Contributor

@hidmic hidmic left a comment

Choose a reason for hiding this comment

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

LGTM, but I don't follow what phenomena we are trying to model here.

Copy link
Contributor

@arjo129 arjo129 left a comment

Choose a reason for hiding this comment

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

Seems reasonable to me. However, I would encourage us to actually allow users to set a "bit-rate" so that the packet collision also depends on the length of the packet. I don't believe this is too much extra work but would lead to a much more realistic
and usable model.

src/systems/acoustic_comms/AcousticComms.cc Show resolved Hide resolved
Signed-off-by: Aditya <[email protected]>
@adityapande-1995 adityapande-1995 mentioned this pull request Nov 2, 2022
38 tasks
@adityapande-1995
Copy link
Contributor Author

I'm pretty sure this is not breaking ABI, but the ABI checker is failing weirdly.

@mjcarroll
Copy link
Contributor

I'm pretty sure this is not breaking ABI, but the ABI checker is failing weirdly.

ABI checker is having some issues at the moment.

@adityapande-1995 adityapande-1995 merged commit d9bfacb into gz-sim7 Nov 4, 2022
@adityapande-1995 adityapande-1995 deleted the aditya/acoustic_comms_collision branch November 4, 2022 22:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🌱 garden Ignition Garden
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants