How to cut off the points_raw data in specific angles ?

asked 2019-01-02 05:00:27 -0500

kite9240 gravatar image

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?

edit retag flag offensive close merge delete

Comments

It might help if you could tell us what exactly points_raw is and where it can be found.

gvdhoorn gravatar image gvdhoorn  ( 2019-01-02 06:18:21 -0500 )edit

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.

PeteBlackerThe3rd gravatar image PeteBlackerThe3rd  ( 2019-01-02 08:15:37 -0500 )edit

Data type is points_raw and I can see that data at Rviz ( PointCloud2 )

kite9240 gravatar image kite9240  ( 2019-01-06 23:33:13 -0500 )edit

Okay. The topic name is points_raw and the data type is PointCloud2. 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 box

PeteBlackerThe3rd gravatar image PeteBlackerThe3rd  ( 2019-01-07 03:09:50 -0500 )edit

The 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...

gvdhoorn gravatar image gvdhoorn  ( 2019-01-07 03:12:24 -0500 )edit

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.

PeteBlackerThe3rd gravatar image PeteBlackerThe3rd  ( 2019-01-07 05:22:22 -0500 )edit

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.

gvdhoorn gravatar image gvdhoorn  ( 2019-01-07 06:40:38 -0500 )edit
1

Thank you so much PeteBlackerThe3rd and gvdhoorn. Your comments are has been a great help!

kite9240 gravatar image kite9240  ( 2019-01-08 05:21:34 -0500 )edit