ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
![]() | 1 | initial version |
I am guessing that you should allocate the memory for output_p and downsampled_XYZ when you enter the callback.
Also, one more advice, after
pcl::toROSMsg (*output_p, *output);
You should set the frame_id of output to the same value as input
output.header.frame_id = input->header.frame_id;
otherwise if you try to visualize the point cloud with rviz, it will complain because it would not know the frame of reference for output.