{"id":369,"date":"2016-03-22T21:48:19","date_gmt":"2016-03-22T12:48:19","guid":{"rendered":"https:\/\/www.kdel.org\/wp\/?p=369"},"modified":"2016-03-22T23:04:53","modified_gmt":"2016-03-22T14:04:53","slug":"btr%e8%aa%b2%e9%a1%8c-fawkes-%e3%81%ae-plugin-%e3%82%92%e4%bd%9c%e3%81%a3%e3%81%a6%e3%81%bf%e3%81%be%e3%81%97%e3%82%87%e3%81%86%ef%bc%8e","status":"publish","type":"post","link":"https:\/\/www.kdel.org\/wp\/?p=369","title":{"rendered":"BTR\u8ab2\u984c : fawkes \u306e plugin \u3092\u4f5c\u3063\u3066\u307f\u307e\u3057\u3087\u3046\uff0e"},"content":{"rendered":"<div style=\"margin: 0em 0em -1em 0em;\">\u307e\u305a\uff0c~fawkes-robotino\/src\/plugin \u306e\u4e2d\u306b\u3042\u308bplugin_template \u3092btr_plugin_ex \u3068\u3057\u3066\u30b3\u30d4\u30fc\u3057\u307e\u3057\u3087\u3046\uff0e<\/div>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">cd ~\/fawkes-robotino\/src\/plugin\/\r\ncp -r plugin_template btr_plugin_ex<\/pre>\n<div style=\"margin: 0em 0em -1em 0em;\">Makefile \u306b\uff0c\u3053\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u60c5\u5831\u3092\u8ffd\u52a0\u3057\u307e\u3059\uff0e<br \/>\nSUBDIRS = &#8230; \u306e\u6240\u306b\u8ffd\u52a0\u3057\u307e\u3059\uff0ebtr_plugin_ex \u306e\u4e2d\u306e\u30d5\u30a1\u30a4\u30eb\u69cb\u6210\u3092\u5909\u66f4\u3057\u307e\u3059\uff0e\n<\/div>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\ncd btr_plugin_ex\r\nmv plugin_template_plugin.cpp btr_plugin_ex_plugin.cpp\r\nmv plugin_template_thread.cpp btr_plugin_ex_thread.cpp\r\nmv plugin_template_thread.h   btr_plugin_ex_thread.h<\/pre>\n<div style=\"margin: 0em 0em -1em 0em;\">btr_plugin_ex \u306e\u4e2d\u306emakefile \u3092\u4fee\u6b63\u3057\u307e\u3059\uff0e<br \/>\n\u3010\u4fee\u6b63\u524d\u3011<\/div>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nLIBS_plugin_template = m fawkescore fawkesutils fawkesaspects fawkesbaseapp \\\r\n                fawkesblackboard fawkesinterface MotorInterface\r\n...\r\nOBJS_plugin_template = plugin_template_plugin.o plugin_template_thread.o\r\n...\r\nPLUGINS_all = $(PLUGINDIR)\/plugin-template.$(SOEXT)\r\n...\r\nOBJS_all = $(OBJS_plugin_template)\r\n<\/pre>\n<div style=\"margin: 0em 0em -1em 0em;\">\u3010\u4fee\u6b63\u5f8c\u3011<\/div>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nLIBS_btr_plugin_ex = m fawkescore fawkesutils fawkesaspects fawkesbaseapp \\\r\n                fawkesblackboard fawkesinterface MotorInterface\r\n...\r\nOBJS_btr_plugin_ex = btr_plugin_ex_plugin.o btr_plugin_ex_thread.o\r\n...\r\nPLUGINS_all = $(PLUGINDIR)\/btr_plugin_ex.$(SOEXT)\r\n...\r\nOBJS_all = $(OBJS_btr_plugin_ex)\r\n<\/pre>\n<div style=\"margin: 0em 0em -1em 0em;\">btr_plugin_ex_thread.h \u306e\u4fee\u6b63\uff0e<br \/>\n\u3010\u4fee\u6b63\u524d\u3011<\/div>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n#ifndef __PLUGINS_PLUGIN_TEMPLATE_THREAD_H_\r\n#define __PLUGINS_PLUGIN_TEMPLATE_THREAD_H_\r\n...\r\nclass PluginTemplateThread\r\n...\r\n public:\r\n  PluginTemplateThread();\r\n<\/pre>\n<div style=\"margin: 0em 0em -1em 0em;\">\u3010\u4fee\u6b63\u5f8c\u3011<\/div>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n#ifndef __PLUGINS_BTR_PLUGIN_EX_THREAD_H_\r\n#define __PLUGINS_BTR_PLUGIN_EX_THREAD_H_\r\n...\r\nclass BTRPluginExThread\r\n...\r\n public:\r\n  BTRPluginExThread();\r\n<\/pre>\n<div style=\"margin: 0em 0em -1em 0em;\">btr_plugin_ex_thread.cpp \u306e\u4fee\u6b63\uff0e<br \/>\n\u3010\u4fee\u6b63\u524d\u3011<\/div>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n#include &quot;plugin_template_thread.h&quot;\r\n...\r\n\/** Constructor. *\/\r\nPluginTemplateThread::PluginTemplateThread() :\r\n                Thread(&quot;PluginTemplateThread&quot;, Thread::OPMODE_WAITFORWAKEUP), BlockedTimingAspect(\r\n                                BlockedTimingAspect::WAKEUP_HOOK_SKILL) {\r\n}\r\n...\r\nvoid PluginTemplateThread::init() {\r\n\r\n        logger-&gt;log_info(name(), &quot;Plugin Template starts up&quot;);\r\n        motor_if_ = blackboard-&gt;open_for_reading&lt;MotorInterface&gt;(&quot;Robotino&quot;);\r\n}\r\n...\r\nbool PluginTemplateThread::prepare_finalize_user() {\r\n...\r\nvoid PluginTemplateThread::finalize() {\r\n...\r\nvoid PluginTemplateThread::send_transrot(float vx, float vy, float omega) {\r\n...\r\nvoid PluginTemplateThread::stop() {\r\n...\r\nvoid PluginTemplateThread::loop() {\r\n...\r\n<\/pre>\n<div style=\"margin: 0em 0em -1em 0em;\">\u3010\u4fee\u6b63\u5f8c\u3011<\/div>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n#include &quot;btr_plugin_ex_thread.h&quot;\r\n...\r\n\/** Constructor. *\/\r\nBTRPluginExThread::BTRPluginExThread() :\r\n                Thread(&quot;BTRPluginExThread&quot;, Thread::OPMODE_WAITFORWAKEUP), BlockedTimingAspect(\r\n                                BlockedTimingAspect::WAKEUP_HOOK_SKILL) {\r\n}\r\n...\r\nvoid BTRPluginExThread::init() {\r\n\r\n        logger-&gt;log_info(name(), &quot;BTR Plugin Ex starts up&quot;);\r\n        motor_if_ = blackboard-&gt;open_for_reading&lt;MotorInterface&gt;(&quot;Robotino&quot;);\r\n}\r\n...\r\nbool BTRPluginExThread::prepare_finalize_user() {\r\n...\r\nvoid BTRPluginExThread::finalize() {\r\n...\r\nvoid BTRPluginExThread::send_transrot(float vx, float vy, float omega) {\r\n...\r\nvoid BTRPluginExThread::stop() {\r\n...\r\nvoid BTRPluginExThread::loop() {\r\n...\r\n<\/pre>\n<div style=\"margin: 0em 0em -1em 0em;\">btr_plugin_ex_plugin.cpp \u306e\u4fee\u6b63\uff0e<br \/>\n\u3010\u4fee\u6b63\u524d\u3011<\/div>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n#include &quot;plugin_template_thread.h&quot;\r\n...\r\nclass PluginTemplatePlugin : public fawkes::Plugin\r\n...\r\n  PluginTemplatePlugin(Configuration *config)\r\n...\r\n    thread_list.push_back(new PluginTemplateThread());\r\n...\r\nPLUGIN_DESCRIPTION(&quot;Plugin Template&quot;)\r\nEXPORT_PLUGIN(PluginTemplatePlugin)\r\n<\/pre>\n<div style=\"margin: 0em 0em -1em 0em;\">\u3010\u4fee\u6b63\u5f8c\u3011<\/div>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n#include &quot;btr_plugin_ex_thread.h&quot;\r\n...\r\nclass BTRPluginExPlugin : public fawkes::Plugin\r\n...\r\n  BTRPluginExPlugin(Configuration *config)\r\n...\r\n    thread_list.push_back(new BTRPluginExThread());\r\n...\r\nPLUGIN_DESCRIPTION(&quot;BTR Plugin Ex&quot;)\r\nEXPORT_PLUGIN(BTRPluginExPlugin)\r\n<\/pre>\n<div style=\"margin: 0em 0em -1em 0em;\">\u3068\u308a\u3042\u3048\u305a\uff0c\u3053\u308c\u3067\u30b3\u30f3\u30d1\u30a4\u30eb\u3067\u304d\u308b\u304b\u30c1\u30a7\u30c3\u30af\uff0e<\/div>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">make -j4 clean all gui<\/pre>\n<p>\u554f\u984c\u306a\u3051\u308c\u3070\uff0c\u901a\u308b\u306f\u305a\uff0e<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u307e\u305a\uff0c~fawkes-robotino\/src\/plugin \u306e\u4e2d\u306b\u3042\u308bplug &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"more-link\" href=\"https:\/\/www.kdel.org\/wp\/?p=369\"> <span class=\"screen-reader-text\">BTR\u8ab2\u984c : fawkes \u306e plugin \u3092\u4f5c\u3063\u3066\u307f\u307e\u3057\u3087\u3046\uff0e<\/span> \u7d9a\u304d\u3092\u8aad\u3080 &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_crdt_document":"","footnotes":""},"categories":[10,3,2,4],"tags":[],"class_list":["post-369","post","type-post","status-publish","format-standard","hentry","category-fawkes","category-logistics-league","category-robocup","category-winter-school-2015"],"_links":{"self":[{"href":"https:\/\/www.kdel.org\/wp\/index.php?rest_route=\/wp\/v2\/posts\/369","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.kdel.org\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.kdel.org\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.kdel.org\/wp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.kdel.org\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=369"}],"version-history":[{"count":8,"href":"https:\/\/www.kdel.org\/wp\/index.php?rest_route=\/wp\/v2\/posts\/369\/revisions"}],"predecessor-version":[{"id":377,"href":"https:\/\/www.kdel.org\/wp\/index.php?rest_route=\/wp\/v2\/posts\/369\/revisions\/377"}],"wp:attachment":[{"href":"https:\/\/www.kdel.org\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=369"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.kdel.org\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=369"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.kdel.org\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=369"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}