{"id":486,"date":"2026-10-04T23:00:35","date_gmt":"2026-10-04T15:00:35","guid":{"rendered":"https:\/\/geocommunity.vip\/?p=486"},"modified":"2026-10-05T20:19:11","modified_gmt":"2026-10-05T12:19:11","slug":"mapping-topic-data-flow","status":"publish","type":"post","link":"https:\/\/geocommunity.vip\/index.php\/2026\/10\/04\/mapping-topic-data-flow\/","title":{"rendered":"SLAM\u5efa\u56fe\u8bdd\u9898\u6570\u636e\u6d41"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">\u4e00\u3001\u5168\u666f\u56fe<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550 Pi\uff08\u8f66\u4e0a\uff0c\u78b0\u786c\u4ef6\u7684\u552f\u4e00\u8fdb\u7a0b\uff1abackend\uff09\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\n \u96f7\u8fbe A1M8                     \u7f16\u7801\u5668\u00d74(pigpio)        IMU(CH340\u4e32\u53e3)\n   \u2502\u4e32\u53e3\u5e27                       \u2502GPIO\u8fb9\u6cbf               \u25027E23\u5e27\n   \u25bc                            \u25bc                       \u25bc\n lidar.py                 encoder.py                imu.py\n 720\u70b9\/\u5708\u00b7\u7269\u7406\u91cf           tick\u589e\u91cf(\u5e26\u7b26\u53f7)           gz(rad\/s)\n   \u2502                            \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n   \u25bc                                     \u25bc\n ScanBroadcaster        odom_exporter._step() \u6bcf1\/30s\n TCP:5001 NDJSON        \u8c03 integrate() \u2192 \u901f\u5ea6\u7ec4(v,w) + \u4f4d\u59ff\u7ec4(x,y,\u03b8)\n \u6bcf\u884c\u4e00\u5708JSON                 \u2502TCP:5003 NDJSON\n   \u2502                          \u2502 \u6bcf\u62cd\u4e09\u6761: wheel \/ imu \/ odom\n\u2550\u2550\u2550 \u5bb9\u5668 ros_env\uff08\u4e24\u5ea7\u6865\uff1aJSON \u2192 ROS \u8bdd\u9898\u7684\u7ffb\u8bd1\u5b98\uff09\u2550\u2550\u2550\n   \u25bc                          \u25bc\n lidar_bridge.py            odom_bridge.py --mode raw\n   \u2502\/scan (LaserScan)          \u2502\/wheel_odom(\u53eatwist) + \/imu\/data_raw(\u53eavyaw)\n   \u2502BEST_EFFORT                \u2502TF-free\uff08\u4f4d\u59ff\u51b3\u5b9a\u6743\u4e0a\u4ea4\uff09\n   \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 WiFi DDS\uff08domain 0 + \u9759\u6001\u5bf9\u7aef\uff09\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n                                                        \u25bc\n\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550 \u7b14\u8bb0\u672c\uff08ROS \u4e16\u754c\uff0c\u5168\u90e8\u8ba1\u7b97\uff09\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\n EKF(robot_localization)                    slam_toolbox\n \/wheel_odom\u53d6vx+vyaw\u3001\/imu\u53d6vyaw            \u2460\u53d6\/scan + TF\u653e\u7f6e\u626b\u63cf\n \u2500\u2500\u79ef\u5206+\u52a0\u6743\u2500\u2500\u2192 (x,y,\u03b8) \u2500\u2500\u2192 TF odom\u2192base_link \u2461\u5339\u914d\/\u5efa\u8282\u70b9(\u9608\u503c0.5)\/\u56de\u73af\n          \u2502                                \u2500\u2500\u2192 \/map + TF map\u2192odom(\u6539\u6b63\u6570\u8868)\n          \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n                         \u25bc\n              slam_service.py :5002 \u8ba2\u9605\/map\n                         \u2502HTTP \u6805\u683c(gzip ~6KB) \u6bcf3s\n                         \u25bc\n              \u6d4f\u89c8\u5668\u300c\u5730\u56fe\u300d\u753b\u5e03  \u2190\u2014\u2014 \u70b9\u4e91\u8d70\u7684\u662f\u53e6\u4e00\u6761\u8def\uff1aSocket.IO :5000 \u76f4\u8fde\uff0c\u4e0d\u8fc7 ROS\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fd9\u5f20\u56fe\u672c\u8d28\u4e0a\u662f<strong>\u4e09\u6bb5\u5730\u57df\uff08Pi \/ \u5bb9\u5668 \/ \u7b14\u8bb0\u672c\uff09\u3001\u4e24\u5ea7\u6865\u3001\u4e00\u6b21\u8de8\u6d77\uff08WiFi DDS\uff09<\/strong>\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e8c\u3001\u9010\u5757\u8bb2\u89e3<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">\u7b2c\u4e00\u5757\uff1aPi \u786c\u4ef6\u5c42\uff08\u9876\u90e8\u4e09\u4e2a\u5e76\u6392\u7684\u6e90\u5934\uff09<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>\u96f7\u8fbe A1M8          \u7f16\u7801\u5668\u00d74(pigpio)      IMU(CH340\u4e32\u53e3)\n  \u2502\u4e32\u53e3\u5e27            \u2502GPIO\u8fb9\u6cbf             \u25027E23\u5e27\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e09\u4e2a\u4f20\u611f\u5668\uff0c\u4e09\u79cd\u5b8c\u5168\u4e0d\u540c\u7684\u539f\u59cb\u4fe1\u53f7\uff1a\u96f7\u8fbe\u4ece<strong>\u4e32\u53e3<\/strong>\u5410\u5b57\u8282\uff1b\u7f16\u7801\u5668\u662f<strong>GPIO \u5f15\u811a\u4e0a\u7684\u7535\u5e73\u8df3\u53d8<\/strong>\uff08\u6bcf\u79d2\u8fd1\u4e07\u4e2a\u8fb9\u6cbf\uff0cpigpio \u5b88\u62a4\u8fdb\u7a0b\u6355\u83b7\uff09\uff1bIMU \u4ece <strong>USB \u4e32\u53e3<\/strong>\u5410 <code>7E 23<\/code> \u5f00\u5934\u7684\u534f\u8bae\u5e27\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u7b2c\u4e8c\u5757\uff1a\u4e09\u4e2a\u9a71\u52a8\u6a21\u5757\uff08\u7269\u7406\u91cf\u5c42\uff09<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>lidar.py            encoder.py           imu.py\n720\u70b9\/\u5708\u00b7\u7269\u7406\u91cf      tick\u589e\u91cf(\u5e26\u7b26\u53f7)      gz(rad\/s)\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u5404\u628a\u5404\u7684\u539f\u59cb\u4fe1\u53f7\u7ffb\u8bd1\u6210<strong>\u6709\u7269\u7406\u610f\u4e49\u7684\u6570<\/strong>\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>lidar.py<\/code>\uff1a\u5b57\u8282\u91cd\u7ec4\u6210\u4e00\u5708 720 \u4e2a 0.5\u00b0 \u65b9\u5411\u7684\u8ddd\u79bb\u503c\u2014\u2014<strong>&#8220;\u6211\u770b\u89c1\u4e86\u4ec0\u4e48&#8221;<\/strong>\uff1b<\/li>\n\n\n\n<li><code>encoder.py<\/code>\uff1a\u8fb9\u6cbf\u5582\u8fdb\u8f6c\u79fb\u8868\u72b6\u6001\u673a \u2192 \u5e26\u7b26\u53f7 tick\u2014\u2014<strong>&#8220;\u8f6e\u5b50\u8f6c\u4e86\u591a\u5c11&#8221;<\/strong>\uff1b<\/li>\n\n\n\n<li><code>imu.py<\/code>\uff1a\u5e27\u89e3\u6790 \u2192 gz\uff08rad\/s\uff0c\u6b63=\u9006\u65f6\u9488\u5de6\u8f6c\uff09\u2014\u2014<strong>&#8220;\u8f66\u4f53\u8f6c\u591a\u5feb&#8221;<\/strong>\u3002<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">\u7b2c\u4e09\u5757\uff1a\u4e24\u4e2a\u51fa\u53e3\uff08TCP \u5e7f\u64ad\u5c42\uff09<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>ScanBroadcaster          odom_exporter._step() \u6bcf1\/30s\nTCP:5001 NDJSON          \u8c03 integrate() \u2192 \u901f\u5ea6\u7ec4(v,w) + \u4f4d\u59ff\u7ec4(x,y,\u03b8)\n\u6bcf\u884c\u4e00\u5708JSON                \u2502 \u6bcf\u62cd\u4e09\u6761: wheel \/ imu \/ odom\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u5de6\u8fb9\uff1a\u96f7\u8fbe\u6bcf\u8f6c\u5b8c\u4e00\u5708\uff0c\u6253\u5305\u6210<strong>\u4e00\u884c JSON<\/strong> \u5e7f\u64ad\u5230 :5001\uff08\u6bcf\u4e2a\u5ba2\u6237\u7aef\u72ec\u7acb 2 \u683c\u7f13\u51b2\uff0c\u6162\u6d88\u8d39\u8005\u4e22\u5e27\u4e0d\u963b\u585e\u91c7\u96c6\uff09\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u53f3\u8fb9\uff1a\u6bcf 1\/30 \u79d2\u4e00\u62cd\uff0c<code>odom_exporter<\/code> \u53bb\u7f16\u7801\u5668\u548c IMU \u624b\u91cc\u53d6\u5f53\u62cd\u6570\u636e\uff0c\u5582\u7ed9\u7eaf\u51fd\u6570 <code>integrate()<\/code>\u2014\u2014<strong>\u8f6e\u5b50\u7ba1\u8d70\u591a\u5feb\u3001\u9640\u87ba\u7ba1\u8f6c\u591a\u5feb\uff0c\u5408\u6210\u901f\u5ea6\u7ec4 (v, w)\uff0c\u987a\u5e26\u79ef\u51fa\u8f66\u4e0a\u5e95\u8d26 (x, y, \u03b8)<\/strong>\u3002\u7136\u540e\u5e7f\u64ad<strong>\u4e09\u6761 JSON<\/strong>\uff1a<code>wheel<\/code>\uff08\u56db\u8f6e tick + vL\/vR\uff09\u3001<code>imu<\/code>\uff08gz\uff09\u3001<code>odom<\/code>\uff08\u5e95\u8d26\u4f4d\u59ff\uff09\u2014\u2014\u540c\u4e00\u62cd\u4e09\u4efd\u89c6\u56fe\uff0c\u539f\u59cb\u5c42\u7559\u7740\u5206\u8bca\uff0c\u878d\u5408\u5c42\u7ed9\u9065\u6d4b\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u8fd9\u4e00\u5757\u662f\u56fd\u5883\u7ebf<\/strong>\uff1aTCP + \u6bcf\u884c\u4e00\u4e2a JSON\uff0c<code>nc<\/code> \u5c31\u80fd\u770b\u3002\u8fc7\u4e86\u8fd9\u4e24\u4e2a\u7aef\u53e3\uff0c\u6570\u636e\u5c31\u4e0d\u518d\u5c5e\u4e8e&#8221;\u8f66&#8221;\uff0c\u800c\u5c5e\u4e8e&#8221;\u4efb\u4f55\u6765\u53d6\u7684\u4eba&#8221;\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">:5001 \u548c :5003 \u8fd9\u4e24\u4e2a\u7aef\u53e3\u662f\u88f8 TCP \u670d\u52a1\u2014\u2014\u5ba2\u6237\u7aef\u8fde\u4e0a\u540e\uff0c\u670d\u52a1\u7aef\u5c31\u4e0d\u505c\u5730\u628a\u6570\u636e\u5b57\u8282\u6d41\u704c\u8fc7\u6765\uff0c\u4ec5\u6b64\u800c\u5df2\u3002\u5b83\u4e0d\u662f\u7f51\u9875\uff08\u6ca1\u6709 HTTP \u7684\u8bf7\u6c42\/\u54cd\u5e94\u3001\u6ca1\u6709\u5934\u90e8\uff09\uff0c\u4e5f\u4e0d\u662f Socket.IO \u90a3\u79cd\u5e26\u534f\u8bae\u63e1\u624b\u7684\u901a\u9053\u3002\u4efb\u4f55\u80fd\u5efa\u7acb TCP \u8fde\u63a5\u7684\u5de5\u5177\u90fd\u80fd\u6536\uff0c\u4e0d\u6311\u5ba2\u6237\u7aef\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u8865\u5145\uff1anc\uff08netcat\uff09\u662f Linux \u81ea\u5e26\u7684\u201cTCP \u76f4\u8fde\u63a5\u5de5\u5177\u201d\uff1a\u7ed9\u5b83\u4e00\u4e2a\u5730\u5740\u548c\u7aef\u53e3\uff0c\u5b83\u5c31\u5efa\u7acb\u8fde\u63a5\uff0c\u628a\u6536\u5230\u7684\u4e00\u5207\u539f\u6837\u6253\u5370\u5230\u7ec8\u7aef\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u7b2c\u56db\u5757\uff1a\u5bb9\u5668\u91cc\u7684\u4e24\u5ea7\u6865\uff08\u7ffb\u8bd1\u5b98\uff09<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>lidar_bridge.py            odom_bridge.py --mode raw\n \u2502\/scan (LaserScan)          \u2502\/wheel_odom(\u53eatwist) + \/imu\/data_raw(\u53eavyaw)\n \u2502BEST_EFFORT                \u2502TF-free\uff08\u4f4d\u59ff\u51b3\u5b9a\u6743\u4e0a\u4ea4\uff09\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Pi \u4e0a\u6ca1\u6709 ROS \u8282\u70b9\u76f4\u63a5\u8bfb\u786c\u4ef6\u2014\u2014\u7ffb\u8bd1\u53d1\u751f\u5728 <code>ros_env<\/code> \u5bb9\u5668\u91cc\u7684\u4e24\u4e2a Python \u811a\u672c\u4e0a\u3002\u5b83\u4eec\u8bfb TCP\u3001\u628a JSON \u884c\u7ec4\u88c5\u6210 <strong>ROS \u6d88\u606f<\/strong>\u53d1\u51fa\u53bb\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u5de6\u6865\uff1a\u4e00\u884c\u5708 JSON \u2192 \u4e00\u4e2a <code>LaserScan<\/code> \u8bdd\u9898\u6d88\u606f\uff0c\u53d1\u5230 <strong><code>\/scan<\/code><\/strong>\u3002<code>BEST_EFFORT<\/code> = \u4f20\u611f\u5668\u7684\u6b63\u786e\u53d6\u820d\uff08\u8981\u6700\u65b0\uff0c\u4e0d\u8981\u91cd\u4f20\u65e7\u7684\uff09\u2014\u2014\u8fd9\u4e5f\u662f&#8221;\u6d4b\u9891\u7387\u5fc5\u987b\u52a0 <code>--qos-reliability best_effort<\/code>&#8220;\u7684\u6839\u6e90\u3002<\/li>\n\n\n\n<li>\u53f3\u6865\uff08raw \u6a21\u5f0f\uff09\uff1a<code>wheel<\/code> \u884c \u2192 <code>\/wheel_odom<\/code>\uff08<strong>\u53ea\u586b\u901f\u5ea6\u534a\u8fb9 twist<\/strong>\uff1avx\u3001vyaw\uff1b\u4f4d\u59ff\u7559\u96f6\uff09\uff1b<code>imu<\/code> \u884c \u2192 <code>\/imu\/data_raw<\/code>\uff08\u53ea\u586b gz\uff09\u3002<strong>TF-free = \u5b83\u4e0d\u53d1\u4efb\u4f55&#8221;\u8f66\u5728\u54ea&#8221;\u7684\u58f0\u660e<\/strong>\u2014\u2014\u5bc4\u751f\u89c2\u6d4b\u4e0d\u5bc4\u7ed3\u8bba\uff0c\u4f4d\u59ff\u7684\u51b3\u5b9a\u6743\u4e0a\u4ea4\u7ed9\u7b14\u8bb0\u672c\u7684 EKF\u3002\uff08\u4e3a\u4ec0\u4e48\uff1aPi \u7684\u878d\u5408\u662f\u4e8c\u9009\u4e00\u786c\u5f00\u5173\uff0cEKF \u7684\u662f\u6309\u8d28\u91cf\u52a0\u6743\u2014\u2014\u751f\u6570\u636e\u4ea4\u4e0a\u53bb\uff0c\u8ba9\u66f4\u597d\u7684\u7b97\u6cd5\u505a\u83dc\u3002\uff09<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">\u8de8\u6d77\uff1aWiFi DDS<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 WiFi DDS\uff08domain 0 + \u9759\u6001\u5bf9\u7aef\uff09\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">ROS \u8bdd\u9898\u662f\u5206\u5e03\u5f0f\u7684\uff1a\u6865\u53d1\u5230\u8bdd\u9898\u4e0a\uff0c<strong>\u8c01\u8ba2\u8c01\u6536\uff0c\u4e0d\u6307\u5b9a\u6536\u4ef6\u4eba<\/strong>\u3002\u53d1\u73b0\u673a\u5236\u9760 domain 0 + \u9759\u6001\u5bf9\u7aef\uff08\u4e24\u7aef\u65b9\u5411\u76f8\u53cd\uff1a\u7b14\u8bb0\u672c\u586b Pi \u7684 IP\uff0cPi \u5bb9\u5668\u586b\u7b14\u8bb0\u672c\u7684 IP\uff09+ SUBNET \u8303\u56f4\u3002<strong>\u6865\u548c\u6d88\u8d39\u8005\u9694\u7740\u4e00\u6574\u6bb5 WiFi\uff0c\u4f46\u4ee3\u7801\u91cc\u770b\u4e0d\u89c1&#8221;\u53d1\u9001\u5230\u7b14\u8bb0\u672c&#8221;\u8fd9\u79cd\u5b57\u6837<\/strong>\u2014\u2014\u8fd9\u5c31\u662f ROS \u7684\u89e3\u8026\uff1a\u53d1\u5e03\u8005\u6839\u672c\u4e0d\u77e5\u9053\u7b14\u8bb0\u672c\u5b58\u5728\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u7b2c\u4e94\u5757\uff1a\u7b14\u8bb0\u672c\uff0c\u4e24\u4e2a\u8ba1\u7b97\u8282\u70b9<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u5de6\u8fb9\uff0cEKF\u2014\u2014\u901f\u5ea6\u53d8\u4f4d\u59ff\uff1a<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/wheel_odom\u53d6vx+vyaw\u3001\/imu\u53d6vyaw\n\u2500\u2500\u79ef\u5206+\u52a0\u6743\u2500\u2500\u2192 (x,y,\u03b8) \u2500\u2500\u2192 TF odom\u2192base_link\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u8ba2\u4e24\u8def\u751f\u6570\u636e\uff0c\u5404\u53d6\u4e00\u9879\uff0815 \u4f4d\u914d\u7f6e\u91cc\u5176\u4f59 13 \u4f4d\u5168\u5173\uff09\u3002<strong>\u52a0\u6743<\/strong>\uff1a\u9640\u87ba vyaw \u7f6e\u4fe1 0.01\u3001\u7f16\u7801\u5668 vyaw \u7f6e\u4fe1 0.09\uff0c\u6309 9:1 \u6df7\u5408\uff0c\u67d0\u8def\u6302\u4e86\u81ea\u52a8\u584c\u5411\u53e6\u4e00\u8def\uff1b<strong>\u79ef\u5206<\/strong>\uff1avx\u3001vyaw \u6512\u6210\u6bcf\u4e00\u65f6\u523b\u7684 (x, y, \u03b8)\u3002\u7136\u540e\u4ee5 <strong>TF odom\u2192base_link<\/strong> \u7684\u5f62\u5f0f\u53d1\u5e03\u2014\u2014\u6570\u503c\u5c31\u662f\u4f4d\u59ff (x, y, \u03b8)\uff0c\u610f\u4e49\u662f&#8221;\u8f66\u6b64\u523b\u5728\u91cc\u7a0b\u8ba1\u5750\u6807\u7cfb\u91cc\u5728\u54ea\u671d\u54ea&#8221;\u3002<strong>\u5efa\u56fe\u7528\u7684\u90a3\u672c\u8d26\uff0c\u5728\u8fd9\u7ad9\u843d\u7b14\u3002<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u53f3\u8fb9\uff0cslam_toolbox\u2014\u2014\u4f4d\u59ff+\u626b\u63cf\u53d8\u5730\u56fe\uff1a<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\u2460\u53d6\/scan + TF\u653e\u7f6e\u626b\u63cf\n\u2461\u5339\u914d\/\u5efa\u8282\u70b9(\u9608\u503c0.5)\/\u56de\u73af\n\u2500\u2500\u2192 \/map + TF map\u2192odom(\u6539\u6b63\u6570\u8868)\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u6bcf\u5e27 \/scan \u5230\u4e86\uff1a\u2460 \u67e5 TF \u94fe\uff08map\u2192odom\u2192base_link\u2192laser_frame\uff0cGIS \u5f0f\u5206\u6b65\u57fa\u51c6\u8f6c\u6362\uff09\u77e5\u9053&#8221;\u8fd9\u5e27\u65f6\u523b\u96f7\u8fbe\u5728\u5730\u56fe\u91cc\u7684\u5927\u6982\u4f4d\u7f6e\u671d\u5411&#8221;\uff0c\u628a\u70b9\u653e\u8fdb\u5730\u56fe\uff1b\u2461 \u626b\u63cf\u5339\u914d\u5fae\u8c03 \u2192 \u632a\u591f 0.5m \u6216\u8f6c\u591f 0.5rad\uff08\u224828.6\u00b0\uff09\u8bbe\u4e00\u4e2a\u65b0\u9a7f\u7ad9\uff08\u8282\u70b9\uff09\u2192 \u8f6c\u56de\u8001\u5730\u65b9\u65f6\u8ba4\u51fa\u6765\uff08\u56de\u73af\uff09\u2192 \u4f4d\u59ff\u56fe\u4f18\u5316<strong>\u5e73\u5dee<\/strong>\uff0c\u8bef\u5dee\u5206\u644a\u56de\u6574\u6761\u8f68\u8ff9\u3002\u4ea7\u51fa\u4e24\u6837\uff1a<strong><code>\/map<\/code><\/strong>\uff08\u5360\u636e\u6805\u683c\u5730\u56fe\uff09\u548c <strong>TF map\u2192odom<\/strong>\uff08\u6539\u6b63\u6570\u8868\u2014\u2014odom \u8d26\u7167\u6f02\u4e0d\u6539\uff0c\u4fee\u6b63\u5168\u6302\u5728\u8fd9\u6761\u53d8\u6362\u4e0a\uff09\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u81f3\u6b64 TF \u6811\u95ed\u5408\uff0c\u4e09\u6761\u5404\u53f8\u5176\u4e3b<\/strong>\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>map \u2500\u2500TF\u2460(slam_toolbox\u53d1)\u2500\u2500 odom \u2500\u2500TF\u2461(EKF\u53d1)\u2500\u2500 base_link \u2500\u2500TF\u2462(\u9759\u6001)\u2500\u2500 laser_frame\n      \u5e73\u5dee\u6539\u6b63                   \u6b7b\u63a8\u4f4d\u59ff            \u8f66\u4f53              \u96f7\u8fbe\u5b89\u88c5\n<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>TF<\/th><th>\u8c01\u53d1\u5e03<\/th><th>\u6570\u636e\u6765\u6e90<\/th><th>\u6d88\u8d39\u8005<\/th><th>\u6027\u8d28<\/th><\/tr><\/thead><tbody><tr><td>odom\u2192base_link<\/td><td><strong>EKF<\/strong><\/td><td>vx+vyaw \u79ef\u5206<\/td><td>slam_toolbox\uff08\u653e\u626b\u63cf\uff09<\/td><td>\u5b9e\u65f6\uff0c30Hz<\/td><\/tr><tr><td>map\u2192odom<\/td><td><strong>slam_toolbox<\/strong><\/td><td>\u56de\u73af\u5e73\u5dee<\/td><td>\u6574\u68f5\u6811\u7684\u4fee\u6b63<\/td><td>\u6162\u901f\u8df3\u53d8\uff08\u56de\u73af\u65f6\uff09<\/td><\/tr><tr><td>base_link\u2192laser_frame<\/td><td>\u9759\u6001\u53d1\u5e03\u5668<\/td><td>\u5b89\u88c5\u5173\u7cfb\uff08\u672c\u9879\u76ee\u5168\u96f6\uff09<\/td><td>\u6240\u6709\u8981\u7528\u626b\u63cf\u7684\u4eba<\/td><td>\u6c38\u4e0d\u53d8<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">\u7b2c\u516d\u5757\uff1a\u6700\u540e\u4e00\u8df3\uff0c\u8fdb\u6d4f\u89c8\u5668<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>slam_service.py :5002 \u8ba2\u9605\/map\n        \u2502HTTP \u6805\u683c(gzip ~6KB) \u6bcf3s\n        \u25bc\n\u6d4f\u89c8\u5668\u300c\u5730\u56fe\u300d\u753b\u5e03 \u2190\u2014\u2014 \u70b9\u4e91\u8d70\u7684\u662f\u53e6\u4e00\u6761\u8def\uff1aSocket.IO :5000 \u76f4\u8fde\uff0c\u4e0d\u8fc7 ROS\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><code>slam_service<\/code> \u8ba2\u9605 <code>\/map<\/code>\uff0c\u6512\u6210 HTTP \u670d\u52a1\uff1b\u6d4f\u89c8\u5668\u6bcf 3 \u79d2\u8f6e\u8be2\u6805\u683c\uff08gzip \u540e\u7ea6 6KB\uff0c\u6ca1\u53d8\u4e0d\u91cd\u53d1\uff09\uff0c\u753b\u8fdb&#8221;\u5730\u56fe&#8221;\u753b\u5e03\u3002\u6ce8\u610f\u6700\u540e\u7684\u5206\u5c94\uff1a<strong>\u70b9\u4e91\u753b\u9762\u6839\u672c\u4e0d\u8fdb ROS<\/strong>\u2014\u2014\u540e\u7aef Socket.IO :5000 \u76f4\u63a8\u6d4f\u89c8\u5668\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e09\u3001\u9644\u5f55<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e2a\u4eba\u7406\u89e3\u7b14\u8bb0\uff0810.4 10.5\uff09\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"768\" height=\"1024\" src=\"https:\/\/geocommunity.vip\/wp-content\/uploads\/2026\/10\/\u7c98\u8d34\u7684\u56fe\u50cf-1-768x1024.png\" alt=\"\" class=\"wp-image-494\" style=\"aspect-ratio:0.7498535442296427;width:576px;height:auto\" srcset=\"https:\/\/geocommunity.vip\/wp-content\/uploads\/2026\/10\/\u7c98\u8d34\u7684\u56fe\u50cf-1-768x1024.png 768w, https:\/\/geocommunity.vip\/wp-content\/uploads\/2026\/10\/\u7c98\u8d34\u7684\u56fe\u50cf-1-225x300.png 225w, https:\/\/geocommunity.vip\/wp-content\/uploads\/2026\/10\/\u7c98\u8d34\u7684\u56fe\u50cf-1-1152x1536.png 1152w, https:\/\/geocommunity.vip\/wp-content\/uploads\/2026\/10\/\u7c98\u8d34\u7684\u56fe\u50cf-1.png 1280w\" sizes=\"auto, (max-width: 768px) 100vw, 768px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"768\" height=\"1024\" src=\"https:\/\/geocommunity.vip\/wp-content\/uploads\/2026\/10\/\u7c98\u8d34\u7684\u56fe\u50cf-2-1-768x1024.png\" alt=\"\" class=\"wp-image-495\" style=\"aspect-ratio:0.7498535442296427;width:464px;height:auto\" srcset=\"https:\/\/geocommunity.vip\/wp-content\/uploads\/2026\/10\/\u7c98\u8d34\u7684\u56fe\u50cf-2-1-768x1024.png 768w, https:\/\/geocommunity.vip\/wp-content\/uploads\/2026\/10\/\u7c98\u8d34\u7684\u56fe\u50cf-2-1-225x300.png 225w, https:\/\/geocommunity.vip\/wp-content\/uploads\/2026\/10\/\u7c98\u8d34\u7684\u56fe\u50cf-2-1-1152x1536.png 1152w, https:\/\/geocommunity.vip\/wp-content\/uploads\/2026\/10\/\u7c98\u8d34\u7684\u56fe\u50cf-2-1.png 1280w\" sizes=\"auto, (max-width: 768px) 100vw, 768px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"768\" height=\"1024\" src=\"https:\/\/geocommunity.vip\/wp-content\/uploads\/2026\/10\/\u7c98\u8d34\u7684\u56fe\u50cf-3-768x1024.png\" alt=\"\" class=\"wp-image-497\" style=\"aspect-ratio:0.7500050774823811;width:462px;height:auto\" srcset=\"https:\/\/geocommunity.vip\/wp-content\/uploads\/2026\/10\/\u7c98\u8d34\u7684\u56fe\u50cf-3-768x1024.png 768w, https:\/\/geocommunity.vip\/wp-content\/uploads\/2026\/10\/\u7c98\u8d34\u7684\u56fe\u50cf-3-225x300.png 225w, https:\/\/geocommunity.vip\/wp-content\/uploads\/2026\/10\/\u7c98\u8d34\u7684\u56fe\u50cf-3-1152x1536.png 1152w, https:\/\/geocommunity.vip\/wp-content\/uploads\/2026\/10\/\u7c98\u8d34\u7684\u56fe\u50cf-3.png 1280w\" sizes=\"auto, (max-width: 768px) 100vw, 768px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"768\" height=\"1024\" src=\"https:\/\/geocommunity.vip\/wp-content\/uploads\/2026\/10\/\u7c98\u8d34\u7684\u56fe\u50cf-4-768x1024.png\" alt=\"\" class=\"wp-image-498\" style=\"aspect-ratio:0.7498535442296427;width:581px;height:auto\" srcset=\"https:\/\/geocommunity.vip\/wp-content\/uploads\/2026\/10\/\u7c98\u8d34\u7684\u56fe\u50cf-4-768x1024.png 768w, https:\/\/geocommunity.vip\/wp-content\/uploads\/2026\/10\/\u7c98\u8d34\u7684\u56fe\u50cf-4-225x300.png 225w, https:\/\/geocommunity.vip\/wp-content\/uploads\/2026\/10\/\u7c98\u8d34\u7684\u56fe\u50cf-4-1152x1536.png 1152w, https:\/\/geocommunity.vip\/wp-content\/uploads\/2026\/10\/\u7c98\u8d34\u7684\u56fe\u50cf-4.png 1280w\" sizes=\"auto, (max-width: 768px) 100vw, 768px\" \/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>\u4e00\u3001\u5168\u666f\u56fe \u8fd9\u5f20\u56fe\u672c\u8d28\u4e0a\u662f\u4e09\u6bb5\u5730\u57df\uff08Pi \/ \u5bb9\u5668 \/ \u7b14\u8bb0\u672c\uff09\u3001\u4e24\u5ea7\u6865\u2026<\/p>\n","protected":false},"author":1,"featured_media":488,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[14,8,3],"tags":[],"class_list":["post-486","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-slam","category-8","category-3"],"_links":{"self":[{"href":"https:\/\/geocommunity.vip\/index.php\/wp-json\/wp\/v2\/posts\/486","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/geocommunity.vip\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/geocommunity.vip\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/geocommunity.vip\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/geocommunity.vip\/index.php\/wp-json\/wp\/v2\/comments?post=486"}],"version-history":[{"count":4,"href":"https:\/\/geocommunity.vip\/index.php\/wp-json\/wp\/v2\/posts\/486\/revisions"}],"predecessor-version":[{"id":500,"href":"https:\/\/geocommunity.vip\/index.php\/wp-json\/wp\/v2\/posts\/486\/revisions\/500"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/geocommunity.vip\/index.php\/wp-json\/wp\/v2\/media\/488"}],"wp:attachment":[{"href":"https:\/\/geocommunity.vip\/index.php\/wp-json\/wp\/v2\/media?parent=486"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/geocommunity.vip\/index.php\/wp-json\/wp\/v2\/categories?post=486"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/geocommunity.vip\/index.php\/wp-json\/wp\/v2\/tags?post=486"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}