From a85006555ff146e38c453017205c17731a342200 Mon Sep 17 00:00:00 2001 From: Eitan Marder-Eppstein Date: Fri, 14 Jan 2011 09:40:31 +0000 Subject: [PATCH] We know offset_shift is always 4, makes things a lot simpler git-svn-id: https://code.ros.org/svn/ros-pkg/stacks/laser_pipeline/trunk@35246 eb33c2ac-9c88-4c90-87e0-44a10359b0c3 --- src/laser_geometry.cpp | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/src/laser_geometry.cpp b/src/laser_geometry.cpp index 3ec836c..67da750 100644 --- a/src/laser_geometry.cpp +++ b/src/laser_geometry.cpp @@ -618,17 +618,8 @@ const boost::numeric::ublas::matrix& LaserProjection::getUnitVectors_(do } else { - //check if we need to get an offset shift to remove the index field - if(i < cloud_out.fields.size() - 1) - { - 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; - } + //once we hit the index, we'll set the shift + offset_shift = 4; } }