{"id":510,"date":"2025-06-04T23:18:16","date_gmt":"2025-06-04T15:18:16","guid":{"rendered":"https:\/\/cennum.top\/?p=510"},"modified":"2025-06-04T23:19:54","modified_gmt":"2025-06-04T15:19:54","slug":"astra-pro-%e5%9c%a8ros2%e4%b8%ad%e4%bd%bf%e7%94%a8","status":"publish","type":"post","link":"https:\/\/cennum.top\/index.php\/2025\/06\/04\/astra-pro-%e5%9c%a8ros2%e4%b8%ad%e4%bd%bf%e7%94%a8\/","title":{"rendered":"Astra Pro \u5728ROS2\u4e2d\u4f7f\u7528"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">1.\u6548\u679c\u5c55\u793a<\/h2>\n\n\n\n<p>rviz2\u6548\u679c\u5c55\u793a<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"773\" src=\"https:\/\/cennum.top\/wp-content\/uploads\/2025\/06\/9209d8f5-c507-4191-a3df-a1291be7c425-1024x773.png\" alt=\"\" class=\"wp-image-511\" style=\"width:654px;height:auto\" srcset=\"https:\/\/cennum.top\/wp-content\/uploads\/2025\/06\/9209d8f5-c507-4191-a3df-a1291be7c425-1024x773.png 1024w, https:\/\/cennum.top\/wp-content\/uploads\/2025\/06\/9209d8f5-c507-4191-a3df-a1291be7c425-300x226.png 300w, https:\/\/cennum.top\/wp-content\/uploads\/2025\/06\/9209d8f5-c507-4191-a3df-a1291be7c425-768x580.png 768w, https:\/\/cennum.top\/wp-content\/uploads\/2025\/06\/9209d8f5-c507-4191-a3df-a1291be7c425.png 1354w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>ros2 topic\u5c55\u793a<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"725\" height=\"421\" src=\"https:\/\/cennum.top\/wp-content\/uploads\/2025\/06\/27064b58-5ecb-4d4f-8c8f-8b5559b3e7b3.png\" alt=\"\" class=\"wp-image-512\" srcset=\"https:\/\/cennum.top\/wp-content\/uploads\/2025\/06\/27064b58-5ecb-4d4f-8c8f-8b5559b3e7b3.png 725w, https:\/\/cennum.top\/wp-content\/uploads\/2025\/06\/27064b58-5ecb-4d4f-8c8f-8b5559b3e7b3-300x174.png 300w\" sizes=\"auto, (max-width: 725px) 100vw, 725px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">2.\u914d\u7f6e\u65b9\u6cd5<\/h2>\n\n\n\n<p>\u5f53\u4f60\u7684Astra pro\u5df2\u7ecf\u53ef\u4ee5\u5728\u4f60\u7684ubuntu\u4e0a\u8fd0\u884cOpenNI\u7684\u4f8b\u7a0b\u4e4b\u540e\uff0c\u4f60\u53ef\u4ee5\u5f88\u8f7b\u677e\u7684\u5c06Astra pro\u63a5\u5165ros2<\/p>\n\n\n\n<p>\u6559\u7a0b\u4f7f\u7528\u73af\u5883\uff08ubuntu22.04+ROS2 humble\uff09<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">2.1\u4e0b\u8f7dROS2 SDK<\/h4>\n\n\n\n<p>\u5b98\u7f51\u73b0\u5728\u65e0\u6cd5\u4e0b\u8f7d\uff0c\u524d\u5f80<a href=\"https:\/\/github.com\/orbbec\/ros2_astra_camera.git\">https:\/\/github.com\/orbbec\/ros2_astra_camera.git<\/a>\u4e0b\u8f7d<\/p>\n\n\n\n<p>\u4e0b\u8f7d\u540e\u4f1a\u5f97\u9053\u4fe9\u4e2a\u6444\u50cf\u5934\u7684ros2\u529f\u80fd\u5305<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"927\" height=\"294\" src=\"https:\/\/cennum.top\/wp-content\/uploads\/2025\/06\/image.png\" alt=\"\" class=\"wp-image-513\" style=\"width:811px;height:auto\" srcset=\"https:\/\/cennum.top\/wp-content\/uploads\/2025\/06\/image.png 927w, https:\/\/cennum.top\/wp-content\/uploads\/2025\/06\/image-300x95.png 300w, https:\/\/cennum.top\/wp-content\/uploads\/2025\/06\/image-768x244.png 768w\" sizes=\"auto, (max-width: 927px) 100vw, 927px\" \/><\/figure>\n\n\n\n<p>\u5982\u4e0a\u56fe\u6240\u793a\uff0c\u5728\u5bb6\u76ee\u5f55\uff5e\u4e0b\u521b\u5efaros2_ws\u5de5\u4f5c\u7a7a\u95f4\uff0c\u5728\u5de5\u4f5c\u7a7a\u95f4\u521b\u5efasrc\u6587\u4ef6\u5939\uff0c\u5c06\u8fd9\u4fe9\u4e2a\u529f\u80fd\u5305\u653e\u8fdb\u53bb<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">2.2 \u5b89\u88c5\u4f9d\u8d56<\/h4>\n\n\n\n<p>\u5728<a href=\"https:\/\/github.com\/orbbec\/ros2_astra_camera\/blob\/master\/README.MD\">https:\/\/github.com\/orbbec\/ros2_astra_camera\/blob\/master\/README.MD<\/a>\u7684readme.txt\u91cc\u9762\u6709\u8be6\u7ec6\u7684\u4f9d\u8d56\u5b89\u88c5\u6559\u7a0b\uff0c\u8fd9\u91cc\u53ea\u7b80\u5355\u8bf4\u4e00\u4e0b<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"384\" src=\"https:\/\/cennum.top\/wp-content\/uploads\/2025\/06\/image-1-1024x384.png\" alt=\"\" class=\"wp-image-514\" srcset=\"https:\/\/cennum.top\/wp-content\/uploads\/2025\/06\/image-1-1024x384.png 1024w, https:\/\/cennum.top\/wp-content\/uploads\/2025\/06\/image-1-300x112.png 300w, https:\/\/cennum.top\/wp-content\/uploads\/2025\/06\/image-1-768x288.png 768w, https:\/\/cennum.top\/wp-content\/uploads\/2025\/06\/image-1-1536x576.png 1536w, https:\/\/cennum.top\/wp-content\/uploads\/2025\/06\/image-1.png 1665w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>\u5728ROS2 humble\u73af\u5883\u4e0b\uff0c\u8fd8\u8981\u5b89\u88c5\u8fd9\u4e9bros\u5305<\/p>\n\n\n\n<pre class=\"wp-block-code has-ast-global-color-8-background-color has-background\"><code>sudo apt install libgflags-dev  ros-$ROS_DISTRO-image-geometry ros-$ROS_DISTRO-camera-info-manager\\\nros-$ROS_DISTRO-image-transport ros-$ROS_DISTRO-image-publisher libgoogle-glog-dev libusb-1.0-0-dev libeigen3-dev<\/code><\/pre>\n\n\n\n<p>\u6709\u4e9b\u53ef\u80fd\u5b89\u88c5\u4e0d\u4e0a\uff0c\u53ef\u4ee5\u5728\u4e0a\u9762\u7684\u547d\u4ee4\u672b\u5c3e\u52a0&#8211;fix-missing<\/p>\n\n\n\n<p>\u7136\u540e\u662f\u5b89\u88c5libuvc\uff0c\u76f4\u63a5\u8ddf\u7740\u5b98\u65b9\u6559\u7a0b\u6765<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">2.3 \u7f16\u8bd1\u5de5\u4f5c\u7a7a\u95f4<\/h4>\n\n\n\n<p>\u7f16\u8bd1\u524d\u5148\u524d\u5f80\u4ebaros2_ws\/src\/astra_camera\/scripts\u5b89\u88c5\u89c4\u5219<\/p>\n\n\n\n<pre class=\"wp-block-code has-ast-global-color-8-background-color has-background\"><code>cd ros2_ws\/src\/astra_camera\/scripts\nsudo bash install.sh\nsudo udevadm control --reload-rules &amp;&amp; sudo udevadm trigger<\/code><\/pre>\n\n\n\n<p>\u89c4\u5219\u5b89\u88c5\u5b8c\u6210\uff0c\u73b0\u5728\u8fdb\u5165\u5de5\u4f5c\u7a7a\u95f4\u4e0b\u7f16\u8bd1<\/p>\n\n\n\n<pre class=\"wp-block-code has-ast-global-color-8-background-color has-background\"><code>cd ~\/ros2_ws\ncolcon build --event-handlers  console_direct+  --cmake-args  -DCMAKE_BUILD_TYPE=Release<\/code><\/pre>\n\n\n\n<p>\u7f16\u8bd1\u8fd9\u91cc\u5927\u90e8\u5206\u62a5\u9519\u662f\u56e0\u4e3a\u8fd8\u6709\u4f9d\u8d56\u6ca1\u6709\u5b89\u88c5\u6210\u529f\uff08\u8fd9\u7c7b\u95ee\u9898\u8c8c\u4f3c\u53ef\u4ee5i\u901a\u8fc7rosdep\u6765\u89e3\u51b3\uff09\uff0c\u6216\u8005\u7248\u672c\u4e0d\u5339\u914d\uff0c<\/p>\n\n\n\n<p>2.3.1 \u964d\u7ea7 <code>setuptools<\/code><\/p>\n\n\n\n<p>ROS 2 Humble \u5efa\u8bae\u4f7f\u7528\u517c\u5bb9\u7684\u65e7\u7248\u672c <code>setuptools<\/code>\uff08\u4f8b\u5982 65.x\uff09\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code has-ast-global-color-8-background-color has-background\"><code>pip install setuptools==65.5.1<\/code><\/pre>\n\n\n\n<p>\u4e3a\u4e86\u786e\u4fdd\u4f60\u4f7f\u7528\u7684\u662f\u6b63\u786e\u7684 Python \u73af\u5883\uff08ROS \u4f7f\u7528\u7684 Python\uff09\uff0c\u5efa\u8bae\u6267\u884c\u4ee5\u4e0b\u64cd\u4f5c\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code has-ast-global-color-8-background-color has-background\"><code># \u4f7f\u7528\u7cfb\u7edfPython\u91cd\u65b0\u5b89\u88c5\u517c\u5bb9\u7248\u672c\npython3 -m pip install --user setuptools==65.5.1<\/code><\/pre>\n\n\n\n<p>\u6e05\u7406\u5e76\u91cd\u65b0\u7f16\u8bd1<\/p>\n\n\n\n<pre class=\"wp-block-code has-ast-global-color-8-background-color has-background\"><code>cd ~\/ros2_ws\nrm -rf build\/ install\/ log\/\ncolcon build --event-handlers console_direct+ --cmake-args -DCMAKE_BUILD_TYPE=Release<\/code><\/pre>\n\n\n\n<p>2.3.2 ros-humble-image-publisher\u5b89\u88c5\u4e0d\u4e0a\u5bfc\u81f4\u7f16\u8bd1\u62a5\u9519<\/p>\n\n\n\n<p>sudo apt install ros-humble-image-publisher \u5b89\u88c5\u4e0d\u4e0a\uff0c\u6211\u51fa\u73b0\u4e86\u8fd9\u4e2a\u95ee\u9898\uff0c\u89e3\u51b3\u7684\u65b9\u6cd5\u662f\u4f7f\u7528\u5b98\u65b9APT\u6e90\u6765\u5b89\u88c5<\/p>\n\n\n\n<p>2.3.3 \u7f3a\u5c11 <code>nlohmann_json<\/code> \u5f00\u53d1\u5305<\/p>\n\n\n\n<p>\u5b89\u88c5\u5c31\u5b8c\u4e86<\/p>\n\n\n\n<pre class=\"wp-block-code has-ast-global-color-8-background-color has-background\"><code>sudo apt install nlohmann-json3-dev<\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<p>\u7f16\u8bd1\u6210\u529f\u8fdb\u5165\u4e0b\u4e00\u6b65<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">2.4 \u542f\u52a8\u76f8\u673a\u8282\u70b9<\/h4>\n\n\n\n<pre class=\"wp-block-code has-ast-global-color-8-background-color has-background\"><code>source install\/setup.bash \nros2 launch astra_camera astra_pro.launch.xml<\/code><\/pre>\n\n\n\n<p>\u8fd9\u4e2a\u662f\u4e13\u95e8\u542f\u52a8astra pro\u7684launch<\/p>\n\n\n\n<p>\u542f\u52a8\u540e\u4e0d\u62a5\u9519\u8bef\u5373\u6210\u529f\uff0c\u73b0\u5728\u4f60\u53ef\u4ee5\u4f7f\u7528ros2 topic list \u6765\u67e5\u770b\u8bdd\u9898\uff0c<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">2.5 rviz2\u53ef\u89c6\u5316<\/h4>\n\n\n\n<p>\u4f7f\u7528rviz2\u547d\u4ee4\u6253\u5f00rviz\uff0c\u70b9\u51fbadd\uff0c\u6309\u8bdd\u9898\u6dfb\u52a0\uff0c\u4f60\u4f1a\u770b\u5230\u76f8\u673a\u53d1\u5e03\u7684\u8bdd\u9898\u3002<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>1.\u6548\u679c\u5c55\u793a rviz2\u6548\u679c\u5c55\u793a ros2 top &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,30],"tags":[],"class_list":["post-510","post","type-post","status-publish","format-standard","hentry","category-linux","category-ros2"],"_links":{"self":[{"href":"https:\/\/cennum.top\/index.php\/wp-json\/wp\/v2\/posts\/510","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cennum.top\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cennum.top\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cennum.top\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cennum.top\/index.php\/wp-json\/wp\/v2\/comments?post=510"}],"version-history":[{"count":3,"href":"https:\/\/cennum.top\/index.php\/wp-json\/wp\/v2\/posts\/510\/revisions"}],"predecessor-version":[{"id":533,"href":"https:\/\/cennum.top\/index.php\/wp-json\/wp\/v2\/posts\/510\/revisions\/533"}],"wp:attachment":[{"href":"https:\/\/cennum.top\/index.php\/wp-json\/wp\/v2\/media?parent=510"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cennum.top\/index.php\/wp-json\/wp\/v2\/categories?post=510"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cennum.top\/index.php\/wp-json\/wp\/v2\/tags?post=510"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}