-
Notifications
You must be signed in to change notification settings - Fork 59
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
Add HasConnections function #222
Conversation
Signed-off-by: Ian Chen <[email protected]>
Codecov Report
@@ Coverage Diff @@
## ign-sensors6 #222 +/- ##
=============================================
Coverage 80.00% 80.00%
=============================================
Files 1 1
Lines 15 15
=============================================
Hits 12 12
Misses 3 3 Continue to review full report at Codecov.
|
Signed-off-by: Ian Chen <[email protected]>
Signed-off-by: Ian Chen <[email protected]>
Signed-off-by: Ian Chen <[email protected]>
Signed-off-by: Ian Chen <[email protected]>
Signed-off-by: Ian Chen <[email protected]>
Signed-off-by: Ian Chen <[email protected]>
Signed-off-by: Ian Chen <[email protected]>
Signed-off-by: Ian Chen <[email protected]>
Signed-off-by: Ian Chen [email protected]
🎉 New feature
Summary
Add
HasConnection
function to all sensors. The main motivation is to so that users of sensors can check to see if there are any subscribers / connections to the sensor data. If none, they can avoid doing any unnecessary computation, see gazebosim/gz-sim#1480Each sensor has its own publishers and events so each needs different implementation. Note that I had to change the
GpuLidarSensor
class' event callback implementation slightly so that I can keep track of the event connection count. The changes also make it more consistent with other rendering sensors event callbacks.Test it
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.