-
Notifications
You must be signed in to change notification settings - Fork 277
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
Remove EachNew calls from sensor PreUpdates #1281
Conversation
Signed-off-by: Louise Poubel <[email protected]>
Signed-off-by: Louise Poubel <[email protected]>
Codecov Report
@@ Coverage Diff @@
## ign-gazebo3 #1281 +/- ##
============================================
Coverage 77.21% 77.21%
============================================
Files 227 227
Lines 13535 13575 +40
============================================
+ Hits 10451 10482 +31
- Misses 3084 3093 +9
Continue to review full report at Codecov.
|
It looks like there's a new warning in Ubuntu CI:
Should this be addressed in a separate PR? |
That's been happening since CI has migrated to Focal, it's being tracked here: gazebosim/gz-rendering#360. I mentioned in #1274 (comment) that I think an |
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.
LGTM! There are a few methods that can be renamed for clarity, which I highlighted below.
Signed-off-by: Louise Poubel <[email protected]>
This pull request has been mentioned on Gazebo Community. There might be relevant details there: https://community.gazebosim.org/t/new-ignition-releases-2022-03-01-citadel-edifice-fortress/1313/1 |
This pull request has been mentioned on Gazebo Community. There might be relevant details there: https://community.gazebosim.org/t/new-ignition-releases-2022-04-13-fortress-edifice/1367/1 |
Split from #1471 to address force-torque sensor incrementally. Partially addresses #797 Not all sensor system implementations were updated as part of #1281, one of which being the ForceTorqueSensor. This makes the reset behavior incorrect and the sensor won't be respawned. Signed-off-by: Michael Carroll <[email protected]> Signed-off-by: Louise Poubel <[email protected]> Co-authored-by: Louise Poubel <[email protected]>
🦟 Bug fix
Summary
Calling
EachNew
inPreUpdate
is unreliable because new entities may be created during another system'sPreUpdate
and then you miss it. See #797 for a detailed description of the issue.This PR tackles only non-rendering sensors. I'm using the same approach as in #1248 . This is the new flow:
SdfEntityCreator
creates the sensor entity and fills some components from SDFPreUpdate
: the firstPreUpdate
doesn't do anythingUpdate
:Physics
populates the components created bySdfEntityCreator
PostUpdate
: The sensor system does a few things:ign-sensors
objects for new sensorsPreUpdate
creates new components for the new sensors created during the previousPostUpdate
, which is onlySensorTopic
There's a slight change in behaviour, which is that a sensor won't have a
SensorTopic
component in the first iteration. This means that anyEach
call that includes that component will only be called from the 2nd iteration after the component is created. Since that component is not critical to the sensor's functioning and I've only seen it being used by the GUI, I think this is a safe change. See the consequences on the updated tests.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.🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸