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

Support particle modification #651

Merged
merged 6 commits into from
Mar 1, 2021
Merged

Support particle modification #651

merged 6 commits into from
Mar 1, 2021

Conversation

nkoenig
Copy link
Contributor

@nkoenig nkoenig commented Feb 25, 2021

Signed-off-by: Nate Koenig [email protected]

🦟 Bug fix

Attempting to modify a particle emitter using a particle_emitter message would cause a segfault. This fixes the segfault and also allows the modification to take place.

This will allow a TriggeredPublisher to start/stop fog.

Requires: gazebosim/gz-msgs#137

To test

  1. Save the following to fog.sdf
<?xml version="1.0" ?>
<sdf version="1.6">
<world name="fog">
  <plugin
    filename="ignition-gazebo-physics-system"
    name="ignition::gazebo::systems::Physics">
  </plugin>
  <plugin
    filename="ignition-gazebo-user-commands-system"
    name="ignition::gazebo::systems::UserCommands">
  </plugin>

  <plugin
    filename="ignition-gazebo-scene-broadcaster-system"
    name="ignition::gazebo::systems::SceneBroadcaster">
  </plugin>

  <include>
    <uri>
      https://fuel.ignitionrobotics.org/1.0/OpenRobotics/models/fog emitter
    </uri>
  </include>
</world>
</sdf>
  1. Run the world
ign gazebo -v 4 -r fog.sdf
  1. You should see no fog.
  2. Start the fog using
ign topic -t "/model/fog_generator/particle_emitter/fog_generator" -m ignition.msgs.ParticleEmitter -p "emitting: {data: 1}"
  1. You should see fog.
  2. Stop the fog using
ign topic -t "/model/fog_generator/particle_emitter/fog_generator" -m ignition.msgs.ParticleEmitter -p "emitting: {data: 0}"

Checklist

Note to maintainers: Remember to use Squash-Merge

Signed-off-by: Nate Koenig <[email protected]>
@iche033
Copy link
Contributor

iche033 commented Feb 26, 2021

looks good to me. Just need to wait for gazebosim/gz-msgs#137 and a ign-msgs6 release

@chapulina chapulina added the needs upstream release Blocked by a release of an upstream library label Feb 26, 2021
@nkoenig nkoenig mentioned this pull request Mar 1, 2021
5 tasks
@nkoenig
Copy link
Contributor Author

nkoenig commented Mar 1, 2021

@osrf-jenkins run tests please

@codecov
Copy link

codecov bot commented Mar 1, 2021

Codecov Report

Merging #651 (dcdb837) into ign-gazebo4 (302f5ed) will decrease coverage by 12.59%.
The diff coverage is 57.12%.

Impacted file tree graph

@@               Coverage Diff                @@
##           ign-gazebo4     #651       +/-   ##
================================================
- Coverage        77.37%   64.77%   -12.60%     
================================================
  Files              217      232       +15     
  Lines            12217    16590     +4373     
================================================
+ Hits              9453    10747     +1294     
- Misses            2764     5843     +3079     
Impacted Files Coverage Δ
include/ignition/gazebo/EntityComponentManager.hh 100.00% <ø> (ø)
include/ignition/gazebo/rendering/SceneManager.hh 100.00% <ø> (ø)
.../plugins/component_inspector/ComponentInspector.cc 6.11% <0.00%> (-2.50%) ⬇️
.../plugins/component_inspector/ComponentInspector.hh 28.57% <ø> (ø)
src/gui/plugins/scene3d/Scene3D.cc 8.72% <0.00%> (ø)
src/systems/diff_drive/DiffDrive.hh 100.00% <ø> (ø)
src/systems/physics/Physics.cc 71.44% <ø> (ø)
src/systems/sensors/Sensors.cc 74.75% <0.00%> (ø)
src/rendering/SceneManager.cc 22.69% <8.08%> (ø)
src/systems/joint_controller/JointController.cc 77.17% <12.50%> (-6.16%) ⬇️
... and 37 more

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 8e29cda...dcdb837. Read the comment docs.

@nkoenig nkoenig merged commit 1a16084 into ign-gazebo4 Mar 1, 2021
@nkoenig nkoenig deleted the particle_modification branch March 1, 2021 20:36
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.

3 participants