Fawkes API  Fawkes Development Version
gazsim_vis_localization_thread.h
1 /***************************************************************************
2  * gazsim_vis_localization_thread.h - Plugin visualizes the localization
3  *
4  * Created: Tue Sep 17 15:36:25 2013
5  * Copyright 2013 Frederik Zwilling
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_GAZSIM_VIS_LOCALIZATION_THREAD_H_
22 #define _PLUGINS_GAZSIM_VIS_LOCALIZATION_THREAD_H_
23 
24 #include <aspect/blackboard.h>
25 #include <aspect/blocked_timing.h>
26 #include <aspect/clock.h>
27 #include <aspect/configurable.h>
28 #include <aspect/logging.h>
29 #include <core/threading/thread.h>
30 #include <plugins/gazebo/aspect/gazebo.h>
31 #include <utils/time/clock.h>
32 #include <utils/time/time.h>
33 
34 #include <string.h>
35 
36 //from Gazebo
37 #include <gazebo/msgs/MessageTypes.hh>
38 #include <gazebo/transport/TransportTypes.hh>
39 #include <gazebo/transport/transport.hh>
40 
41 namespace fawkes {
42 class Position3DInterface;
43 }
44 
46  public fawkes::ClockAspect,
47  public fawkes::LoggingAspect,
52 {
53 public:
55 
56  virtual void init();
57  virtual void loop();
58  virtual void finalize();
59 
60 private:
61  //read pose interface
63 
64  //Publisher for visual msgs
65  gazebo::transport::PublisherPtr visual_publisher_;
66 
67  double update_rate_;
68  fawkes::Time last_update_time_;
69 
70  //config values
71  std::string robot_name_, label_script_name_, location_scripts_, location_textures_, parent_name_,
72  arrow_script_name_;
73  float label_size_;
74  float label_height_;
75 };
76 #endif
VisLocalizationThread::VisLocalizationThread
VisLocalizationThread()
Constructor.
Definition: gazsim_vis_localization_thread.cpp:43
fawkes::GazeboAspect
Definition: gazebo.h:42
fawkes::BlockedTimingAspect
Definition: blocked_timing.h:56
VisLocalizationThread::finalize
virtual void finalize()
Finalize the thread.
Definition: gazsim_vis_localization_thread.cpp:75
VisLocalizationThread::init
virtual void init()
Initialize the thread.
Definition: gazsim_vis_localization_thread.cpp:50
fawkes::BlackBoardAspect
Definition: blackboard.h:38
fawkes
fawkes::LoggingAspect
Definition: logging.h:38
fawkes::Time
Definition: time.h:98
VisLocalizationThread::loop
virtual void loop()
Code to execute in the thread.
Definition: gazsim_vis_localization_thread.cpp:81
fawkes::Thread
Definition: thread.h:45
fawkes::Position3DInterface
Definition: Position3DInterface.h:39
fawkes::ConfigurableAspect
Definition: configurable.h:38
fawkes::ClockAspect
Definition: clock.h:40
VisLocalizationThread
Definition: gazsim_vis_localization_thread.h:45