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
41
class
OpenraveRobotMemoryThread
:
public
fawkes::Thread
,
42
public
fawkes::BlockedTimingAspect
,
43
public
fawkes::LoggingAspect
,
44
public
fawkes::ConfigurableAspect
,
45
public
fawkes::RobotMemoryAspect
,
46
public
fawkes::BlackBoardAspect
47
{
48
public
:
49
OpenraveRobotMemoryThread
();
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_;
65
fawkes::OpenraveRobotMemoryInterface
*or_rm_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
Definition:
openrave-robot-memory_thread.h:41
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
Definition:
blocked_timing.h:56
OpenraveRobotMemoryThread::run
virtual void run()
Stub to see name in backtrace for easier debugging.
Definition:
openrave-robot-memory_thread.h:58
fawkes::BlackBoardAspect
Definition:
blackboard.h:38
fawkes
fawkes::LoggingAspect
Definition:
logging.h:38
OpenraveRobotMemoryThread::loop
virtual void loop()
Code to execute in the thread.
Definition:
openrave-robot-memory_thread.cpp:53
fawkes::OpenRaveInterface
Definition:
OpenRaveInterface.h:39
fawkes::Thread
Definition:
thread.h:45
fawkes::ConfigurableAspect
Definition:
configurable.h:38
fawkes::RobotMemoryAspect
Definition:
robot_memory_aspect.h:39
fawkes::OpenraveRobotMemoryInterface
Definition:
OpenraveRobotMemoryInterface.h:39
src
plugins
openrave-robot-memory
openrave-robot-memory_thread.h
Generated by
1.8.17