Fawkes API  Fawkes Development Version
pcl_db_merge_thread.h
1 
2 /***************************************************************************
3  * pcl_db_merge_thread.h - Restore and merge point clouds from MongoDB
4  *
5  * Created: Wed Nov 28 10:53:14 2012 (Freiburg)
6  * Copyright 2012 Tim Niemueller [www.niemueller.de]
7  ****************************************************************************/
8 
9 /* This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 2 of the License, or
12  * (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  * GNU Library General Public License for more details.
18  *
19  * Read the full text in the LICENSE.GPL file in the doc directory.
20  */
21 
22 #ifndef __PLUGINS_PERCEPTION_PCL_DB_MERGE_PCL_DB_MERGE_THREAD_H_
23 #define __PLUGINS_PERCEPTION_PCL_DB_MERGE_PCL_DB_MERGE_THREAD_H_
24 
25 #include "pcl_db_merge_pipeline.h"
26 
27 #include <core/threading/thread.h>
28 #include <aspect/clock.h>
29 #include <aspect/configurable.h>
30 #include <aspect/logging.h>
31 #include <aspect/blackboard.h>
32 #include <aspect/pointcloud.h>
33 #include <aspect/tf.h>
34 #include <plugins/mongodb/aspect/mongodb.h>
35 
36 #include <pcl/point_types.h>
37 #include <pcl/point_cloud.h>
38 
39 namespace fawkes {
40  class PclDatabaseMergeInterface;
41  class BlackBoardOnMessageWaker;
42 #ifdef USE_TIMETRACKER
43  class TimeTracker;
44 #endif
45 }
46 
47 
49 : public fawkes::Thread,
50  public fawkes::ClockAspect,
51  public fawkes::LoggingAspect,
54  public fawkes::MongoDBAspect,
57 {
58  public:
60  virtual ~PointCloudDBMergeThread();
61 
62  virtual void init();
63  virtual void loop();
64  virtual void finalize();
65 
66 
67  /** Stub to see name in backtrace for easier debugging. @see Thread::run() */
68  protected: virtual void run() { Thread::run(); }
69 
70  private: // members
73 
76 
77  std::string cfg_database_;
78  std::string cfg_output_id_;
79 
82 };
83 
84 #endif
PclDatabaseMergeInterface Fawkes BlackBoard Interface.
Thread aspect to access to BlackBoard.
Definition: blackboard.h:34
Thread aspect that allows to obtain the current time from the clock.
Definition: clock.h:36
Fawkes library namespace.
Thread aspect to provide and access point clouds.
Definition: pointcloud.h:40
virtual void run()
Code to execute in the thread.
Definition: thread.cpp:939
Wake threads on receiving a blackboard message.
Thread class encapsulation of pthreads.
Definition: thread.h:42
Thread aspect to access the transform system.
Definition: tf.h:42
Thread aspect to access MongoDB.
Definition: mongodb.h:40
Thread aspect to log output.
Definition: logging.h:35
Thread to merge point clouds from database on request.
Thread aspect to access configuration data.
Definition: configurable.h:35
RefPtr<> is a reference-counting shared smartpointer.
Definition: refptr.h:49
virtual void run()
Stub to see name in backtrace for easier debugging.