How do I use RegionOfInterest in sensor_msgs ?
Hey everyone,
I'm using the kinect and Openni_launch to publish a pointcloud (pcl::point<xyz>). I want to extract the distance of a point given the pixel coordinates of that point.
so lets say, in the 640x480 pixel matrix, I want to extract the depth at cell 100x100. I thought of using sensor_msgs::PointCloud2 and sensor_msgs::RegionOfInterest. But I can't find out how to make them work together.
I currently have:
void roiing(sensor_msgs::RegionOfInterest roi) { roi.x_offset = 100; roi.y_offset = 100; roi.height = 1; roi.width = 1; roi.do_rectify = false; }
and then some Functions to subscribe to topics and do processing..
The region of interest doesn't change anything and I was wondering how I can make it work ? I can't find any code online where the RegionOfInterest message is used.
Thanks