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

add conversion for particle scatter ratio field #791

Merged
merged 6 commits into from
May 19, 2021

Conversation

iche033
Copy link
Contributor

@iche033 iche033 commented Apr 26, 2021

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

🎉 New feature

Summary

Depends on gazebosim/sdformat#547

This feature was originally added for the particle_emitter system in #674. This PR ports the functionality to the particle_emitter2 system.

Test it

You can test this PR in the same way as the steps listed in #674 but using this sensor_particles_scattering2.sdf world file. The first time you run it, it'll download the Fog Generator model.

ign gazebo -r sensor_particles_scattering2.sdf

Pay attention to the particle effects in depth, rgbd cameras and lidars. Now change particle scatter ratio by modifying ~/.ignition/fuel/fuel.ignitionrobotics.org/openrobotics/models/fog generator/<version_number>/model.sdf and adding <particle_scatter_ratio>0.01</particle_scatter_ratio> under <emitter>.

Run ign-gazebo with sensor_particles_scattering2.sdf again to see that the new scatter ratio in effect. The fog particles should appear to be less dense (noisy) in the depth / rgbd cameras and lidar visualizations.

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

Signed-off-by: Ian Chen <ichen@osrfoundation.org>
Signed-off-by: Ian Chen <ichen@osrfoundation.org>
@iche033 iche033 requested a review from chapulina as a code owner April 26, 2021 22:59
@osrf-triage osrf-triage added this to Inbox in Core development Apr 26, 2021
@github-actions github-actions bot added the 🔮 dome Ignition Dome label Apr 26, 2021
@chapulina chapulina added the needs upstream release Blocked by a release of an upstream library label Apr 26, 2021
@chapulina chapulina moved this from Inbox to In review in Core development Apr 26, 2021
src/Conversions.cc Outdated Show resolved Hide resolved
Copy link
Contributor

@nkoenig nkoenig left a comment

Choose a reason for hiding this comment

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

Just one comment.

@@ -1390,6 +1390,12 @@ msgs::ParticleEmitter ignition::gazebo::convert(const sdf::ParticleEmitter &_in)
header->add_value(_in.Topic());
}

// todo(anyone) add particle_scatter_ratio field in particle_emitter.proto
Copy link
Contributor

Choose a reason for hiding this comment

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

How about making a PR in ign-msgs targeting Fortress? Then this todo could be changed to:

Use particle_scatter_ratio in particle_emitter.proto from Fortress on.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the field was added in gazebosim/gz-msgs#162 so updated comment
99b8ae7

Signed-off-by: Ian Chen <ichen@osrfoundation.org>
@iche033 iche033 merged commit b18f6ca into ign-gazebo4 May 19, 2021
Core development automation moved this from In review to Done May 19, 2021
@iche033 iche033 deleted the port_scatter_param branch May 19, 2021 18:25
@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
🔮 dome Ignition Dome needs upstream release Blocked by a release of an upstream library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants