From e85be51358ed17474f0ee334822d0a4bef520d6a Mon Sep 17 00:00:00 2001 From: mudskipper75 Date: Fri, 21 Aug 2020 07:19:12 +0100 Subject: [PATCH 1/3] Update conversions.h Enable conversion of PCLPointCloud2 to PointCloud for clouds with more than 2^28 points. --- common/include/pcl/conversions.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/include/pcl/conversions.h b/common/include/pcl/conversions.h index f1904921125..2db9c30a21a 100644 --- a/common/include/pcl/conversions.h +++ b/common/include/pcl/conversions.h @@ -205,10 +205,10 @@ namespace pcl else { // If not, memcpy each group of contiguous fields separately - for (std::uint32_t row = 0; row < msg.height; ++row) + for (std::size_t row = 0; row < msg.height; ++row) { const std::uint8_t* row_data = &msg.data[row * msg.row_step]; - for (std::uint32_t col = 0; col < msg.width; ++col) + for (std::size_t col = 0; col < msg.width; ++col) { const std::uint8_t* msg_data = row_data + col * msg.point_step; for (const detail::FieldMapping& mapping : field_map) From 413f00a50b0c9f838612f13eaacf852ce921d7b1 Mon Sep 17 00:00:00 2001 From: mudskipper75 Date: Fri, 21 Aug 2020 07:28:01 +0100 Subject: [PATCH 2/3] Update conversions.h --- common/include/pcl/conversions.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/include/pcl/conversions.h b/common/include/pcl/conversions.h index 2db9c30a21a..5b93ee35daf 100644 --- a/common/include/pcl/conversions.h +++ b/common/include/pcl/conversions.h @@ -205,10 +205,10 @@ namespace pcl else { // If not, memcpy each group of contiguous fields separately - for (std::size_t row = 0; row < msg.height; ++row) + for (std::index_t row = 0; row < msg.height; ++row) { const std::uint8_t* row_data = &msg.data[row * msg.row_step]; - for (std::size_t col = 0; col < msg.width; ++col) + for (std::index_t col = 0; col < msg.width; ++col) { const std::uint8_t* msg_data = row_data + col * msg.point_step; for (const detail::FieldMapping& mapping : field_map) From 043aa1c1983c4ff7fca9204d4adde414f30f1f2e Mon Sep 17 00:00:00 2001 From: mudskipper75 Date: Fri, 21 Aug 2020 14:44:47 +0100 Subject: [PATCH 3/3] Update conversions.h --- common/include/pcl/conversions.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/include/pcl/conversions.h b/common/include/pcl/conversions.h index 5b93ee35daf..58f4617b21b 100644 --- a/common/include/pcl/conversions.h +++ b/common/include/pcl/conversions.h @@ -205,10 +205,10 @@ namespace pcl else { // If not, memcpy each group of contiguous fields separately - for (std::index_t row = 0; row < msg.height; ++row) + for (index_t row = 0; row < msg.height; ++row) { const std::uint8_t* row_data = &msg.data[row * msg.row_step]; - for (std::index_t col = 0; col < msg.width; ++col) + for (index_t col = 0; col < msg.width; ++col) { const std::uint8_t* msg_data = row_data + col * msg.point_step; for (const detail::FieldMapping& mapping : field_map)