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; + } } }