Merge pull request #5 from fkie/fix-pointcloud2-projection
Fix pointcloud2 projections
This commit is contained in:
commit
ab31d9005c
|
|
@ -424,7 +424,7 @@ const boost::numeric::ublas::matrix<double>& LaserProjection::getUnitVectors_(do
|
|||
for (size_t i = 0; i < n_pts; ++i)
|
||||
{
|
||||
//check to see if we want to keep the point
|
||||
if (scan_in.ranges[i] <= range_cutoff && scan_in.ranges[i] >= scan_in.range_min)
|
||||
if (scan_in.ranges[i] < range_cutoff && scan_in.ranges[i] >= scan_in.range_min)
|
||||
{
|
||||
float *pstep = (float*)&cloud_out.data[count * cloud_out.point_step];
|
||||
|
||||
|
|
@ -515,7 +515,7 @@ const boost::numeric::ublas::matrix<double>& LaserProjection::getUnitVectors_(do
|
|||
//ensure that we use the correct timestamps
|
||||
channel_options |= channel_option::Index;
|
||||
|
||||
projectLaser_(scan_in, cloud_out, -1.0, channel_options);
|
||||
projectLaser_(scan_in, cloud_out, range_cutoff, channel_options);
|
||||
|
||||
//we'll assume no associated viewpoint by default
|
||||
bool has_viewpoint = false;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user