This is what you should do
pc_accumulation lib;
With this class you can subscribe a sensor_msgs::LaserScan or sensor_msgs::PointCloud.(create respective Callback) In order for this to work, you must subscribe also a nav_msgs::Odometry, in order to make the accumulation possible.
Must specify:(use them as Global Variables)
Frame of accumulation : acc_frame = Desired frame to remove points from lib._acc_frame_id = Distance distance_from =
The message to publish is from type sensor_msgs::PointCloud2
<?xml version="1.0"?> <launch> <!-- This is a pc_accumulation launch file for starting the pc_accumulation_nodelet--> <node name="pc_accumulation_nodelet" pkg="pc_accumulation" type="pc_accumulation_nodelet" > <!--This parameter set the desired max distance removed_from --> <param name="distance_from" value="15" type="double"/> <!--This parameter sets the point from your system --> <param name="removed_from" value="/atc/vehicle/center_bumper"/> <!-- Define the time interval between each published message--> <param name="timer_value" value="0.1" type="double"/> <!--Frequency of pub message ( sec ) --> <!-- Set the accumulation frame_id--> <param name="acc_frame" value="/world"/> <!-- Subscribe several topics LaserScan and PointClouds (0 - 4)--> <!-- Remmaping topics--> <remap from="/laserscan0" to="/atc/laser/center_top_roof/laser_scan"/> <remap from="/pointcloud0" to="/xb3_short/left/image_raw"/> </node> </launch>