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
navigator_thread.h
1
2
/***************************************************************************
3
* navigator_thread.h - Robotino ROS Navigator Thread
4
*
5
* Created: Sat June 09 15:13:27 2012
6
* Copyright 2012 Sebastian Reuter
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 __ROS_NAVIGATOR_THREAD_H_
23
#define __ROS_NAVIGATOR_THREAD_H_
24
25
#include <core/threading/thread.h>
26
#include <aspect/blocked_timing.h>
27
#include <aspect/logging.h>
28
#include <aspect/blackboard.h>
29
#include <aspect/configurable.h>
30
31
#include <interfaces/NavigatorInterface.h>
32
33
#include <tf/types.h>
34
#include <math.h>
35
#include <ros/ros.h>
36
#include <move_base_msgs/MoveBaseAction.h>
37
#include <move_base_msgs/MoveBaseGoal.h>
38
#include <move_base_msgs/MoveBaseActionGoal.h>
39
#include <actionlib/client/simple_action_client.h>
40
41
namespace
fawkes {
42
class
NavigatorInterface;
43
}
44
45
class
RosNavigatorThread
46
:
public
fawkes::Thread
,
47
public
fawkes::BlockedTimingAspect
,
48
public
fawkes::LoggingAspect
,
49
public
fawkes::BlackBoardAspect
,
50
public
fawkes::ConfigurableAspect
51
{
52
public
:
53
RosNavigatorThread
();
54
55
/* thread */
56
virtual
void
init
();
57
virtual
void
finalize
();
58
virtual
void
loop
();
59
60
private
:
61
void
check_status();
62
void
send_goal();
63
64
private
:
65
typedef
actionlib::SimpleActionClient<move_base_msgs::MoveBaseAction> MoveBaseClient;
66
67
fawkes::NavigatorInterface
*nav_if_;
68
MoveBaseClient *ac_;
69
move_base_msgs::MoveBaseGoal goal_;
70
bool
cmd_sent_;
71
bool
connected_history_;
72
};
73
74
#endif
/* __ROS_NAVIGATOR_THREAD_H_ */
src
plugins
ros
navigator_thread.h
Generated by
1.8.1.1