-
Notifications
You must be signed in to change notification settings - Fork 269
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 component updates #1580
Fix component updates #1580
Conversation
Signed-off-by: Jenn Nguyen <[email protected]>
Signed-off-by: Louise Poubel <[email protected]>
Signed-off-by: Jenn Nguyen <[email protected]>
Signed-off-by: Jenn Nguyen <[email protected]>
Signed-off-by: Jenn Nguyen <[email protected]>
Signed-off-by: Jenn Nguyen <[email protected]>
Codecov Report
@@ Coverage Diff @@
## ign-gazebo6 #1580 +/- ##
===============================================
+ Coverage 64.02% 64.14% +0.12%
===============================================
Files 317 317
Lines 25649 25667 +18
===============================================
+ Hits 16422 16465 +43
+ Misses 9227 9202 -25
Continue to review full report at Codecov.
|
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.
I can confirm that this is working like a charm! Thank you!
I had a minor comment about the error message
Signed-off-by: Jenn Nguyen <[email protected]>
🦟 Bug fix
Fixes #1022
Summary
To speed up performance, removed components were cached/stored here:
gz-sim/include/ignition/gazebo/detail/View.hh
Lines 140 to 149 in 1f6c126
Then when the same component was re-added:
gz-sim/src/EntityComponentManager.cc
Lines 1088 to 1089 in 1f6c126
The component data was moved from
invalidData
tovalidData
but the data was never updated.The fix is to check that component needs updated in the
EntityComponentManager::SetState
functions then retrieve the component and deserialize the data again (to update the re-added component).To run unit tests:
./path/to/build/UNIT_EntityComponentManager_TEST --gtest_filter="*AddRemoveAddComponents*"
To test through the GUI:
Before PR
After PR
Thanks @chapulina for the help!
Checklist
codecheck
passed (See contributing)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.