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

Make particle emitter invisible in thermal camera image #240

Merged
merged 16 commits into from
Feb 17, 2021

Conversation

iche033
Copy link
Contributor

@iche033 iche033 commented Feb 10, 2021

Summary

Achieved by setting visibility mask and flags. The thermal camera now has a visibility mask that does not match with the visibility flags of the particle emitter.

Example output in ign-gazebo. Left: RGBD camera that sees the particles. Right: Thermal camera that only sees Rescue Randy but not the particles emitted by the particle emitter.

thermal_camera_particles

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

Signed-off-by: Ian Chen <ichen@osrfoundation.org>
Signed-off-by: Ian Chen <ichen@osrfoundation.org>
Signed-off-by: Ian Chen <ichen@osrfoundation.org>
Signed-off-by: Ian Chen <ichen@osrfoundation.org>
Signed-off-by: Ian Chen <ichen@osrfoundation.org>
Signed-off-by: Ian Chen <ichen@osrfoundation.org>
@osrf-triage osrf-triage added this to Inbox in Core development Feb 10, 2021
@iche033 iche033 added ogre2.x 🔮 dome Ignition Dome labels Feb 10, 2021
@codecov
Copy link

codecov bot commented Feb 10, 2021

Codecov Report

Merging #240 (c0d4ef0) into ign-rendering4 (938e42c) will increase coverage by 0.03%.
The diff coverage is 100.00%.

Impacted file tree graph

@@                Coverage Diff                 @@
##           ign-rendering4     #240      +/-   ##
==================================================
+ Coverage           52.88%   52.92%   +0.03%     
==================================================
  Files                 143      143              
  Lines               13563    13566       +3     
==================================================
+ Hits                 7173     7180       +7     
+ Misses               6390     6386       -4     
Impacted Files Coverage Δ
ogre2/src/Ogre2ParticleEmitter.cc 77.77% <100.00%> (+1.12%) ⬆️
ogre2/src/Ogre2ThermalCamera.cc 90.75% <100.00%> (+0.05%) ⬆️
...ude/ignition/rendering/base/BaseParticleEmitter.hh 44.15% <0.00%> (+2.59%) ⬆️

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 938e42c...c0d4ef0. Read the comment docs.

Base automatically changed from thermal_8bit to ign-rendering4 February 10, 2021 15:56
@chapulina chapulina moved this from Inbox to In review in Core development Feb 10, 2021
Signed-off-by: Ashton Larkin <ashton@openrobotics.org>
ogre2/src/Ogre2ThermalCamera.cc Outdated Show resolved Hide resolved
test/integration/thermal_camera.cc Outdated Show resolved Hide resolved
test/integration/thermal_camera.cc Outdated Show resolved Hide resolved
test/integration/thermal_camera.cc Show resolved Hide resolved
test/integration/thermal_camera.cc Show resolved Hide resolved
Signed-off-by: Ian Chen <ichen@osrfoundation.org>
Signed-off-by: Ian Chen <ichen@osrfoundation.org>
Signed-off-by: Ian Chen <ichen@osrfoundation.org>
@adlarkin adlarkin self-requested a review February 12, 2021 17:45
Copy link
Contributor

@adlarkin adlarkin left a comment

Choose a reason for hiding this comment

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

Changes look good. Is there an example world you used to test this, and are any other PRs required to test these changes? I'd like to run a local test as a sanity check before approving.

@iche033
Copy link
Contributor Author

iche033 commented Feb 16, 2021

here's the world sdf file I used for testing: https://gist.githubusercontent.com/iche033/2be422b8c527461b1a9cf9788ccf3967/raw/7f2c36757a28c5cda43442016732dd058df6310e/thermal_particles.sdf

@adlarkin
Copy link
Contributor

I'm seeing some weird rendering effects - it looks like the shape of the particles are always rendered relative to the way I view it in the GUI (animation attached below - notice how the box seems to rotate with the GUI display). I don't think this is related to this PR, but do you see something like this as well? Or is this expected behavior?

particle_rendering

@iche033
Copy link
Contributor Author

iche033 commented Feb 16, 2021

yes that's the expected behavior. Particles are rendered as 2D sprites / billboards in ogre (and also commonly done in other render engines, e.g. threejs example). They always face the camera and are always upright.

@adlarkin adlarkin merged commit 194bdf8 into ign-rendering4 Feb 17, 2021
Core development automation moved this from In review to Done Feb 17, 2021
@adlarkin adlarkin deleted the thermal_particles branch February 17, 2021 21:43
@j-rivero j-rivero removed this from Done in Core development May 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants