Skip to content

Commit

Permalink
add comment on one time change for emitter cmd component:
Browse files Browse the repository at this point in the history
Signed-off-by: Ian Chen <[email protected]>
  • Loading branch information
iche033 committed Feb 18, 2021
1 parent f612ec8 commit 4142eea
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/systems/particle_emitter/ParticleEmitter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,12 @@ void ParticleEmitter::PreUpdate(const ignition::gazebo::UpdateInfo &_info,
{
emitterComp->Data() = this->dataPtr->userCmd;

// Note: we process the cmd component in RenderUtil but if there is only
// rendering on the gui side, it will not be able to remove the cmd
// component from the ECM. It seems like adding OneTimeChange here will make
// sure the cmd component is found again in Each call on GUI side.
// todo(anyone) find a better way to process this cmd component in
// RenderUtil.cc
_ecm.SetChanged(this->dataPtr->emitterEntity,
components::ParticleEmitterCmd::typeId,
ComponentState::OneTimeChange);
Expand Down

0 comments on commit 4142eea

Please sign in to comment.