{"id":34626,"date":"2025-04-30T07:35:45","date_gmt":"2025-04-29T23:35:45","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/34626.html"},"modified":"2025-04-30T07:35:45","modified_gmt":"2025-04-29T23:35:45","slug":"ros%e5%ae%9e%e9%aa%8c%e4%ba%8c-%ef%bc%88%e8%af%9d%e9%a2%98%e9%80%9a%e4%bf%a1%ef%bc%8c%e6%9c%8d%e5%8a%a1%e9%80%9a%e4%bf%a1%e5%92%8c%e5%8f%82%e6%95%b0%e6%9c%8d%e5%8a%a1%e5%99%a8%ef%bc%89","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/34626.html","title":{"rendered":"ROS\u5b9e\u9a8c\u4e8c \uff08\u8bdd\u9898\u901a\u4fe1\uff0c\u670d\u52a1\u901a\u4fe1\u548c\u53c2\u6570\u670d\u52a1\u5668\uff09"},"content":{"rendered":"<h2 style=\"text-align:center\">&#8212;&#8212;&#8212;&#8212;&#x1f446;&#x1f446;&#x1f446;\u5176\u4ed6\u7ae0\u8282\u70b9\u5f00\u4e13\u680f\u67e5\u770b&#x1f446;&#x1f446;&#x1f446;&#8212;&#8212;&#8212;&#8212;<\/h2>\n<hr \/>\n<h2>\u672c\u8282\u5185\u5bb9<\/h2>\n<p>1. \u4f7f\u7528 Python \u7f16\u5199\u8bdd\u9898\u7684\u53d1\u5e03\u4e0e\u8ba2\u9605\u5b9e\u73b0&#xff0c;\u8981\u6c42\u53d1\u5e03\u65b9\u4ee5 30HZ(\u6bcf\u79d2 30 \u6b21)\u7684\u9891\u7387\u53d1\u5e03 rgba \u989c\u8272\u6d88\u606f&#xff0c;\u8ba2\u9605\u65b9\u8ba2\u9605\u6d88\u606f\u5e76\u5c06\u6d88\u606f\u5185\u5bb9\u6253\u5370\u8f93\u51fa\u3002 \u8981\u6c42&#xff1a; \u8bdd\u9898\u540d\u79f0&#xff1a;color \u53d1\u5e03\u65b9\u8f93\u51fa&#xff1a;\u5df2\u53d1\u51fa\u7684\u989c\u8272\u6d88\u606f \u8ba2\u9605\u65b9\u8f93\u51fa&#xff1a;\u6536\u5230\u7684\u989c\u8272\u6d88\u606f\u4e3a&#xff1a;r&#061;0, g&#061;255, b&#061;3, a&#061;1\u3002&#x1f31f;<\/p>\n<p>2. \u4f7f\u7528 Python \u7f16\u5199\u670d\u52a1\u5ba2\u6237\u7aef&#xff0c;\u5b9e\u73b0\u5411 turtlesim \u53d1\u9001\u8bf7\u6c42&#xff0c;\u5728\u4e4c\u9f9f\u663e\u793a\u8282\u70b9\u7a97\u53e3\u4e0a\u6307\u5b9a\u4f4d\u7f6e\u751f\u6210\u65b0\u7684\u4e4c\u9f9f\u3002&#x1f31f;<\/p>\n<p>3. \u4f7f\u7528 Python \u7f16\u5199\u4ee3\u7801\u6765\u4fee\u6539 turtlesim \u4e4c\u9f9f\u663e\u793a\u8282\u70b9\u7a97\u53e3\u7684\u80cc\u666f\u8272&#xff0c;\u5df2\u77e5\u80cc\u666f\u8272\u662f\u901a\u8fc7\u53c2\u6570\u670d\u52a1\u5668\u7684\u65b9\u5f0f\u8bbe\u7f6e\u7684\u3002&#x1f31f;<\/p>\n<hr \/>\n<h2>\u5b9e\u9a8c\u6b65\u9aa4<\/h2>\n<h3>1.\u53d1\u5e03 ColorRGBA \u6d88\u606f\u5230 color \u8bdd\u9898&#xff0c;\u8ba2\u9605\u5e76\u6253\u5370\u989c\u8272\u6570\u636e\u3002<\/h3>\n<p>\u5728ROS\u5b9e\u9a8c\u4e00\u7684\u5de5\u4f5c\u7a7a\u95f4\u4e0b\u7ee7\u7eed\u5b9e\u9a8c\u3002\u6211\u4eec\u65b0\u5efa\u4e00\u4e2a\u529f\u80fd\u5305&#xff0c;\u5c06\u5176\u547d\u540d\u4e3atask2,\u5e76\u6dfb\u52a0\u4ee5\u4e0b\u4f9d\u8d56&#xff1a;<\/p>\n<p>&#xff08;\u521b\u5efa\u529f\u80fd\u5305\u7684\u65b9\u6cd5\u5728ROS\u5b9e\u9a8c\u4e00\u91cc\u6709&#xff0c;\u53ef\u4ee5\u5728\u4e13\u680f\u4e2d\u67e5\u770b&#x1f60a;&#xff09;<\/p>\n<p>rospy std_msgs <\/p>\n<p>\u548c\u4e4b\u524d\u4e00\u6837&#xff0c;\u5728task2\u529f\u80fd\u5305\u4e2d\u521b\u5efascripts\u6587\u4ef6\u5939\u3002\u5728scripts\u6587\u4ef6\u5939\u5185\u6dfb\u52a0color_publisher.py\u6587\u4ef6&#xff0c;\u7528\u4e8e\u53d1\u5e03\u8bdd\u9898\u3002color_publisher.py\u7684\u5185\u5bb9\u5728\u8fd9&#x1f447;<\/p>\n<p>#!\/usr\/bin\/env python3<br \/>\nimport rospy<br \/>\nfrom std_msgs.msg import ColorRGBA<\/p>\n<p>def color_publisher():<br \/>\n    # \u521d\u59cb\u5316\u8282\u70b9<br \/>\n    rospy.init_node(&#039;color_publisher&#039;, anonymous&#061;True)<br \/>\n    # \u521b\u5efa\u53d1\u5e03\u8005&#xff0c;\u8bdd\u9898\u540d\u4e3a &#039;color&#039;<br \/>\n    pub &#061; rospy.Publisher(&#039;color&#039;, ColorRGBA, queue_size&#061;10)<br \/>\n    # \u8bbe\u7f6e\u53d1\u5e03\u9891\u7387\u4e3a30Hz<br \/>\n    rate &#061; rospy.Rate(30)<\/p>\n<p>    while not rospy.is_shutdown():<br \/>\n        # \u521b\u5efa\u989c\u8272\u6d88\u606f<br \/>\n        color_msg &#061; ColorRGBA()<br \/>\n        color_msg.r &#061; 0<br \/>\n        color_msg.g &#061; 255<br \/>\n        color_msg.b &#061; 3<br \/>\n        color_msg.a &#061; 1<\/p>\n<p>        # \u53d1\u5e03\u6d88\u606f<br \/>\n        pub.publish(color_msg)<br \/>\n        rospy.loginfo(&#034;\u5df2\u53d1\u51fa\u7684\u989c\u8272\u6d88\u606f&#034;)<\/p>\n<p>        rate.sleep()<\/p>\n<p>if __name__ &#061;&#061; &#039;__main__&#039;:<br \/>\n    try:<br \/>\n        color_publisher()<br \/>\n    except rospy.ROSInterruptException:<br \/>\n        pass<\/p>\n<p>\u6dfb\u52a0color_subscriber.py\u6587\u4ef6&#xff0c;\u7528\u4e8e\u8ba2\u9605\u8bdd\u9898\u3002color_subscriber.py\u7684\u5185\u5bb9\u5728\u8fd9&#x1f447;<\/p>\n<p>#!\/usr\/bin\/env python3<br \/>\nimport rospy<br \/>\nfrom std_msgs.msg import ColorRGBA<\/p>\n<p>def color_callback(msg):<br \/>\n    rospy.loginfo(&#034;\u6536\u5230\u7684\u989c\u8272\u6d88\u606f\u4e3a&#xff1a;r&#061;%.0f, g&#061;%.0f, b&#061;%.0f, a&#061;%.0f&#034; % (msg.r, msg.g, msg.b, msg.a))<\/p>\n<p>def color_subscriber():<br \/>\n    # \u521d\u59cb\u5316\u8282\u70b9<br \/>\n    rospy.init_node(&#039;color_subscriber&#039;, anonymous&#061;True)<br \/>\n    # \u521b\u5efa\u8ba2\u9605\u8005&#xff0c;\u8bdd\u9898\u540d\u4e3a &#039;color&#039;<br \/>\n    rospy.Subscriber(&#039;color&#039;, ColorRGBA, color_callback)<br \/>\n    # \u9632\u6b62\u7a0b\u5e8f\u9000\u51fa<br \/>\n    rospy.spin()<\/p>\n<p>if __name__ &#061;&#061; &#039;__main__&#039;:<br \/>\n    try:<br \/>\n        color_subscriber()<br \/>\n    except rospy.ROSInterruptException:<br \/>\n        pass<\/p>\n<p>\u6253\u5f00\u4e00\u4e2a\u7ec8\u7aef&#xff0c;\u8fd0\u884croscore\u6307\u4ee4\u3002\u6253\u5f00\u7b2c\u4e8c\u4e2a\u7ec8\u7aef&#xff0c;\u4f9d\u6b21\u8fd0\u884c\u4ee5\u4e0b\u6307\u4ee4&#xff1a;<\/p>\n<p>#\u8fdb\u5165scripts\u6587\u4ef6\u5939&#xff0c;\u5982\u679c\u4f60\u7684\u5de5\u4f5c\u7a7a\u95f4\u540d\u548c\u6211\u4e0d\u4e00\u6837&#xff0c;\u6362\u6210\u4f60\u7684\u540d\u5b57<br \/>\ncd ~\/catkin_ws\/src\/task2\/scripts<\/p>\n<p>#\u6dfb\u52a0\u53ef\u6267\u884c\u6743\u9650<br \/>\nchmod &#043;x color_publisher.py<br \/>\nchmod &#043;x color_subscriber.py<\/p>\n<p>cd ~\/catkin_ws<br \/>\ncatkin_make<br \/>\nsource devel\/setup.bash<\/p>\n<p>rosrun task2 color_publisher.py #\u53d1\u5e03\u8bdd\u9898<\/p>\n<p>\u6253\u5f00\u7b2c\u4e09\u4e2a\u7ec8\u7aef&#xff0c;\u8fd0\u884c\u4ee5\u4e0b\u6307\u4ee4&#xff1a;<\/p>\n<p>#\u8fdb\u5165scripts\u6587\u4ef6\u5939&#xff0c;\u5982\u679c\u4f60\u7684\u5de5\u4f5c\u7a7a\u95f4\u540d\u548c\u6211\u4e0d\u4e00\u6837&#xff0c;\u6362\u6210\u4f60\u7684\u540d\u5b57<br \/>\ncd ~\/catkin_ws\/src\/task2\/scripts<\/p>\n<p>#\u6dfb\u52a0\u53ef\u6267\u884c\u6743\u9650<br \/>\nchmod &#043;x color_publisher.py<br \/>\nchmod &#043;x color_subscriber.py<\/p>\n<p>cd ~\/catkin_ws<br \/>\ncatkin_make<br \/>\nsource devel\/setup.bash<\/p>\n<p>rosrun task2 color_subscriber.py<\/p>\n<p>\u6700\u7ec8\u8fd0\u884c\u7ed3\u679c\u5982\u4e0b&#x1f60a;&#x1f60a;<\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"620\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250429233543-6811624f23a3e.png\" width=\"475\" \/><\/p>\n<h3>2.\u5ba2\u6237\u7aef\u8bf7\u6c42 turtlesim \u5728\u6307\u5b9a\u4f4d\u7f6e\u751f\u6210\u65b0\u7684\u4e4c\u9f9f<\/h3>\n<p>\u521b\u5efaturtle_spawn_client.py\u6587\u4ef6&#xff0c;\u5728\u6587\u4ef6\u4e2d\u6dfb\u52a0\u4ee5\u4e0b\u4ee3\u7801&#xff1a;<\/p>\n<p>#!\/usr\/bin\/env python3<br \/>\nimport rospy<br \/>\nfrom turtlesim.srv import Spawn<\/p>\n<p>def spawn_turtle(x, y, theta, name):<br \/>\n    # \u521d\u59cb\u5316\u8282\u70b9<br \/>\n    rospy.init_node(&#039;turtle_spawn_client&#039;)<\/p>\n<p>    # \u7b49\u5f85\u670d\u52a1\u7684\u542f\u52a8<br \/>\n    rospy.wait_for_service(&#039;spawn&#039;)<\/p>\n<p>    try:<br \/>\n        # \u521b\u5efa spawn \u670d\u52a1\u4ee3\u7406<br \/>\n        spawn_turtle_service &#061; rospy.ServiceProxy(&#039;spawn&#039;, Spawn)<\/p>\n<p>        # \u8c03\u7528\u670d\u52a1\u5e76\u4f20\u9012\u53c2\u6570&#xff1a;x, y, theta, name<br \/>\n        spawn_turtle_service(x, y, theta, name)<\/p>\n<p>        rospy.loginfo(&#034;\u65b0\u4e4c\u9f9f\u5df2\u751f\u6210&#xff0c;\u4f4d\u7f6e&#xff1a;x&#061;%.2f, y&#061;%.2f, theta&#061;%.2f, \u540d\u5b57&#xff1a;%s&#034; % (x, y, theta, name))<\/p>\n<p>    except rospy.ServiceException as e:<br \/>\n        rospy.logerr(&#034;\u670d\u52a1\u8c03\u7528\u5931\u8d25&#xff1a;%s&#034; % e)<\/p>\n<p>if __name__ &#061;&#061; &#039;__main__&#039;:<br \/>\n    try:<br \/>\n        # \u8bf7\u6c42\u751f\u6210\u4e00\u4e2a\u65b0\u4e4c\u9f9f&#xff0c;\u6307\u5b9a\u4f4d\u7f6e&#xff08;\u4f8b\u5982 x&#061;3.0, y&#061;3.0, theta&#061;0.0&#xff09;&#xff0c;\u5e76\u547d\u540d\u4e3a &#039;turtle2&#039;<br \/>\n        spawn_turtle(3.0, 3.0, 0.0, &#039;turtle2&#039;)<br \/>\n    except rospy.ROSInterruptException:<br \/>\n        pass<\/p>\n<p>\u00a0\u5b8c\u6210\u540e\u6253\u5f00\u7b2c\u4e00\u4e2a\u7ec8\u7aef\u8fd0\u884croscore\u3002\u6253\u5f00\u7b2c\u4e8c\u4e2a\u7ec8\u7aef\u542f\u52a8turtlesim\u3002&#xff08;\u548c\u4e4b\u524d\u7684\u64cd\u4f5c\u4e00\u6837&#xff0c;\u5982\u679c\u4f60\u7684\u5de5\u4f5c\u7a7a\u95f4\u540d\u5b57\u548c\u6211\u7684\u4e0d\u4e00\u6837\u8bb0\u5f97\u66f4\u6539&#xff09;<\/p>\n<p>rosrun turtlesim turtlesim_node<\/p>\n<p>\u6253\u5f00\u7b2c\u4e09\u4e2a\u7ec8\u7aef&#xff0c;\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\u3002<\/p>\n<p>#\u8fdb\u5165scripts\u6587\u4ef6\u5939&#xff0c;\u5982\u679c\u4f60\u7684\u5de5\u4f5c\u7a7a\u95f4\u540d\u548c\u6211\u4e0d\u4e00\u6837&#xff0c;\u6362\u6210\u4f60\u7684\u540d\u5b57<br \/>\ncd ~\/catkin_ws\/src\/task2\/scripts<\/p>\n<p>#\u6dfb\u52a0\u53ef\u6267\u884c\u6743\u9650<br \/>\nchmod &#043;x turtle_spawn_client.py<\/p>\n<p>cd ~\/catkin_ws<br \/>\ncatkin_make<br \/>\nsource devel\/setup.bash<\/p>\n<p>rosrun task2 turtle_spawn_client.py<\/p>\n<p>\u8fd0\u884c\u540e\u5728\u5de6\u4e0b\u89d2\u751f\u6210\u4e86\u4e00\u53ea\u767d\u8272\u6d77\u9f9f&#x1f60a;&#x1f60a;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"570\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250429233543-6811624f5b202.png\" width=\"1167\" \/><\/p>\n<h3>3.\u901a\u8fc7 \u53c2\u6570\u670d\u52a1\u5668 \u4fee\u6539\u00a0turtlesim \u80cc\u666f\u8272\u3002\u00a0<\/h3>\n<p>\u00a0\u4fee\u6539\u80cc\u666f\u8272\u4ee3\u7801\u5982\u4e0b&#xff0c;\u6211\u4eec\u5c06\u5b83\u547d\u540d\u4e3achange_background_color.py\u3002<\/p>\n<p>#!\/usr\/bin\/env python3<br \/>\nimport rospy<\/p>\n<p>def change_background_color(r, g, b):<br \/>\n    # \u521d\u59cb\u5316\u8282\u70b9<br \/>\n    rospy.init_node(&#039;change_background_color&#039;)<\/p>\n<p>    # \u4fee\u6539\u53c2\u6570\u670d\u52a1\u5668\u4e0a\u7684\u80cc\u666f\u8272<br \/>\n    rospy.set_param(&#039;\/turtlesim\/background_r&#039;, r)<br \/>\n    rospy.set_param(&#039;\/turtlesim\/background_g&#039;, g)<br \/>\n    rospy.set_param(&#039;\/turtlesim\/background_b&#039;, b)<\/p>\n<p>    rospy.loginfo(&#034;\u80cc\u666f\u8272\u5df2\u4fee\u6539\u4e3a&#xff1a;r&#061;%d, g&#061;%d, b&#061;%d&#034; % (r, g, b))<\/p>\n<p>if __name__ &#061;&#061; &#039;__main__&#039;:<br \/>\n    try:<br \/>\n        # \u4fee\u6539\u80cc\u666f\u8272\u4e3a\u7ea2\u8272<br \/>\n        change_background_color(255, 0, 0)<br \/>\n    except rospy.ROSInterruptException:<br \/>\n        pass<\/p>\n<p>\u00a0\u5b8c\u6210\u540e\u6253\u5f00\u7b2c\u4e00\u4e2a\u7ec8\u7aef\u8fd0\u884croscore\u3002\u6253\u5f00\u7b2c\u4e8c\u4e2a\u7ec8\u7aef\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\u3002&#xff08;\u548c\u4e4b\u524d\u7684\u64cd\u4f5c\u4e00\u6837&#xff0c;\u5982\u679c\u4f60\u7684\u5de5\u4f5c\u7a7a\u95f4\u540d\u5b57\u548c\u6211\u7684\u4e0d\u4e00\u6837\u8bb0\u5f97\u66f4\u6539&#xff09;\u3002<\/p>\n<p>#\u8fdb\u5165scripts\u6587\u4ef6\u5939&#xff0c;\u5982\u679c\u4f60\u7684\u5de5\u4f5c\u7a7a\u95f4\u540d\u548c\u6211\u4e0d\u4e00\u6837&#xff0c;\u6362\u6210\u4f60\u7684\u540d\u5b57<br \/>\ncd ~\/catkin_ws\/src\/task2\/scripts<\/p>\n<p>#\u6dfb\u52a0\u53ef\u6267\u884c\u6743\u9650<br \/>\nchmod &#043;x change_background_color.py<\/p>\n<p>cd ~\/catkin_ws<br \/>\ncatkin_make<br \/>\nsource devel\/setup.bash<\/p>\n<p>rosrun task2 change_background_color.py<\/p>\n<p>\u00a0\u6253\u5f00\u7b2c\u4e09\u4e2a\u7ec8\u7aef&#xff0c;\u542f\u52a8\u5c0f\u6d77\u9f9f\u3002\u00a0&#xff08;\u5148\u8fd0\u884cpy\u6587\u4ef6\u518d\u542f\u52a8\u5c0f\u6d77\u9f9f&#xff09;<\/p>\n<p>rosrun turtlesim turtlesim_node<\/p>\n<p>\u53ef\u4ee5\u770b\u5230\u80cc\u666f\u989c\u8272\u53d8\u6210\u4e86\u7ea2\u8272&#xff0c;\u606d\u559c\u4f60\u6210\u529f\u4e86&#xff01;&#x1f60a;&#x1f60a;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"1040\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250429233543-6811624fc6948.png\" width=\"1066\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1.1k\u6b21\uff0c\u70b9\u8d5e21\u6b21\uff0c\u6536\u85cf11\u6b21\u3002\u57fa\u4e8eros noetic\u5206\u522b\u5b8c\u6210\u8bdd\u9898\u901a\u4fe1\uff0c\u670d\u52a1\u901a\u4fe1\u548c\u53c2\u6570\u670d\u52a1\u5668\u5b9e\u9a8c\u3002<\/p>\n","protected":false},"author":2,"featured_media":34623,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[1966,103,2935,384,2934],"topic":[],"class_list":["post-34626","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-ros","tag-ubuntu","tag-2935","tag-384","tag-2934"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>ROS\u5b9e\u9a8c\u4e8c \uff08\u8bdd\u9898\u901a\u4fe1\uff0c\u670d\u52a1\u901a\u4fe1\u548c\u53c2\u6570\u670d\u52a1\u5668\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\/34626.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"ROS\u5b9e\u9a8c\u4e8c \uff08\u8bdd\u9898\u901a\u4fe1\uff0c\u670d\u52a1\u901a\u4fe1\u548c\u53c2\u6570\u670d\u52a1\u5668\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1.1k\u6b21\uff0c\u70b9\u8d5e21\u6b21\uff0c\u6536\u85cf11\u6b21\u3002\u57fa\u4e8eros noetic\u5206\u522b\u5b8c\u6210\u8bdd\u9898\u901a\u4fe1\uff0c\u670d\u52a1\u901a\u4fe1\u548c\u53c2\u6570\u670d\u52a1\u5668\u5b9e\u9a8c\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/34626.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-29T23:35:45+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250429233543-6811624f23a3e.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=\"3 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/34626.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/34626.html\",\"name\":\"ROS\u5b9e\u9a8c\u4e8c \uff08\u8bdd\u9898\u901a\u4fe1\uff0c\u670d\u52a1\u901a\u4fe1\u548c\u53c2\u6570\u670d\u52a1\u5668\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-04-29T23:35:45+00:00\",\"dateModified\":\"2025-04-29T23:35:45+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/34626.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/34626.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/34626.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"ROS\u5b9e\u9a8c\u4e8c \uff08\u8bdd\u9898\u901a\u4fe1\uff0c\u670d\u52a1\u901a\u4fe1\u548c\u53c2\u6570\u670d\u52a1\u5668\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":"ROS\u5b9e\u9a8c\u4e8c \uff08\u8bdd\u9898\u901a\u4fe1\uff0c\u670d\u52a1\u901a\u4fe1\u548c\u53c2\u6570\u670d\u52a1\u5668\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\/34626.html","og_locale":"zh_CN","og_type":"article","og_title":"ROS\u5b9e\u9a8c\u4e8c \uff08\u8bdd\u9898\u901a\u4fe1\uff0c\u670d\u52a1\u901a\u4fe1\u548c\u53c2\u6570\u670d\u52a1\u5668\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1.1k\u6b21\uff0c\u70b9\u8d5e21\u6b21\uff0c\u6536\u85cf11\u6b21\u3002\u57fa\u4e8eros noetic\u5206\u522b\u5b8c\u6210\u8bdd\u9898\u901a\u4fe1\uff0c\u670d\u52a1\u901a\u4fe1\u548c\u53c2\u6570\u670d\u52a1\u5668\u5b9e\u9a8c\u3002","og_url":"https:\/\/www.wsisp.com\/helps\/34626.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-04-29T23:35:45+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250429233543-6811624f23a3e.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"3 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/34626.html","url":"https:\/\/www.wsisp.com\/helps\/34626.html","name":"ROS\u5b9e\u9a8c\u4e8c \uff08\u8bdd\u9898\u901a\u4fe1\uff0c\u670d\u52a1\u901a\u4fe1\u548c\u53c2\u6570\u670d\u52a1\u5668\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-04-29T23:35:45+00:00","dateModified":"2025-04-29T23:35:45+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/34626.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/34626.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/34626.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"ROS\u5b9e\u9a8c\u4e8c \uff08\u8bdd\u9898\u901a\u4fe1\uff0c\u670d\u52a1\u901a\u4fe1\u548c\u53c2\u6570\u670d\u52a1\u5668\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\/34626","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=34626"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/34626\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/34623"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=34626"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=34626"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=34626"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=34626"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}