From 77ef3d486852440908ee02d0fd78f3f2446f1978 Mon Sep 17 00:00:00 2001 From: Jongkuk Lim Date: Wed, 22 Nov 2023 14:13:15 +0900 Subject: [PATCH] Fix compressed message indexing bug. (#3) Co-authored-by: Jongkuk Lim --- CMakeLists.txt | 2 +- src/flexxlam_msgs/PointCloud2.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6317bc3..c876a5b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.0.2) project(flexxlam_sdk - VERSION 0.0.1 + VERSION 0.0.2 LANGUAGES CXX ) diff --git a/src/flexxlam_msgs/PointCloud2.cpp b/src/flexxlam_msgs/PointCloud2.cpp index e63a055..5d29db3 100644 --- a/src/flexxlam_msgs/PointCloud2.cpp +++ b/src/flexxlam_msgs/PointCloud2.cpp @@ -30,7 +30,7 @@ PointCloud2::PointCloud2(const std::vector &bytes) { if (compression_flag) { uint32_t original_length = - to_int(vector(bytes.begin() + 1, bytes.begin() + idx + 5)); + to_int(vector(bytes.begin() + 1, bytes.begin() + 5)); bytes_ptr = std::make_shared>( decompress_bytes(vector(bytes.begin() + 5, bytes.end()), /*original_size=*/original_length));