Go to the documentation of this file.00001 #ifndef PCL_BASIC_H
00002 #define PCL_BASIC_H
00003 #include <ros/ros.h>
00004
00005 #include <rosbag/bag.h>
00006 #include <rosbag/view.h>
00007 #include <rosbag/message_instance.h>
00008
00009 #include <sensor_msgs/PointCloud2.h>
00010 #include <pcl_ros/point_cloud.h>
00011 #include <pcl/point_cloud.h>
00012 #include <pcl/point_types.h>
00013 #include <pcl/filters/passthrough.h>
00014 #include <pcl/filters/conditional_removal.h>
00015 #include <pcl/filters/extract_indices.h>
00016
00017 #include <boost/format.hpp>
00018 #include <boost/make_shared.hpp>
00019 #include <boost/foreach.hpp>
00020
00021 #include <eigen_conversions/eigen_msg.h>
00022 #include <Eigen/Eigen>
00023
00024 using namespace std;
00025 using namespace Eigen;
00026
00027 typedef pcl::PointXYZRGB PRGB;
00028 typedef pcl::PointCloud<PRGB> PCRGB;
00029
00030 void transformPC(const PCRGB &in_pc, PCRGB &out_pc,
00031 const Eigen::Affine3d& transform);
00032 void pubLoop(PCRGB::Ptr& pc, const std::string& topic, double rate = 1.0, int number_runs=10000);
00033 void pubLoop(vector<PCRGB::Ptr> &pcs, const vector<std::string>& topics, double rate,
00034 int number_runs=10000);
00035 void boxFilter(const PCRGB &in_pc, PCRGB &out_pc,
00036 double min_x, double max_x, double min_y, double max_y, double min_z, double max_z);
00037 void extractIndices(const PCRGB::Ptr& in_pc, pcl::IndicesPtr& inds, PCRGB::Ptr& out_pc, bool is_negative = false);
00038 void readPCBag(const string& filename, PCRGB::Ptr& pc);
00039 void savePCBag(const string& filename, PCRGB::Ptr& pc);
00040
00041 #endif // PCL_BASIC_H