Fawkes API
Fawkes Development Version
imu_thread.h
1
/***************************************************************************
2
* imu_thread.h - Thread to publish IMU data to ROS
3
*
4
* Created: Mon 03 Apr 2017 12:41:33 CEST 12:41
5
* Copyright 2017 Till Hofmann <hofmann@kbsg.rwth-aachen.de>
6
****************************************************************************/
7
8
/* This program is free software; you can redistribute it and/or modify
9
* it under the terms of the GNU General Public License as published by
10
* the Free Software Foundation; either version 2 of the License, or
11
* (at your option) any later version.
12
*
13
* This program is distributed in the hope that it will be useful,
14
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
* GNU Library General Public License for more details.
17
*
18
* Read the full text in the LICENSE.GPL file in the doc directory.
19
*/
20
21
#ifndef _PLUGINS_ROS_IMU_THREAD_H_
22
#define _PLUGINS_ROS_IMU_THREAD_H_
23
24
#include <aspect/blackboard.h>
25
#include <aspect/configurable.h>
26
#include <aspect/logging.h>
27
#include <blackboard/interface_listener.h>
28
#include <core/threading/thread.h>
29
#include <interfaces/IMUInterface.h>
30
#include <plugins/ros/aspect/ros.h>
31
#include <ros/node_handle.h>
32
33
class
RosIMUThread
:
public
fawkes::Thread
,
34
public
fawkes::ConfigurableAspect
,
35
public
fawkes::LoggingAspect
,
36
public
fawkes::ROSAspect
,
37
public
fawkes::BlackBoardAspect
,
38
public
fawkes::BlackBoardInterfaceListener
39
{
40
public
:
41
RosIMUThread
();
42
virtual
~RosIMUThread
();
43
44
virtual
void
init
();
45
virtual
void
finalize
();
46
47
virtual
void
bb_interface_data_changed
(
fawkes::Interface
*interface)
throw
();
48
49
private
:
50
ros::Publisher ros_pub_;
51
fawkes::IMUInterface
*iface_;
52
};
53
54
#endif
/* PLUGINS_ROS_IMU_THREAD_H__ */
fawkes::IMUInterface
Definition:
IMUInterface.h:39
RosIMUThread::~RosIMUThread
virtual ~RosIMUThread()
Destructor.
Definition:
imu_thread.cpp:43
RosIMUThread::init
virtual void init()
Initialize the thread.
Definition:
imu_thread.cpp:52
fawkes::BlackBoardInterfaceListener
Definition:
interface_listener.h:47
RosIMUThread::bb_interface_data_changed
virtual void bb_interface_data_changed(fawkes::Interface *interface)
Handle interface changes.
Definition:
imu_thread.cpp:101
RosIMUThread::RosIMUThread
RosIMUThread()
Constructor.
Definition:
imu_thread.cpp:37
fawkes::BlackBoardAspect
Definition:
blackboard.h:38
fawkes::LoggingAspect
Definition:
logging.h:38
fawkes::ROSAspect
Definition:
ros.h:38
fawkes::Interface
Definition:
interface.h:78
fawkes::Thread
Definition:
thread.h:45
RosIMUThread
Definition:
imu_thread.h:33
fawkes::ConfigurableAspect
Definition:
configurable.h:38
RosIMUThread::finalize
virtual void finalize()
Close all interfaces and ROS handles.
Definition:
imu_thread.cpp:89
src
plugins
ros
imu_thread.h
Generated by
1.8.17