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
31using namespace fawkes;
32
33/** Local odometry based path planning with collision avoidance.
34 * @author Bahram Maleki-Fard
35 */
37{
38public:
39 /** Constructor.
40 * @param config The fawkes configuration
41 */
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
57PLUGIN_DESCRIPTION("Local locomotion path planning with collision avoidance")
58EXPORT_PLUGIN(ColliPlugin)
This thread hooks onto Fawkes main loop at the ACT hook.
Definition: act_thread.h:52
Local odometry based path planning with collision avoidance.
ColliPlugin(Configuration *config)
Constructor.
Thread that performs the navigation and collision avoidance algorithms.
Definition: colli_thread.h:62
virtual void set_vis_thread(ColliVisualizationThread *vis_thread)
Set the visualization thread.
Interface for configuration handling.
Definition: config.h:68
Plugin interface class.
Definition: plugin.h:34
ThreadList thread_list
Thread list member.
Definition: plugin.h:53
Configuration * config
Fawkes configuration.
Definition: plugin.h:58
void push_back(Thread *thread)
Add thread to the end.
Fawkes library namespace.