Skip to content

Commit be2e218

Browse files
committed
fix(euclidean_cluster): fix bug
Signed-off-by: kminoda <koji.minoda@tier4.jp>
1 parent 0306187 commit be2e218

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

perception/euclidean_cluster/src/euclidean_cluster_node.cpp

+1-4
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,7 @@ void EuclideanClusterNode::onPointCloud(
6464
cluster_pub_->publish(output);
6565

6666
// build debug msg
67-
if (debug_pub_->get_subscription_count() < 1) {
68-
return;
69-
}
70-
{
67+
if (debug_pub_->get_subscription_count() >= 1) {
7168
sensor_msgs::msg::PointCloud2 debug;
7269
convertObjectMsg2SensorMsg(output, debug);
7370
debug_pub_->publish(debug);

perception/euclidean_cluster/src/voxel_grid_based_euclidean_cluster_node.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ void VoxelGridBasedEuclideanClusterNode::onPointCloud(
7676
cluster_pub_->publish(output);
7777

7878
// build debug msg
79-
if (debug_pub_->get_subscription_count() <= 1) {
79+
if (debug_pub_->get_subscription_count() >= 1) {
8080
sensor_msgs::msg::PointCloud2 debug;
8181
convertObjectMsg2SensorMsg(output, debug);
8282
debug_pub_->publish(debug);

0 commit comments

Comments
 (0)