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
OpenraveRobotMemoryThread::init
virtual void init()
Initialize the thread.
Definition: openrave-robot-memory_thread.cpp:44
OpenraveRobotMemoryThread
Creates an OpenRave Scene for motion planning from data in the robot memory.
Definition: openrave-robot-memory_thread.h:47
OpenraveRobotMemoryThread::finalize
virtual void finalize()
Finalize the thread.
Definition: openrave-robot-memory_thread.cpp:67
OpenraveRobotMemoryThread::OpenraveRobotMemoryThread
OpenraveRobotMemoryThread()
Constructor.
Definition: openrave-robot-memory_thread.cpp:37
fawkes::BlockedTimingAspect
Thread aspect to use blocked timing.
Definition: blocked_timing.h:51
OpenraveRobotMemoryThread::run
virtual void run()
Stub to see name in backtrace for easier debugging.
Definition: openrave-robot-memory_thread.h:58
fawkes::BlackBoardAspect
Thread aspect to access to BlackBoard.
Definition: blackboard.h:34
fawkes
Fawkes library namespace.
fawkes::LoggingAspect
Thread aspect to log output.
Definition: logging.h:33
OpenraveRobotMemoryThread::loop
virtual void loop()
Code to execute in the thread.
Definition: openrave-robot-memory_thread.cpp:53
fawkes::OpenRaveInterface
OpenRaveInterface Fawkes BlackBoard Interface.
Definition: OpenRaveInterface.h:34
fawkes::Thread
Thread class encapsulation of pthreads.
Definition: thread.h:46
fawkes::ConfigurableAspect
Thread aspect to access configuration data.
Definition: configurable.h:33
fawkes::RobotMemoryAspect
Thread aspect to get access to a the RobotMemory.
Definition: robot_memory_aspect.h:34
fawkes::OpenraveRobotMemoryInterface
OpenraveRobotMemoryInterface Fawkes BlackBoard Interface.
Definition: OpenraveRobotMemoryInterface.h:34