Skip to content

Add function for enabling / disabling a sensor #204

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

Merged
merged 2 commits into from
Mar 11, 2022
Merged

Conversation

iche033
Copy link
Contributor

@iche033 iche033 commented Mar 10, 2022

Signed-off-by: Ian Chen ichen@osrfoundation.org

🎉 New feature

Summary

Added SetActive and IsActive function for enabling and disabling a sensor.

The sensor is active by default. A disabled / non-active sensor will not generate or publish data when the Update function is called. It will however update if the force argument is true, similar to the behavior in gazebo-classic.

Test it

Run the INTEGRATION_camera test.

Checklist

  • Signed all commits for DCO
  • Added tests
  • Added example and/or tutorial
  • 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 and edit the commit message to match the pull request summary while retaining Signed-off-by messages.

iche033 added 2 commits March 9, 2022 20:50
Signed-off-by: Ian Chen <ichen@osrfoundation.org>
Signed-off-by: Ian Chen <ichen@osrfoundation.org>
@github-actions github-actions bot added the 🏯 fortress Ignition Fortress label Mar 10, 2022
@codecov
Copy link

codecov bot commented Mar 10, 2022

Codecov Report

Merging #204 (7814a08) into ign-sensors6 (6a0b37f) will increase coverage by 0.05%.
The diff coverage is 100.00%.

Impacted file tree graph

@@               Coverage Diff                @@
##           ign-sensors6     #204      +/-   ##
================================================
+ Coverage         76.52%   76.58%   +0.05%     
================================================
  Files                29       29              
  Lines              2918     2925       +7     
================================================
+ Hits               2233     2240       +7     
  Misses              685      685              
Impacted Files Coverage Δ
src/Sensor.cc 89.77% <100.00%> (+0.42%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6a0b37f...7814a08. Read the comment docs.

@iche033 iche033 merged commit f2eb097 into ign-sensors6 Mar 11, 2022
@iche033 iche033 deleted the set_active branch March 11, 2022 00:11
@osrf-triage
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏯 fortress Ignition Fortress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants