23 #ifndef _PLUGINS_MONGODB_LOG_MONGODB_LOG_PCL_THREAD_H_
24 #define _PLUGINS_MONGODB_LOG_MONGODB_LOG_PCL_THREAD_H_
26 #include <aspect/clock.h>
27 #include <aspect/configurable.h>
28 #include <aspect/logging.h>
29 #include <aspect/pointcloud.h>
30 #include <blackboard/interface_listener.h>
31 #include <blackboard/interface_observer.h>
32 #include <core/threading/mutex.h>
33 #include <core/threading/thread.h>
34 #include <interfaces/TransformInterface.h>
35 #include <pcl_utils/pcl_adapter.h>
36 #include <plugins/mongodb/aspect/mongodb.h>
39 #include <mongocxx/gridfs/bucket.hpp>
42 #if PCL_VERSION_COMPARE(>=, 1, 7, 0)
43 # include <pcl/PCLPointCloud2.h>
45 # include <sensor_msgs/PointCloud2.h>
83 std::string topic_name;
84 #if PCL_VERSION_COMPARE(>=, 1, 7, 0)
85 pcl::PCLPointCloud2 msg;
87 sensor_msgs::PointCloud2 msg;
92 std::map<std::string, PointCloudInfo> pcls_;
94 mongocxx::client * mongodb_;
95 mongocxx::gridfs::bucket gridfs_;
96 std::string collection_;
97 std::string database_;
102 bool cfg_flush_after_write_;
103 unsigned int cfg_chunk_size_;
104 float cfg_storage_interval_;
Thread to store point clouds to MongoDB.
MongoLogPointCloudThread()
Constructor.
virtual void init()
Initialize the thread.
virtual ~MongoLogPointCloudThread()
Destructor.
virtual void run()
Stub to see name in backtrace for easier debugging.
virtual void loop()
Code to execute in the thread.
virtual bool prepare_finalize_user()
Prepare finalization user implementation.
virtual void finalize()
Finalize the thread.
Point cloud adapter class.
Thread aspect that allows to obtain the current time from the clock.
Thread aspect to access configuration data.
Thread aspect to log output.
Thread aspect to access MongoDB.
Mutex mutual exclusion lock.
Thread aspect to provide and access point clouds.
Thread class encapsulation of pthreads.
A class for handling time.
Fawkes library namespace.