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

Fix performance issue with contact data and AABB updates #1048

Merged
merged 1 commit into from
Sep 24, 2021

Conversation

azeey
Copy link
Contributor

@azeey azeey commented Sep 24, 2021

🦟 Bug fix

Fixes #997

Summary

ComponentState::OneTimeChange was used when updating the AxisAlignedBox and ContactSensorData components which causes a full state serialization (all components serialized and sent over to state subscribers). In Fortress, we have some components that are expensive to serialize/deserialize, such as components::ModelSdf. However, we thought it was okay thinking they would be sent to the client once at the start of simulation. But with ComponentState::OneTimeChange, these components are serialized/deserialized repeatedly which causes a severe performance hit. Using ComponentState::PeriodicChange instead makes it so that only the changed components are sent.

Checklist

  • Signed all commits for DCO
  • Added tests
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • 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

`ComponentState::OneTimeChange` was used when updating the
`AxisAlignedBox` and `ContactSensorData` components which causes all
components to be serialized and sent over to state subscribers.

Signed-off-by: Addisu Z. Taddese <[email protected]>
@azeey azeey self-assigned this Sep 24, 2021
@github-actions github-actions bot added the 🔮 dome Ignition Dome label Sep 24, 2021
@azeey azeey linked an issue Sep 24, 2021 that may be closed by this pull request
Copy link
Contributor

@chapulina chapulina left a comment

Choose a reason for hiding this comment

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

sweet!

@chapulina chapulina added the performance Runtime performance label Sep 24, 2021
@chapulina chapulina merged commit 3fbddd1 into gazebosim:ign-gazebo4 Sep 24, 2021
@azeey azeey deleted the fix_contact_updates branch September 24, 2021 21:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔮 dome Ignition Dome performance Runtime performance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

While using contact sensor, the simulation stuck when contact happens
3 participants