Fawkes API
Fawkes Development Version
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
All
Classes
Namespaces
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Groups
Pages
odometry_thread.h
1
/***************************************************************************
2
* odometry_thread.h - Thread to publish odometry to ROS
3
*
4
* Created: Fri Jun 1 13:29:39 CEST
5
* Copyright 2012 Sebastian Reuter
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_ODOMETRY_THREAD_H_
22
#define __PLUGINS_ROS_ODOMETRY_THREAD_H_
23
24
#include <core/threading/thread.h>
25
#include <core/utils/lockptr.h>
26
#include <aspect/logging.h>
27
#include <aspect/configurable.h>
28
#include <aspect/blocked_timing.h>
29
#include <aspect/blackboard.h>
30
#include <plugins/ros/aspect/ros.h>
31
#include <ros/node_handle.h>
32
33
34
namespace
fawkes {
35
class
MotorInterface;
36
}
37
38
class
ROSOdometryThread
39
:
public
fawkes::Thread
,
40
public
fawkes::BlockedTimingAspect
,
41
public
fawkes::LoggingAspect
,
42
public
fawkes::ConfigurableAspect
,
43
public
fawkes::BlackBoardAspect
,
44
public
fawkes::ROSAspect
45
{
46
public
:
47
ROSOdometryThread
();
48
49
virtual
void
init
();
50
virtual
void
loop
();
51
virtual
void
finalize
();
52
53
/** Stub to see name in backtrace for easier debugging. @see Thread::run() */
54
protected
:
virtual
void
run
() { Thread::run(); }
55
56
private
:
57
void
publish_odom();
58
59
private
:
60
fawkes::MotorInterface
*motor_if_;
61
ros::Publisher pub_;
62
std::string cfg_odom_frame_id_;
63
std::string cfg_base_frame_id_;
64
};
65
66
#endif
src
plugins
ros
odometry_thread.h
Generated by
1.8.3.1