trajopt
 All Classes Namespaces Files Functions Variables Typedefs Pages
cloudgrabber.hpp
1 #pragma once
2 #include <pcl/point_types.h>
3 #include <pcl/point_cloud.h>
4 #include <boost/shared_ptr.hpp>
5 #include "macros.h"
6 
7 namespace cloudproc {
8 
9 class CloudGrabberImpl;
10 
11 struct RGBD {
12  typedef boost::shared_ptr<RGBD> Ptr;
13  std::vector<unsigned char> rgb;
14  std::vector<unsigned short> depth;
15  RGBD() : rgb(480*640*3), depth(480*640) {}
16 };
17 
21 class TRAJOPT_API CloudGrabber {
22 public:
23 
24  CloudGrabber();
25  void startXYZ();
26  void startXYZRGB();
27  void startRGBD();
28  void stop();
29  pcl::PointCloud<pcl::PointXYZ>::Ptr getXYZ();
30  pcl::PointCloud<pcl::PointXYZRGB>::Ptr getXYZRGB();
31  RGBD::Ptr getRGBD();
32 private:
33  boost::shared_ptr<CloudGrabberImpl> m_impl;
34 };
35 
36 }