00001 #ifndef POINTCLOUD_TRANSPORT_DECIMATED_PUBLISHER_H
00002 #define POINTCLOUD_TRANSPORT_DECIMATED_PUBLISHER_H
00003
00004 #include <message_transport/simple_publisher_plugin.h>
00005 #include <sensor_msgs/PointCloud.h>
00006
00007 namespace decimated_transport {
00008
00009 class DecimatedPublisher : public message_transport::SimplePublisherPlugin<sensor_msgs::PointCloud,sensor_msgs::PointCloud>
00010 {
00011 public:
00012 DecimatedPublisher() {decimation=10;}
00013 virtual ~DecimatedPublisher() {}
00014
00015 virtual std::string getTransportName() const
00016 {
00017 return "decimated";
00018 }
00019
00020 protected:
00021 virtual void publish(const sensor_msgs::PointCloud& pointcloud,
00022 const message_transport::SimplePublisherPlugin<sensor_msgs::PointCloud,sensor_msgs::PointCloud>::PublishFn& publish_fn) const ;
00023
00024 mutable unsigned int decimation;
00025 };
00026
00027 }
00028
00029 #endif // POINTCLOUD_TRANSPORT_DECIMATED_PUBLISHER_H