Fawkes API  Fawkes Development Version
openrave-robot-memory_thread.h
1 
2 /***************************************************************************
3  * openrave-robot-memory_thread.h - openrave-robot-memory
4  *
5  * Created: Thu Nov 24 13:14:33 2016
6  * Copyright 2016 Frederik Zwilling
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_OPENRAVE_ROBOT_MEMORY_THREAD_H_
23 #define _PLUGINS_OPENRAVE_ROBOT_MEMORY_THREAD_H_
24 
25 #include <aspect/blackboard.h>
26 #include <aspect/blocked_timing.h>
27 #include <aspect/configurable.h>
28 #include <aspect/logging.h>
29 #include <core/threading/thread.h>
30 #include <interfaces/OpenRaveInterface.h>
31 #include <interfaces/OpenraveRobotMemoryInterface.h>
32 #include <plugins/robot-memory/aspect/robot_memory_aspect.h>
33 
34 #include <algorithm>
35 #include <list>
36 
37 namespace fawkes {
38 // add forward declarations here, e.g., interfaces
39 }
40 
43  public fawkes::LoggingAspect,
47 {
48 public:
50 
51  virtual void init();
52  virtual void finalize();
53  virtual void loop();
54 
55  /** Stub to see name in backtrace for easier debugging. @see Thread::run() */
56 protected:
57  virtual void
58  run()
59  {
60  Thread::run();
61  }
62 
63 private:
64  fawkes::OpenRaveInterface * openrave_if_;
66  std::list<std::string> added_objects_;
67  std::list<std::string> added_object_types_;
68 
69  void construct_scene();
70 };
71 
72 #endif
Thread aspect to get access to a the RobotMemory.
Thread aspect to access to BlackBoard.
Definition: blackboard.h:33
virtual void init()
Initialize the thread.
Fawkes library namespace.
Thread class encapsulation of pthreads.
Definition: thread.h:45
Creates an OpenRave Scene for motion planning from data in the robot memory.
virtual void finalize()
Finalize the thread.
Thread aspect to use blocked timing.
virtual void loop()
Code to execute in the thread.
virtual void run()
Stub to see name in backtrace for easier debugging.
Thread aspect to log output.
Definition: logging.h:32
Thread aspect to access configuration data.
Definition: configurable.h:32
OpenraveRobotMemoryInterface Fawkes BlackBoard Interface.
OpenRaveInterface Fawkes BlackBoard Interface.