Fixing bug in how data is copied

git-svn-id: https://code.ros.org/svn/ros-pkg/stacks/laser_pipeline/trunk@35248 eb33c2ac-9c88-4c90-87e0-44a10359b0c3
This commit is contained in:
Eitan Marder-Eppstein 2011-01-14 09:51:37 +00:00
parent a85006555f
commit 47fde33dec

View File

@ -635,7 +635,7 @@ const boost::numeric::ublas::matrix<double>& LaserProjection::getUnitVectors_(do
unsigned int i = 0, j = 0;
while(i < cloud_out.data.size())
{
if(i % index_offset)
if((i % cloud_out.point_step) < index_offset || (i % cloud_out.point_step) >= (index_offset + 4))
{
cloud_without_index.data[j++] = cloud_out.data[i++];
}