Skip to content

Prevent publishing empty messages in pose publisher (backport #3262)#3264

Merged
iche033 merged 1 commit intogz-sim10from
mergify/bp/gz-sim10/pr-3262
Jan 12, 2026
Merged

Prevent publishing empty messages in pose publisher (backport #3262)#3264
iche033 merged 1 commit intogz-sim10from
mergify/bp/gz-sim10/pr-3262

Conversation

@mergify
Copy link
Copy Markdown
Contributor

@mergify mergify Bot commented Jan 12, 2026

🦟 Bug fix

Summary

Add a check to make sure we don't publish pose messages if it's empty, otherwise you get a bunch of empty msgs.

To test:

Add the pose publisher system to your favorite static model., e.g. edit shapes.df and add the following system to the ground_plane model:

      <plugin filename="libgz-sim-pose-publisher-system.so"
        name="gz::sim::systems::PosePublisher">
        <publish_link_pose>true</publish_link_pose>
        <publish_sensor_pose>false</publish_sensor_pose>
        <publish_collision_pose>false</publish_collision_pose>
        <publish_visual_pose>false</publish_visual_pose>
        <publish_nested_model_pose>true</publish_nested_model_pose>
        <publish_model_pose>true</publish_model_pose>
        <use_pose_vector_msg>true</use_pose_vector_msg>
        <static_publisher>true</static_publisher>
        <static_update_frequency>1</static_update_frequency>
      </plugin>

Run sim:

gz sim -v 4 -r shapes.sdf

Now echo the /model/ground_plane/pose topic to see that no messages should be published. Before this fix, there'll be a lot of empty messages (empty lines)

gz topic -e -t /model/ground_plane/pose

Echo the pose_static topic to make sure data are published:

/model/ground_plane/pose_static

Checklist

  • Signed all commits for DCO
  • Added tests
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • Consider updating Python bindings (if the library has them)
  • 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
  • Was GenAI used to generate this PR? If so, make sure to add "Generated-by" to your commits. (See this policy for more info.)

Generated-by: Remove this if GenAI was not used.

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by and Generated-by messages.


This is an automatic backport of pull request #3262 done by [Mergify](https://mergify.com).

Signed-off-by: Ian Chen <ichen@openrobotics.org>
(cherry picked from commit 80246e0)
@github-project-automation github-project-automation Bot moved this from Inbox to In review in Core development Jan 12, 2026
@iche033 iche033 merged commit 9a6478a into gz-sim10 Jan 12, 2026
16 checks passed
@iche033 iche033 deleted the mergify/bp/gz-sim10/pr-3262 branch January 12, 2026 21:37
@github-project-automation github-project-automation Bot moved this from In review to Done in Core development Jan 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants