Skip to content

Commit

Permalink
Fix: create merged pointcloud when no idx is selected
Browse files Browse the repository at this point in the history
Signed-off-by: Hirokazu Ishida <h-ishida@jsk.imi.i.u-tokyo.ac.jp>
  • Loading branch information
HiroIshida committed Apr 27, 2022
1 parent 50e049f commit db00da5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion simulator/dummy_perception_publisher/src/node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,10 @@ void DummyPerceptionPublisherNode::timerCallback()
}
}

if (!selected_indices.empty()) {
if (selected_indices.empty()) {
pcl::PointCloud<pcl::PointXYZ>::Ptr merged_pointcloud_ptr(new pcl::PointCloud<pcl::PointXYZ>);
pcl::toROSMsg(*merged_pointcloud_ptr, output_pointcloud_msg);
} else {
std::vector<ObjectInfo> obj_infos;
for (const auto selected_idx : selected_indices) {
const auto obj_info = ObjectInfo(objects_.at(selected_idx), current_time);
Expand Down

0 comments on commit db00da5

Please sign in to comment.