From c72d74c7fbde273eada1ee3b99f13d543477adbd Mon Sep 17 00:00:00 2001 From: Eitan Marder-Eppstein Date: Fri, 14 Jan 2011 09:38:24 +0000 Subject: [PATCH] Fixing a bug in computing the offset shift git-svn-id: https://code.ros.org/svn/ros-pkg/stacks/laser_pipeline/trunk@35245 eb33c2ac-9c88-4c90-87e0-44a10359b0c3 --- src/laser_geometry.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/laser_geometry.cpp b/src/laser_geometry.cpp index 0b05a2e..3ec836c 100644 --- a/src/laser_geometry.cpp +++ b/src/laser_geometry.cpp @@ -623,6 +623,12 @@ const boost::numeric::ublas::matrix& LaserProjection::getUnitVectors_(do { offset_shift = cloud_out.fields[i + 1].offset - cloud_out.fields[i].offset; } + else + { + //we know that the index is the last field... but the shift is still important + //for computing the point_step and data size + offset_shift = 4; + } } }