How to implement a FilterChain for PointCloud2

asked 2020-09-23 02:20:03 -0500

Hey everyone,

I'm trying to setup a filter chain for filtering a pointcloud2 comming from my Intel RealSense D435i. The filter I want to implement is the robot body filter (

I've read the docs, tried to understand it but wasn't able to get it up and running. Aspecialy the documentation point "2.2.3 Using a Filter Chain" from is a bit short.

The example is for double but for Sensor_msgs::PointCloud2 is it then just...?:

filters::MultiChannelFilterChain<Sensor_msgs::PointCloud2> chain("Sensor_msgs::PointCloud2");
std::vector<Sensor_msgs::PointCloud2> in, out; 
chain.update(in, out);

So my question is if someone has already done this or knows of any working example. I've seen some LaserScan examples ( but the camera provides PointCloud2 (and rgbd).

Thank you!


edit retag flag offensive close merge delete