{"id":371,"date":"2019-10-13T09:37:26","date_gmt":"2019-10-13T01:37:26","guid":{"rendered":"http:\/\/www.mustenaka.cn\/?p=371"},"modified":"2019-10-13T14:44:48","modified_gmt":"2019-10-13T06:44:48","slug":"ros_lesson02","status":"publish","type":"post","link":"https:\/\/www.mustenaka.cn\/index.php\/2019\/10\/13\/ros_lesson02\/","title":{"rendered":"ROS lesson2"},"content":{"rendered":"<p>\u56de\u987e\u8c03\u53c2\u6570<\/p>\n<p>rqt\u53c2\u6570\u6c38\u4e45\u4fdd\u5b58-\u4fdd\u5b58\u4f4d\u7f6e\u6253\u5f00\uff1a<\/p>\n<pre class=\"pure-highlightjs\"><code class=\"\" null=\"\">roscd bobac2_navigation\/param\/<\/code><\/pre>\n<p><!--more--><\/p>\n<p>\u6253\u5f00rqt\uff0c\u6253\u5f00move_base_node\u4e2d\u7684DWAPlannerROS<\/p>\n<blockquote><p>occdist_scale\u00a0 \u907f\u969c\u6b32\u671b \u5efa\u8bae\u53c2\u6570 0.4~0.5 \uff08\u5dee\u522b\u4e0d\u5927\uff09<\/p>\n<p>path_distance_bias \u5168\u5c40\u8def\u7ebf #\u5224\u65ad\u4e0e\u5230\u8ddd\u79bb\u4e4b\u95f4\u7684\u8def\u5f84\u6700\u4f18\u9009\u62e9\u4f55\u79cd 100<\/p>\n<p>goal_distance_bias \u5c40\u90e8\u8def\u7ebf #\u6ce8\u610f\u4e24\u8005\u4e4b\u95f4\u5dee\u503c\u00a0 \u5efa\u8bae\u53c2\u6570 24\uff5e30<\/p>\n<p>sim_time\u00a0 \u601d\u8003\u65f6\u95f4 1.7(\u4e0d\u8981\u8c03\u592a\u5927)<\/p>\n<p>&nbsp;<\/p>\n<p>\u53e6\u5916\u8981\u6ce8\u610f\uff1a\u901f\u5ea6\uff0c\u52a0\u901f\u5ea6 \u8fd9\u4e24\u4e2a\u53c2\u6570\u4e5f\u5f88\u91cd\u8981<\/p>\n<p>max_vel_x<\/p>\n<p>max_vel_y \u8fd9\u4e24\u4e2a\u503c\u592a\u5c0f\u4e86\u4e5f\u4e0d\u884c\uff0c\u4f1a\u8dd1\u5230\u5899\u9762\u518d\u8f6c\u56de<\/p><\/blockquote>\n<p>DWA\u53c2\u6570\u7684\u5728DWA\u6587\u4ef6<\/p>\n<p>\u6ce8\u610f\u5b89refresh\u5237\u65b0<\/p>\n<pre class=\"pure-highlightjs\"><code class=\"\" null=\"\">#\u6e05\u9664\u4e34\u65f6\u969c\u788d\u7269\r\nrosservice call \/move_base_node\/clear_costmaps<\/code><\/pre>\n<p>\u5176\u4f59\u7684\u7b14\u8bb0<\/p>\n<blockquote><p>\u4e3b\u8981\u6539gazeb\u548ckinrct\u548cmove\u7684DWAPlanneros<br \/>\n\uff08DWAPlanneros\uff1a\u8fd9\u4e2a\u8c03\u53c2\u6bd4\u8f83\u591a\uff09<br \/>\nDWAPlanneros\uff1a<br \/>\n1\u5e73\u5747\u901f\u5ea6<br \/>\nass lim\u00a0 x\uff1a\u52a0\u901f\u5ea6<br \/>\nxy goal tolerance\uff1axy\u7684\u534a\u5f84\u8bef\u5dee\uff08\u5230\u8fbe\u76ee\u7684\u5730\u7684\u8bef\u5dee\uff09<br \/>\nyaw goal tolerance\uff1a\u89d2\u5ea6\u8bef\u5dee\uff08\u76f8\u5f53\u4e8e\u8f6c\u5f2f\u7684\u534a\u5f84\u5927\u5c0f\uff0c\u5f27\u5ea6\uff09<br \/>\ntrans stopped vel\uff1a\u5e73\u79fb\u505c\u6b62\u7684\u901f\u5ea6\uff08\u4e00\u822c0.2\uff09<br \/>\nrot stopped vel \uff1a\u8f6c\u5f2f\u505c\u6b62\u7684\u901f\u5ea6\uff08\u4e00\u822c0.3\uff09<br \/>\nsim time\uff1a\u8ba1\u7b97\u65f6\u95f4\uff081.5\u8f6c\u5f2f\u6bd4\u8f83\u5feb~4\u5c31\u662f\u8f6c\u5f2f\u5f27\u5ea6\u5b89\u5168\u5706\u6ed1\u3002\u4e00\u822c\u8c031.7\u5de6\u53f3\uff09<br \/>\npath drstance bias\uff1b\u5168\u5c40\u8def\u7ebf<br \/>\ngoal drstance bias \uff1a\u5c40\u90e8\u8def\u7ebf\uff08\u4e0a\u4e0b\u8fd9\u4e24\u4e2a\u76f8\u4e92\u5f71\u54cd\uff09<br \/>\noccdist scale\uff1a\u907f\u969c\u6b32\u671b\uff080.1\uff09<\/p><\/blockquote>\n<p><!--more--><\/p>\n<h1><strong>\u97f3\u9891\u4e0e\u64ad\u62a5\u5bfc\u822a\u5904\u7406\uff08\u7eed\uff09<\/strong><code class=\"\" json=\"\"><\/code><\/h1>\n<h1>\uff01\uff01\uff01<strong>\u91cd\u65b0\u6574\u7406<\/strong>\uff01\uff01\uff01\uff1a\u300b<\/h1>\n<p>\u4e24\u4e2a\u601d\u8def\u8fc7\u7a0b\uff0c1\u662f\u5f00\u542f\u8bed\u97f3\u6a21\u5757\u5e76\u83b7\u53d6\u5230\u9700\u8981\u64ad\u62a5\u7684\u4f4d\u7f6e\u5750\u6807\uff0c2\u662f\u4fee\u6539\u83b7\u53d6\u7684\u53c2\u6570\u91cd\u65b0\u8fd0\u884c<\/p>\n<p><strong>\u9996\u5148\u8001\u6837\u5b50\u9700\u8981\u5148\u6253\u5f00\u8f6f\u4ef6\uff08<em>\u5168\u7a0b\u6253\u5f00\uff01<\/em>\uff09<\/strong><\/p>\n<pre class=\"pure-highlightjs\"><code class=\"\" null=\"\">#\u6253\u5f00\u8f6f\u4ef6\r\nroslaunch bobac2_navigation demo_nav_2d.launch<\/code><\/pre>\n<h3>\u8fd0\u884c\u8bed\u97f3\u64ad\u62a5\uff1a<\/h3>\n<p>\u8fd0\u884c\u64ad\u62a5\u4ee5\u53ca\u8bed\u97f3\u6a21\u5757\u9700\u8981\u5f00\u542f\u5982\u4e0b\u547d\u4ee4\uff1a<\/p>\n<pre class=\"pure-highlightjs\"><code class=\"\" null=\"\">#\u9700\u8981\u7f51\u7edc\uff0c\u8bbf\u95ee\u8fc5\u98de\uff0c\u8fd9\u662f\u4e00\u4e2a\u670d\u52a1\uff0c\u9700\u8981\u8fdb\u884c\u8bf7\u6c42\r\nroslaunch match_demo match_demo.launch\r\n#\u5728\u6253\u5f00\u4e00\u4e2a\u7ec8\u7aef\r\nrosservice call \/match_start \"start: true\"\r\n#\u591a\u5f00\u7528\uff08\u76f4\u63a5\u5f00\u542f\u8bed\u97f3\u52a9\u624b\u6a21\u5757\uff09\r\nroslaunch voice_integrated_application voice_integrated_application.launch<\/code><\/pre>\n<p>\u6ce8\u610f\uff0c\u5982\u679c\u51fa\u73b0\u62a5\u9519 QTTSAudioGet failed, error code: 10407. \u5219\u8bf4\u660eAPPID\u4e0elibs\u7684\u8fde\u63a5\u6587\u4ef6\u65e0\u6cd5\u5bf9\u5e94\uff0c\u9700\u8981\u4ece\u8fc5\u98de\u52a9\u624b\u4e2d\u518d\u5ea6\u5c06libs\u4e0b\u7684libmsc.so\u6587\u4ef6\u7ed9\u53d6\u51fa\uff0c\u5bf9\u9879\u76ee\u4e2d\u6240\u9700\u8981\u6a21\u5757\u7684libs\u6587\u4ef6\u8fdb\u884c\u66ff\u6362<\/p>\n<h3>\u8fdb\u884c\u64ad\u62a5\u8bed\u97f3\u5750\u6807\u4f4d\u7f6e\u4fee\u6539\uff1a<\/h3>\n<p>\u9996\u5148\u6253\u5f00\u6587\u4ef6\u5939\uff0c\u627e\u5230<\/p>\n<pre class=\"pure-highlightjs\"><code class=\"\" null=\"\">#\u6253\u5f00\u9700\u8981\u4fee\u6539\u7684\u6587\u4ef6\r\n~\/bobac2_ws\/src\/bobac2-master\/bobac2_audio\/voice_nav\/config\/voice_nav\/position_info.txt\r\n\r\n#\u83b7\u53d6\u5f53\u524d\u5750\u6807\u4f4d\u7f6e\uff1a\r\nrostopic echo \/amcl_pose <\/code><\/pre>\n<p>\u6587\u4ef6\u4e2d\u7684\u4f4d\u7f6e\u6570\u636e\u901a\u8fc7\u4e8c\u7ef4\u6570\u7ec4\u8fdb\u884c\u5b58\u50a8\uff0c\u6bcf\u4e00\u884c\u4e2d\u7684\u6570\u636e\u5185\u5bb9\u6709\uff1a<\/p>\n<ul>\n<li>\u4f4d\u7f6e\u5750\u6807(position) x y z\uff0c\u5176\u4e2d\u56e0\u4e3a\u6ca1\u6709\u9ad8\u5ea6\u6240\u4ee5z\u56fa\u5b9a\u4e3a0<\/li>\n<li>\u65b9\u5411\uff08orientation\uff09x y z w \uff0c\u5176\u4e2d\u56e0\u4e3axy\u4e3a0\u503c\uff0c\u56e0\u6b64\u6838\u5fc3\u4fee\u6539\u4e3azw\u5750\u6807<\/li>\n<\/ul>\n<p>\u83b7\u53d6\u7684\u6570\u636e\u5185\u5bb9\u6709\uff1a<\/p>\n<pre class=\"pure-highlightjs\"><code class=\"\" json=\"\">header: \r\n  seq: 149\r\n  stamp: \r\n    secs: 395\r\n    nsecs: 563000000\r\n  frame_id: \"map\"\r\npose: \r\n  pose: \r\n    position: \r\n      x: -0.0962459325388\t#=============#\r\n      y: 0.0275780254311\t#=============#\r\n      z: 0.0\r\n    orientation: \r\n      x: 0.0\r\n      y: 0.0\r\n      z: -0.182542539963\t#=============#\r\n      w: 0.983197956214\t\t#=============#\r\n  covariance: [0.006574169390090938, -0.0009474390923510261, 0.0, 0.0, 0.0, 0.0, -0.000947439092351027, 0.009094770685125932, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.00230069321889966]\r\n---<\/code><\/pre>\n<p>\u6838\u5fc3\u9700\u8981\u83b7\u53d6\u7684\u5185\u5bb9\u4e3a\u6807\u6ce8\u4e86 <code class=\"\" json=\"\">#=============#<\/code> \u7684\u6587\u4ef6\uff0c\u8bb0\u5f97\u6ce8\u610f\u5c0f\u6570\u70b9\uff0c\u4e0d\u8981\u592a\u957f<\/p>\n<h3>\u97f3\u9891\u6587\u4ef6\u4fee\u6539\uff1a<\/h3>\n<p>\u4fee\u6539\u5524\u9192\u8bcd\uff1a<\/p>\n<pre class=\"pure-highlightjs\"><code class=\"\" null=\"\">#\u6253\u5f00\u6587\u4ef6\u5939\r\ncd ~\/bobac2_ws\/src\/bobac2-master\/bobac2_audio\/awake\/launch\r\n#\u7f16\u8f91\u6587\u4ef6\r\nvim awake.launch\r\n#\u6216\u8005\u4f7f\u7528gedit\u7f16\u8f91\u5668\r\ngedit awake.launch<\/code><\/pre>\n<p>\u7f16\u8f91\u8bed\u97f3\u6587\u4ef6\uff0c\u76f4\u63a5\u6253\u5f00\u6587\u4ef6\u5939\uff0c\u5bf9\u4e0b\u9762\u7684\u97f3\u9891\u6587\u4ef6\u8fdb\u884c\u66ff\u6362\u5373\u53ef\uff08\u540d\u5b57\u76f8\u540c\uff09<\/p>\n<pre class=\"pure-highlightjs\"><code class=\"\" null=\"\">#\u6253\u5f00\u6587\u4ef6\u5939\r\ncd ~\/bobac2_ws\/src\/bobac2-master\/bobac2_audio\/ifly_package\/config\/source\/AIUI\/audio<\/code><\/pre>\n<p>\u7f16\u8f91\u8bed\u97f3\u64ad\u62a5\u987a\u5e8f\uff1a<\/p>\n<pre class=\"pure-highlightjs\"><code class=\"\" null=\"\">#\u6253\u5f00\u6587\u4ef6\u5939\r\ncd  ~\/bobac2_ws\/src\/bobac2-master\/match_demo\/launch\r\n#\u7f16\u8f91\u6587\u4ef6\r\nvim match_demo.launch\r\n#\u6216\u8005\u4f7f\u7528gedit\u7f16\u8f91\u5668\r\ngedit match_demo.launch<\/code><\/pre>\n<p>\u987a\u5e8f\u89e3\u91ca\uff08\u6253\u5f00launch\u6587\u4ef6\u540e\uff0c\u663e\u793a\u5185\u5bb9\u5982\u4e0b\uff09\uff1a<\/p>\n<pre class=\"pure-highlightjs\"><code class=\"\" null=\"\">&lt;launch&gt;\r\n  &lt;node name=\"match_demo\" pkg=\"match_demo\" type=\"match_demo_node\" output=\"screen\"&gt;\r\n    &lt;param name=\"first\" type=\"int\" value=\"1\"\/&gt;\r\n    &lt;param name=\"second\" type=\"int\" value=\"2\"\/&gt;\r\n    &lt;param name=\"third\" type=\"int\" value=\"3\"\/&gt;\r\n    &lt;param name=\"fourth\" type=\"int\" value=\"4\"\/&gt;\r\n    &lt;param name=\"fifth\" type=\"int\" value=\"5\"\/&gt;\r\n  &lt;\/node&gt;\r\n&lt;\/launch&gt;<\/code><\/pre>\n<p>\u4e0e\u4ed6\u5bf9\u4e8e\u7684\u6587\u4ef6\u4e3a~\/bobac2_ws\/src\/bobac2-master\/match_demo\/src\/match_demo.cpp \uff1a<\/p>\n<pre class=\"pure-highlightjs\"><code class=\"\" cpp=\"\">        switch(num[i]){\r\n          case 1:\r\n            system(\"aplay .\/source\/AIUI\/audio\/shanghai.wav\");\r\n            break;\r\n          case 2:\r\n            system(\"aplay .\/source\/AIUI\/audio\/beijing.wav\");\r\n            break;\r\n          case 3:\r\n            system(\"aplay .\/source\/AIUI\/audio\/tianjin.wav\");\r\n            break;\r\n          case 4:\r\n            system(\"aplay .\/source\/AIUI\/audio\/shenzhen.wav\");\r\n            break;\r\n          case 5:\r\n            system(\"aplay .\/source\/AIUI\/audio\/guangzhou.wav\");\r\n            break;\r\n        }<\/code><\/pre>\n<p>\u5927\u6982\u8fd9\u4e2a\u4f4d\u7f6e\uff0c\u5bf9\u5e94\u7684\u662f\u97f3\u9891\u6587\u4ef6\u4e0e\u6253\u5f00\u65b9\u5f0f<\/p>\n<p>&nbsp;<\/p>\n<h3>\u97f3\u9891\u4ee3\u7801\u51c6\u5907\uff1a\u66ff\u6362\u9879\u76ee\u6587\u4ef6\u4e3a\u81ea\u5df1\u7684appid<\/h3>\n<p>\u4fee\u6539\u8bed\u97f3\uff1a\u627e\u5230\u8bed\u97f3\u5305\uff0c\u627e\u5230230\u884c\uff0cAPPID\u590d\u5236\u4e0b\u6765\uff0c\u4e3b\u8981\u662f\u4e09\u4e2a\u5305<\/p>\n<ol>\n<li>awake\uff08\u5524\u9192\u6a21\u5757\uff0921\u884c<\/li>\n<li>voice_nav.cpp \uff08\u8bed\u97f3\u8bc6\u522b\uff0965\u884c<\/li>\n<li>tts_test.cpp\uff08\u8bed\u97f3\u64ad\u62a5\uff0939\u884c<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<h1>\u6ce8\u610f\u7f16\u8bd1\u539f\u5219<\/h1>\n<p>\u5f53\u4fee\u6539\u4e86.c\u6216\u8005.cpp\u6587\u4ef6\u8fd9\u6837\u7684\u4e1c\u897f\u65f6\u5019\u9700\u8981\u91cd\u65b0\u7f16\u8bd1\uff0c\u53ea\u662f\u4fee\u6539launch\u662f\u4e0d\u9700\u8981\u91cd\u65b0\u7f16\u8bd1\u7684\uff08\u4e5f\u5c31\u662f\u8bf4\u4fee\u6539\u4e86appid\u9700\u8981\u91cd\u65b0\u7f16\u8bd1\uff09<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u56de\u987e\u8c03\u53c2\u6570 rqt\u53c2\u6570\u6c38\u4e45\u4fdd\u5b58-\u4fdd\u5b58\u4f4d\u7f6e\u6253\u5f00\uff1a roscd bobac2_navigation\/pa [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10,32,4],"tags":[12,7,56,57],"class_list":["post-371","post","type-post","status-publish","format-standard","hentry","category-ai","category-cpp","category-linux","tag-ai","tag-linux","tag-robot","tag-ros"],"views":1777,"_links":{"self":[{"href":"https:\/\/www.mustenaka.cn\/index.php\/wp-json\/wp\/v2\/posts\/371","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mustenaka.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.mustenaka.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.mustenaka.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mustenaka.cn\/index.php\/wp-json\/wp\/v2\/comments?post=371"}],"version-history":[{"count":15,"href":"https:\/\/www.mustenaka.cn\/index.php\/wp-json\/wp\/v2\/posts\/371\/revisions"}],"predecessor-version":[{"id":386,"href":"https:\/\/www.mustenaka.cn\/index.php\/wp-json\/wp\/v2\/posts\/371\/revisions\/386"}],"wp:attachment":[{"href":"https:\/\/www.mustenaka.cn\/index.php\/wp-json\/wp\/v2\/media?parent=371"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.mustenaka.cn\/index.php\/wp-json\/wp\/v2\/categories?post=371"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.mustenaka.cn\/index.php\/wp-json\/wp\/v2\/tags?post=371"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}