Fawkes API  Fawkes Development Version
colli_plugin.cpp
1 
2 /***************************************************************************
3  * colli_plugin.cpp - Fawkes Colli Plugin
4  *
5  * Created: Wed Oct 16 18:00:00 2013
6  * Copyright 2013 Bahram Maleki-Fard
7  *
8  ****************************************************************************/
9 
10 /* This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 2 of the License, or
13  * (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  * GNU Library General Public License for more details.
19  *
20  * Read the full text in the LICENSE.GPL file in the doc directory.
21  */
22 
23 #include "act_thread.h"
24 #include "colli_thread.h"
25 #ifdef HAVE_VISUAL_DEBUGGING
26 # include "visualization_thread.h"
27 #endif
28 
29 #include <core/plugin.h>
30 
31 using namespace fawkes;
32 
33 /** Local odometry based path planning with collision avoidance.
34  * @author Bahram Maleki-Fard
35  */
37 {
38 public:
39  /** Constructor.
40  * @param config The fawkes configuration
41  */
42  explicit ColliPlugin(Configuration *config) : Plugin(config)
43  {
44  ColliThread *colli_thread = new ColliThread();
45  thread_list.push_back(colli_thread);
46 
47  thread_list.push_back(new ColliActThread(colli_thread));
48 
49 #ifdef HAVE_VISUAL_DEBUGGING
50  ColliVisualizationThread *vis_thread = new ColliVisualizationThread();
51  thread_list.push_back(vis_thread);
52  colli_thread->set_vis_thread(vis_thread);
53 #endif
54  }
55 };
56 
57 PLUGIN_DESCRIPTION("Local locomotion path planning with collision avoidance")
58 EXPORT_PLUGIN(ColliPlugin)
ColliPlugin(Configuration *config)
Constructor.
Plugin interface class.
Definition: plugin.h:33
Fawkes library namespace.
This thread hooks onto Fawkes main loop at the ACT hook.
Definition: act_thread.h:46
virtual void set_vis_thread(ColliVisualizationThread *vis_thread)
Set the visualization thread.
Thread that performs the navigation and collision avoidance algorithms.
Definition: colli_thread.h:56
Local odometry based path planning with collision avoidance.
Interface for configuration handling.
Definition: config.h:64