{"id":22287,"date":"2025-04-19T05:42:44","date_gmt":"2025-04-18T21:42:44","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/22287.html"},"modified":"2025-04-19T05:42:44","modified_gmt":"2025-04-18T21:42:44","slug":"1-1-beginner-level%e5%ad%a6%e4%b9%a0%e4%b9%8b%e7%bc%96%e5%86%99%e7%ae%80%e5%8d%95%e7%9a%84%e5%8f%91%e5%b8%83%e6%9c%8d%e5%8a%a1%e5%99%a8%e5%92%8c%e8%ae%a2%e9%98%85%e6%9c%8d%e5%8a%a1%e5%99%a8","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/22287.html","title":{"rendered":"1.1 Beginner Level\u5b66\u4e60\u4e4b\u201c\u7f16\u5199\u7b80\u5355\u7684\u53d1\u5e03\u670d\u52a1\u5668\u548c\u8ba2\u9605\u670d\u52a1\u5668\u201d\uff08\u7b2c\u5341\u4e8c\u8282\uff09"},"content":{"rendered":"<p style=\"margin-left:.0001pt;text-align:justify\">\u5b66\u4e60\u5927\u7eb2&#xff1a;<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"862\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418214242-6802c75201aa9.png\" width=\"692\" \/><\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">1. \u7f16\u5199\u53d1\u5e03\u670d\u52a1\u5668\u8282\u70b9<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">\u5728ROS\u4e2d&#xff0c;**\u8282\u70b9&#xff08;Node&#xff09;**\u662f\u4e0eROS\u7f51\u7edc\u901a\u4fe1\u7684\u57fa\u672c\u5355\u4f4d\u3002\u5728\u8fd9\u4e2a\u90e8\u5206&#xff0c;\u6211\u4eec\u5c06\u521b\u5efa\u4e00\u4e2a\u7b80\u5355\u7684\u53d1\u5e03\u8282\u70b9&#xff08;talker&#xff09;&#xff0c;\u5b83\u4f1a\u4e0d\u65ad\u5411\u8bdd\u9898&#xff08;topic&#xff09;\u5e7f\u64ad\u6d88\u606f\u3002<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">\u521b\u5efaROS\u5305<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">\u9996\u5148&#xff0c;\u6211\u8981\u786e\u4fdd\u6211\u7684\u5de5\u4f5c\u7a7a\u95f4\u7ed3\u6784\u6b63\u786e\u3002\u6211\u521b\u5efa\u7684\u5de5\u4f5c\u7a7a\u95f4\u5728~\/catkin_ws\u76ee\u5f55\u4e0b&#xff0c;\u6240\u4ee5\u6211\u9700\u8981\u5148\u521b\u5efabeginner_tutorials\u5305&#xff1a;<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">cd ~\/catkin_ws\/src<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">catkin_create_pkg beginner_tutorials std_msgs rospy roscpp<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"180\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418214242-6802c7522a544.png\" width=\"692\" \/><\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">\u7f16\u5199\u53d1\u5e03\u8282\u70b9<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">\u63a5\u4e0b\u6765&#xff0c;\u6211\u4eec\u8fdb\u5165beginner_tutorials\u5305\u5e76\u521b\u5efa\u4e00\u4e2ascripts\u76ee\u5f55\u6765\u5b58\u653ePython\u811a\u672c&#xff1a;<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">cd ~\/catkin_ws\/src\/beginner_tutorials<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">mkdir scripts<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">cd scripts<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"82\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418214242-6802c75247949.png\" width=\"692\" \/><\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">\u7136\u540e&#xff0c;\u6211\u4e0b\u8f7d\u793a\u4f8b\u4ee3\u7801\u6587\u4ef6talker.py\u5e76\u5c06\u5176\u8bbe\u4e3a\u53ef\u6267\u884c&#xff1a;<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">wget<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">\u200b\u200b\u200b\u200b\u200b\u200bhttps:\/\/raw.github.com\/ros\/ros_tutorials\/kinetic-devel\/rospy_tutorials\/001_talker_listener\/talker.py<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"304\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418214242-6802c752619c2.png\" width=\"511\" \/><\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">chmod &#043;x talker.py<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"501\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418214242-6802c752810a3.png\" width=\"692\" \/><\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">\u4ee3\u7801\u89e3\u91ca<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">#!\/usr\/bin\/env python&#xff1a;<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">\u786e\u4fddPython\u89e3\u91ca\u5668\u6267\u884c\u8be5\u811a\u672c\u3002<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">\u5bfc\u5165ROS\u6a21\u5757&#xff1a;\u6211\u4eec\u9700\u8981rospy\u6a21\u5757\u6765\u7f16\u5199ROS\u8282\u70b9&#xff0c;\u540c\u65f6\u9700\u8981String\u6d88\u606f\u7c7b\u578b\u6765\u53d1\u5e03\u5b57\u7b26\u4e32\u6d88\u606f\u3002<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">\u521b\u5efa\u53d1\u5e03\u8005&#xff1a;<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"72\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418214242-6802c752a3b30.png\" width=\"656\" \/><\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">Publisher()\u58f0\u660e\u4e86\u8be5\u8282\u70b9\u4f1a\u53d1\u5e03\u6d88\u606f\u5230\u540d\u4e3achatter\u7684\u8bdd\u9898\u4e0a\u3002<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">init_node()\u521d\u59cb\u5316\u8282\u70b9&#xff0c;\u5e76\u8bbe\u7f6e\u540d\u79f0\u4e3atalker\u3002<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">anonymous&#061;True\u786e\u4fdd\u6bcf\u6b21\u8fd0\u884c\u7684\u8282\u70b9\u540d\u552f\u4e00\u3002<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">\u5faa\u73af\u53d1\u5e03\u6d88\u606f&#xff1a;<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"141\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418214242-6802c752bc1b3.png\" width=\"692\" \/><\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">\u8fd9\u4e2a\u5faa\u73af\u4f1a\u6bcf\u79d210\u6b21\u53d1\u5e03\u6d88\u606f&#xff0c;\u76f4\u5230\u8282\u70b9\u5173\u95ed\u3002<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">2. \u5199\u5165\u8ba2\u9605\u8282\u70b9<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">\u63a5\u4e0b\u6765&#xff0c;\u6211\u4f1a\u521b\u5efa\u4e00\u4e2a\u7b80\u5355\u7684**\u8ba2\u9605\u8282\u70b9&#xff08;listener&#xff09;**\u6765\u63a5\u6536\u53d1\u5e03\u8282\u70b9\u53d1\u9001\u7684\u6d88\u606f\u3002<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">\u8fdb\u5165scripts\u76ee\u5f55\u5e76\u4e0b\u8f7dlistener.py\u4ee3\u7801&#xff1a;<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">cd ~\/catkin_ws\/src\/beginner_tutorials\/scripts<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">wget https:\/\/raw.github.com\/ros\/ros_tutorials\/kinetic-devel\/rospy_tutorials\/001_talker_listener\/listener.py<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">chmod &#043;x listener.py<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"347\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418214242-6802c752d593a.png\" width=\"692\" \/><\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">\u4ee3\u7801\u89e3\u91ca<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">\u521b\u5efa\u8ba2\u9605\u8282\u70b9&#xff1a;<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"78\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418214243-6802c75300c1b.png\" width=\"692\" \/><\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">\u8fd9\u4e2a\u8282\u70b9\u8ba2\u9605\u4e86chatter\u8bdd\u9898&#xff0c;\u5e76\u8c03\u7528\u56de\u8c03\u51fd\u6570callback()\u6765\u5904\u7406\u63a5\u6536\u5230\u7684\u6d88\u606f\u3002<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">\u56de\u8c03\u51fd\u6570\u5904\u7406\u6d88\u606f&#xff1a;<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"74\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418214243-6802c75319025.png\" width=\"692\" \/><\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">\u5f53\u63a5\u6536\u5230\u6d88\u606f\u65f6&#xff0c;callback()\u4f1a\u6253\u5370\u6d88\u606f\u5185\u5bb9\u3002<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">\n<p style=\"margin-left:.0001pt;text-align:justify\">\u4fdd\u6301\u8282\u70b9\u8fd0\u884c&#xff1a;rospy.spin()<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">\u8be5\u51fd\u6570\u4f1a\u4fdd\u6301\u8282\u70b9\u8fd0\u884c&#xff0c;\u76f4\u5230\u8282\u70b9\u88ab\u624b\u52a8\u5173\u95ed\u3002<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">3. \u6784\u5efa\u5e76\u8fd0\u884c\u8282\u70b9<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">\u7f16\u8bd1ROS\u5de5\u4f5c\u7a7a\u95f4<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">\u6211\u4eec\u9700\u8981\u56de\u5230\u5de5\u4f5c\u7a7a\u95f4\u7684\u6839\u76ee\u5f55\u5e76\u8fd0\u884ccatkin_make\u6765\u6784\u5efa\u5de5\u4f5c\u7a7a\u95f4&#xff1a;<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">cd ~\/catkin_ws<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">catkin_make<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">\u7136\u540e\u5237\u65b0\u73af\u5883&#xff1a;source devel\/setup.bash<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">\u8fd0\u884c\u53d1\u5e03\u8282\u70b9\u548c\u8ba2\u9605\u8282\u70b9<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">\u5728\u4e24\u4e2a\u7ec8\u7aef\u7a97\u53e3\u4e2d\u5206\u522b\u8fd0\u884c\u53d1\u5e03\u548c\u8ba2\u9605\u8282\u70b9&#xff1a;<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">\u7ec8\u7aef 1&#xff08;\u8fd0\u884c\u53d1\u5e03\u8282\u70b9&#xff09;&#xff1a;rosrun beginner_tutorials talker.py<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">\u7ec8\u7aef 2&#xff08;\u8fd0\u884c\u8ba2\u9605\u8282\u70b9&#xff09;&#xff1a;rosrun beginner_tutorials listener.py<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">\u5982\u679c\u4e00\u5207\u6b63\u5e38&#xff0c;\u8ba2\u9605\u8282\u70b9\u4f1a\u5728\u7ec8\u7aef\u4e2d\u663e\u793a\u7c7b\u4f3c\u4ee5\u4e0b\u5185\u5bb9&#xff1a;<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">\/listener_12345 I heard hello world 1697812456.12<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1.3k\u6b21\uff0c\u70b9\u8d5e20\u6b21\uff0c\u6536\u85cf5\u6b21\u3002\u5728ROS\u4e2d\uff0c**\u8282\u70b9\uff08Node\uff09**\u662f\u4e0eROS\u7f51\u7edc\u901a\u4fe1\u7684\u57fa\u672c\u5355\u4f4d\u3002\u5728\u8fd9\u4e2a\u90e8\u5206\uff0c\u6211\u4eec\u5c06\u521b\u5efa\u4e00\u4e2a\u7b80\u5355\u7684\u53d1\u5e03\u8282\u70b9\uff08talker\uff09\uff0c\u5b83\u4f1a\u4e0d\u65ad\u5411\u8bdd\u9898\uff08topic\uff09\u5e7f\u64ad\u6d88\u606f\u3002\u5bfc\u5165ROS\u6a21\u5757\uff1a\u6211\u4eec\u9700\u8981rospy\u6a21\u5757\u6765\u7f16\u5199ROS\u8282\u70b9\uff0c\u540c\u65f6\u9700\u8981String\u6d88\u606f\u7c7b\u578b\u6765\u53d1\u5e03\u5b57\u7b26\u4e32\u6d88\u606f\u3002\u63a5\u4e0b\u6765\uff0c\u6211\u4f1a\u521b\u5efa\u4e00\u4e2a\u7b80\u5355\u7684**\u8ba2\u9605\u8282\u70b9\uff08listener\uff09**\u6765\u63a5\u6536\u53d1\u5e03\u8282\u70b9\u53d1\u9001\u7684\u6d88\u606f\u3002\u8fd9\u4e2a\u8282\u70b9\u8ba2\u9605\u4e86chatter\u8bdd\u9898\uff0c\u5e76\u8c03\u7528\u56de\u8c03\u51fd\u6570callback()\u6765\u5904\u7406\u63a5\u6536\u5230\u7684\u6d88\u606f\u3002\u8be5\u51fd\u6570\u4f1a\u4fdd\u6301\u8282\u70b9\u8fd0\u884c\uff0c\u76f4\u5230\u8282\u70b9\u88ab\u624b\u52a8\u5173\u95ed\u3002<\/p>\n","protected":false},"author":2,"featured_media":22277,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[58,103,50,371],"topic":[],"class_list":["post-22287","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-linux","tag-ubuntu","tag-50","tag-371"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>1.1 Beginner Level\u5b66\u4e60\u4e4b\u201c\u7f16\u5199\u7b80\u5355\u7684\u53d1\u5e03\u670d\u52a1\u5668\u548c\u8ba2\u9605\u670d\u52a1\u5668\u201d\uff08\u7b2c\u5341\u4e8c\u8282\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/22287.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"1.1 Beginner Level\u5b66\u4e60\u4e4b\u201c\u7f16\u5199\u7b80\u5355\u7684\u53d1\u5e03\u670d\u52a1\u5668\u548c\u8ba2\u9605\u670d\u52a1\u5668\u201d\uff08\u7b2c\u5341\u4e8c\u8282\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1.3k\u6b21\uff0c\u70b9\u8d5e20\u6b21\uff0c\u6536\u85cf5\u6b21\u3002\u5728ROS\u4e2d\uff0c**\u8282\u70b9\uff08Node\uff09**\u662f\u4e0eROS\u7f51\u7edc\u901a\u4fe1\u7684\u57fa\u672c\u5355\u4f4d\u3002\u5728\u8fd9\u4e2a\u90e8\u5206\uff0c\u6211\u4eec\u5c06\u521b\u5efa\u4e00\u4e2a\u7b80\u5355\u7684\u53d1\u5e03\u8282\u70b9\uff08talker\uff09\uff0c\u5b83\u4f1a\u4e0d\u65ad\u5411\u8bdd\u9898\uff08topic\uff09\u5e7f\u64ad\u6d88\u606f\u3002\u5bfc\u5165ROS\u6a21\u5757\uff1a\u6211\u4eec\u9700\u8981rospy\u6a21\u5757\u6765\u7f16\u5199ROS\u8282\u70b9\uff0c\u540c\u65f6\u9700\u8981String\u6d88\u606f\u7c7b\u578b\u6765\u53d1\u5e03\u5b57\u7b26\u4e32\u6d88\u606f\u3002\u63a5\u4e0b\u6765\uff0c\u6211\u4f1a\u521b\u5efa\u4e00\u4e2a\u7b80\u5355\u7684**\u8ba2\u9605\u8282\u70b9\uff08listener\uff09**\u6765\u63a5\u6536\u53d1\u5e03\u8282\u70b9\u53d1\u9001\u7684\u6d88\u606f\u3002\u8fd9\u4e2a\u8282\u70b9\u8ba2\u9605\u4e86chatter\u8bdd\u9898\uff0c\u5e76\u8c03\u7528\u56de\u8c03\u51fd\u6570callback()\u6765\u5904\u7406\u63a5\u6536\u5230\u7684\u6d88\u606f\u3002\u8be5\u51fd\u6570\u4f1a\u4fdd\u6301\u8282\u70b9\u8fd0\u884c\uff0c\u76f4\u5230\u8282\u70b9\u88ab\u624b\u52a8\u5173\u95ed\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/22287.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-04-18T21:42:44+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418214242-6802c75201aa9.png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/22287.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/22287.html\",\"name\":\"1.1 Beginner Level\u5b66\u4e60\u4e4b\u201c\u7f16\u5199\u7b80\u5355\u7684\u53d1\u5e03\u670d\u52a1\u5668\u548c\u8ba2\u9605\u670d\u52a1\u5668\u201d\uff08\u7b2c\u5341\u4e8c\u8282\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-04-18T21:42:44+00:00\",\"dateModified\":\"2025-04-18T21:42:44+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/22287.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/22287.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/22287.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"1.1 Beginner Level\u5b66\u4e60\u4e4b\u201c\u7f16\u5199\u7b80\u5355\u7684\u53d1\u5e03\u670d\u52a1\u5668\u548c\u8ba2\u9605\u670d\u52a1\u5668\u201d\uff08\u7b2c\u5341\u4e8c\u8282\uff09\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"1.1 Beginner Level\u5b66\u4e60\u4e4b\u201c\u7f16\u5199\u7b80\u5355\u7684\u53d1\u5e03\u670d\u52a1\u5668\u548c\u8ba2\u9605\u670d\u52a1\u5668\u201d\uff08\u7b2c\u5341\u4e8c\u8282\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/22287.html","og_locale":"zh_CN","og_type":"article","og_title":"1.1 Beginner Level\u5b66\u4e60\u4e4b\u201c\u7f16\u5199\u7b80\u5355\u7684\u53d1\u5e03\u670d\u52a1\u5668\u548c\u8ba2\u9605\u670d\u52a1\u5668\u201d\uff08\u7b2c\u5341\u4e8c\u8282\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1.3k\u6b21\uff0c\u70b9\u8d5e20\u6b21\uff0c\u6536\u85cf5\u6b21\u3002\u5728ROS\u4e2d\uff0c**\u8282\u70b9\uff08Node\uff09**\u662f\u4e0eROS\u7f51\u7edc\u901a\u4fe1\u7684\u57fa\u672c\u5355\u4f4d\u3002\u5728\u8fd9\u4e2a\u90e8\u5206\uff0c\u6211\u4eec\u5c06\u521b\u5efa\u4e00\u4e2a\u7b80\u5355\u7684\u53d1\u5e03\u8282\u70b9\uff08talker\uff09\uff0c\u5b83\u4f1a\u4e0d\u65ad\u5411\u8bdd\u9898\uff08topic\uff09\u5e7f\u64ad\u6d88\u606f\u3002\u5bfc\u5165ROS\u6a21\u5757\uff1a\u6211\u4eec\u9700\u8981rospy\u6a21\u5757\u6765\u7f16\u5199ROS\u8282\u70b9\uff0c\u540c\u65f6\u9700\u8981String\u6d88\u606f\u7c7b\u578b\u6765\u53d1\u5e03\u5b57\u7b26\u4e32\u6d88\u606f\u3002\u63a5\u4e0b\u6765\uff0c\u6211\u4f1a\u521b\u5efa\u4e00\u4e2a\u7b80\u5355\u7684**\u8ba2\u9605\u8282\u70b9\uff08listener\uff09**\u6765\u63a5\u6536\u53d1\u5e03\u8282\u70b9\u53d1\u9001\u7684\u6d88\u606f\u3002\u8fd9\u4e2a\u8282\u70b9\u8ba2\u9605\u4e86chatter\u8bdd\u9898\uff0c\u5e76\u8c03\u7528\u56de\u8c03\u51fd\u6570callback()\u6765\u5904\u7406\u63a5\u6536\u5230\u7684\u6d88\u606f\u3002\u8be5\u51fd\u6570\u4f1a\u4fdd\u6301\u8282\u70b9\u8fd0\u884c\uff0c\u76f4\u5230\u8282\u70b9\u88ab\u624b\u52a8\u5173\u95ed\u3002","og_url":"https:\/\/www.wsisp.com\/helps\/22287.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-04-18T21:42:44+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418214242-6802c75201aa9.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"1 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/22287.html","url":"https:\/\/www.wsisp.com\/helps\/22287.html","name":"1.1 Beginner Level\u5b66\u4e60\u4e4b\u201c\u7f16\u5199\u7b80\u5355\u7684\u53d1\u5e03\u670d\u52a1\u5668\u548c\u8ba2\u9605\u670d\u52a1\u5668\u201d\uff08\u7b2c\u5341\u4e8c\u8282\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-04-18T21:42:44+00:00","dateModified":"2025-04-18T21:42:44+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/22287.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/22287.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/22287.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"1.1 Beginner Level\u5b66\u4e60\u4e4b\u201c\u7f16\u5199\u7b80\u5355\u7684\u53d1\u5e03\u670d\u52a1\u5668\u548c\u8ba2\u9605\u670d\u52a1\u5668\u201d\uff08\u7b2c\u5341\u4e8c\u8282\uff09"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/22287","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=22287"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/22287\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/22277"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=22287"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=22287"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=22287"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=22287"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}