logging.h
Go to the documentation of this file.
1 
6 #ifndef LOGGING_H
7 #define LOGGING_H
8 
9 #define PCL_NO_PRECOMPILE
10 
11 #include <ros/package.h>
12 #include <ros/ros.h>
13 
14 #include <pcl/io/io_exception.h>
15 #include <pcl/io/pcd_io.h>
16 #include <pcl_ros/point_cloud.h>
17 
18 #include "toposens_msgs/TsPoint.h"
21 
23 {
34 class Logging
35 {
36 public:
44  Logging(ros::NodeHandle nh, ros::NodeHandle private_nh);
45 
49  ~Logging();
50 
58  void save(const ros::TimerEvent &event);
59 
63  static void logPointcloud()
64  {
65  ros::NodeHandle nh;
66  ros::NodeHandle private_nh("~");
67 
68  Logging l(nh, private_nh);
69 
70  while (true)
71  {
72  try
73  {
74  boost::this_thread::sleep(boost::posix_time::milliseconds(10));
75  }
76  catch (boost::thread_interrupted &)
77  {
78  return;
79  }
80  }
81  }
82 
83 private:
91  void _accumulate(const XYZINCloud::ConstPtr &msg);
92 
93  XYZINCloud::Ptr store_;
94  std::string pcd_path_;
99  boost::mutex store_mutex_;
100 };
101 
102 } // namespace toposens_pointcloud
103 
104 #endif
Demonstrates basic TF and PCL integrations for TsScan data.
Definition: logging.h:34
void _accumulate(const XYZINCloud::ConstPtr &msg)
Definition: logging.cpp:54
static void logPointcloud()
Definition: logging.h:63
ros::Subscriber cloud_sub_
Definition: logging.h:96
XYZINCloud::Ptr store_
Definition: logging.h:93
Logging(ros::NodeHandle nh, ros::NodeHandle private_nh)
Definition: logging.cpp:5
void save(const ros::TimerEvent &event)
Definition: logging.cpp:31
boost::mutex store_mutex_
Definition: logging.h:99


toposens_pointcloud
Author(s): Adi Singh, Sebastian Dengler, Christopher Lang, Inshal Uddin
autogenerated on Mon Feb 28 2022 23:57:49