ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

hi, Hornung,

After some debugging, I found the reason for the above filtering issue.

Check the sequence of the following lines in the function OctomapServer::insertCloudCallback of OctomapServer.cpp,

pass.setInputCloud(pc.makeShared());
......

pcl::transformPointCloud(pc, pc, sensorToBase);
pass.filter(pc);
filterGroundPlane(pc, pc_ground, pc_nonground);
......

Since the inputcloud for pass is allocated at the very beginning, so the actual "pc" passed to filterGroundPlane is the old one before transformPointCloud.

So I moved pass.setInputCloud(pc.makeShared()) to right after the line of transformPointCloud, and the ground filtering now works as expected.

The same change should also apply to the case when m_filterGroundPlane=false.

regards