diff --git a/src/systems/pose_publisher/PosePublisher.cc b/src/systems/pose_publisher/PosePublisher.cc index 4eda6045c8..f2243cc19d 100644 --- a/src/systems/pose_publisher/PosePublisher.cc +++ b/src/systems/pose_publisher/PosePublisher.cc @@ -527,6 +527,9 @@ void PosePublisherPrivate::PublishPoses( { GZ_PROFILE("PosePublisher::PublishPoses"); + if (_poses.empty()) + return; + // publish poses msgs::Pose *msg = nullptr; if (this->usePoseV)