Skip to content

Commit bca3e0c

Browse files
committed
Prevent publishing empty poses in pose publisher (#3262)
Signed-off-by: Ian Chen <ichen@openrobotics.org> (cherry picked from commit 80246e0)
1 parent 6270d6b commit bca3e0c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/systems/pose_publisher/PosePublisher.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -527,6 +527,9 @@ void PosePublisherPrivate::PublishPoses(
527527
{
528528
GZ_PROFILE("PosePublisher::PublishPoses");
529529

530+
if (_poses.empty())
531+
return;
532+
530533
// publish poses
531534
msgs::Pose *msg = nullptr;
532535
if (this->usePoseV)

0 commit comments

Comments
 (0)