How to cut off the points_raw data in specific angles ?
I want to cut off the points_raw data in specific angles but I can't find any way to do that.
For example, original point_raw datas are from 360 drgrees, but I want only forward areas.
Is there any way to cut off the points_raw data?
It might help if you could tell us what exactly
points_raw
is and where it can be found.I'd guess you're working with some sort of point cloud/laser scan data. But I agree we'll need to know a lot more to be able to help you.
Data type is points_raw and I can see that data at Rviz ( PointCloud2 )
Okay. The topic name is
points_raw
and the data type isPointCloud2
. You may have to write your own filter node to do this, I don't know of anything that can do this out of the boxThe
pcl_ros
package provides a nr of ROS-ified versions of some of PCL's filters: see wiki/pcl_ros - ROS nodelets . I don't remember whether there is something using angles, but other filters do exist. http://wiki.ros.org/pcl_ros/Tutorials...This would be the place to start. I don't think there is a ready made one. but the OP could build a new one from their template which filters for +ve Z to get only points in front of the sensor.
Well, there is a
crop_box
filter, which allows you to chop off pieces of pointclouds by specifying the extents of a box. Since the OP mentioned a lidar, I'm assuming there is a radial aspect here. That would need a new filter.Otherwise the passthrough or cropbox would probably work.
Thank you so much PeteBlackerThe3rd and gvdhoorn. Your comments are has been a great help!