Fawkes API
Fawkes Development Version
gazsim_webcam_thread.h
1
/***************************************************************************
2
* gazsim_webcam_plugin.cpp - Plugin simulates Webcams in Gazebo and
3
* provides a shared memory buffer
4
*
5
* Created: Sat Sep 21 17:35:27 2013
6
* Copyright 2013 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_GAZSIM_WEBCAM_THREAD_H_
23
#define _PLUGINS_GAZSIM_WEBCAM_THREAD_H_
24
25
#include <aspect/blackboard.h>
26
#include <aspect/blocked_timing.h>
27
#include <aspect/clock.h>
28
#include <aspect/configurable.h>
29
#include <aspect/logging.h>
30
#include <core/threading/thread.h>
31
#include <fvutils/ipc/shm_image.h>
32
#include <plugins/gazebo/aspect/gazebo.h>
33
34
#include <boost/circular_buffer.hpp>
35
#include <string.h>
36
37
//from Gazebo
38
#include "gazsim_webcam.h"
39
40
#include <gazebo/msgs/MessageTypes.hh>
41
#include <gazebo/transport/TransportTypes.hh>
42
#include <gazebo/transport/transport.hh>
43
44
class
WebcamSimThread
:
public
fawkes::Thread
,
45
public
fawkes::ClockAspect
,
46
public
fawkes::LoggingAspect
,
47
public
fawkes::ConfigurableAspect
,
48
public
fawkes::BlackBoardAspect
,
49
public
fawkes::BlockedTimingAspect
,
50
public
fawkes::GazeboAspect
51
{
52
public
:
53
WebcamSimThread
();
54
55
virtual
void
init
();
56
virtual
void
loop
();
57
virtual
void
finalize
();
58
59
private
:
60
std::vector<GazsimWebcam *> webcams_;
61
62
//config values
63
std::vector<std::string> shm_ids_;
64
};
65
66
#endif
WebcamSimThread::init
virtual void init()
Initialize the thread.
Definition:
gazsim_webcam_thread.cpp:50
fawkes::GazeboAspect
Definition:
gazebo.h:40
WebcamSimThread::WebcamSimThread
WebcamSimThread()
Constructor.
Definition:
gazsim_webcam_thread.cpp:43
fawkes::BlockedTimingAspect
Definition:
blocked_timing.h:54
WebcamSimThread::loop
virtual void loop()
Code to execute in the thread.
Definition:
gazsim_webcam_thread.cpp:69
fawkes::BlackBoardAspect
Definition:
blackboard.h:36
fawkes::LoggingAspect
Definition:
logging.h:36
WebcamSimThread
Definition:
gazsim_webcam_thread.h:43
fawkes::Thread
Definition:
thread.h:44
fawkes::ConfigurableAspect
Definition:
configurable.h:36
WebcamSimThread::finalize
virtual void finalize()
Finalize the thread.
Definition:
gazsim_webcam_thread.cpp:61
fawkes::ClockAspect
Definition:
clock.h:38
src
plugins
gazebo
gazsim-webcam
gazsim_webcam_thread.h
Generated by
1.8.16