idminer
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    **TurtleBot3(ROS2)-Foxy 中文線上手冊** === - 20231208 中譯發布,不會即時修正,內容如有差異不同,請以[**英文線上手冊**](https://emanual.robotis.com/docs/en/platform/turtlebot3/quick-start/) 的 Foxy 內容為主 O : 可支援 ∆ : 需要確認 X : 不支援 | 特色 | Kinetic | Melodic | Noetic | Dashing | Foxy | Galactic | Humble | | --- | --- | --- | --- | --- | --- | --- | --- | | 遙控 | O | O | O | O | O | O | O | | SLAM | O | O | O | O | O | O | O | | 導航 | O | O | O | O | O | O | O | | 模擬 | O | O | O | O | O | O | O | | 機器手臂 | O | O | O | O | O | ∆ | O | | Home Service Challenge | O | O | O | X | X | X | X | | 自動駕駛挑戰賽 | O | X | O | X | X | X | X | | 機器學習 | O | O | X | O | X | X | X | | 範例 | Kinetic | Melodic | Noetic | Dashing | Foxy | Galactic | Humble | | --- | --- | --- | --- | --- | --- | --- | --- | | Interactive Markers | O | X | X | X | X | X | X | | Obstacle Detection | O | X | X | O | X | X | X | | Position Control | O | X | X | O | X | X | X | | Point Operation | O | X | X | O | X | X | X | | Patrol | O | X | X | O | X | X | X | | Follower | O | X | X | X | X | X | X | | Panorama | O | X | X | X | X | X | X | | Auto Parking | O | X | X | O | X | X | X | | Auto Parking(Vision) | O | X | X | X | X | X | X | | Multi TurtleBot3 | O | X | X | X | X | X | X | # **3. TB3 快速入門指南** --- {%youtube 8w3xhG1GPdo %} ## 3.1. Remote PC(桌電/筆電) 設定 :::warning 警告: 以下介紹的內容是用來設定 Remote PC (也就是你的桌電或筆電),以便來遠端控制 TurtleBot3 用。千萬不要使用在 TurtleBot3 的 SBC 單板電腦上。 ::: :::warning **相容性警告** - Jetson Nano 不支援原生的 Ubuntu 20.04。請參考 [NVIDIA Developer forum](https://forums.developer.nvidia.com/t/when-will-jetpack-move-to-ubuntu-20-04/142517) 來詳細了解。 ::: :::info 備註: 操作的內容已在Ubuntu 20.04 及 ROS2 Dashing Foxy Fitzroy 版本上測試過。 ::: ### 3.1.1. 在 Remote PC 下載及安裝 Ubuntu 首先要在 Remote PC(你的桌電或是筆電)上安裝 Ubuntu(一種 Linux 作業系統). 請先下載 Ubuntu 20.04 LTS Desktop 版及參考安裝步驟進行安裝. - [Ubuntu 20.04 LTS Desktop image 64-bit 下載點](https://releases.ubuntu.com/20.04/) - [Ubuntu desktop 安裝步驟](https://ubuntu.com/tutorials/install-ubuntu-desktop#1-overview) ### 3.1.2. 在 Remote PC 安裝 ROS2 Ctrl+Alt+T 開啟 terminal 視窗,輸入以下指令 - 請先參考這個 [**script 檔**](https://raw.githubusercontent.com/ROBOTIS-GIT/robotis_tools/master/install_ros2_foxy.sh) ``` $ wget https://raw.githubusercontent.com/ROBOTIS-GIT/robotis_tools/master/install_ros2_foxy.sh $ sudo chmod 755 ./install_ros2_foxy.sh $ bash ./install_ros2_foxy.sh ``` - 如果安裝失敗,請參考[**官方 ROS2 Foxy 安裝指南**](https://index.ros.org/doc/ros2/Installation/Foxy/Linux-Install-Debians/) ### 3.1.3. 安裝相關 ROS2 Packages 1. 在 Remote PC 開新的 terminal (Ctrl + Alt + T) 2. 安裝 Gazebo11 ``` $ sudo apt-get install ros-foxy-gazebo-* ``` 3. 安裝 Cartographer ``` $ sudo apt install ros-foxy-cartographer $ sudo apt install ros-foxy-cartographer-ros ``` 4. 安裝 Navigation2 ``` $ sudo apt install ros-foxy-navigation2 $ sudo apt install ros-foxy-nav2-bringup ``` ### 3.1.4. 安裝 TurtleBot3 Packages TurtleBot3 可透過 Debian Packages 來安裝 ``` $ source ~/.bashrc $ sudo apt install ros-foxy-dynamixel-sdk $ sudo apt install ros-foxy-turtlebot3-msgs $ sudo apt install ros-foxy-turtlebot3 ``` - 如果需要用原始碼來 build TurtleBot3 Packages,可參照下列指令,如有二進位的套件請先移除,以避免冗餘。由原始碼來建立 packages,可提供可能解決現有問題的最新內容。 ``` $ sudo apt remove ros-foxy-turtlebot3-msgs $ sudo apt remove ros-foxy-turtlebot3 $ mkdir -p ~/turtlebot3_ws/src $ cd ~/turtlebot3_ws/src/ $ git clone -b foxy-devel https://github.com/ROBOTIS-GIT/DynamixelSDK.git $ git clone -b foxy-devel https://github.com/ROBOTIS-GIT/turtlebot3_msgs.git $ git clone -b foxy-devel https://github.com/ROBOTIS-GIT/turtlebot3.git $ cd ~/turtlebot3_ws $ colcon build --symlink-install $ echo 'source ~/turtlebot3_ws/install/setup.bash' >> ~/.bashrc $ source ~/.bashrc ``` ### 3.1.5. 環境設定 1. 設定 PC 上的 ROS 環境 ``` $ echo 'export ROS_DOMAIN_ID=30 #TURTLEBOT3' >> ~/.bashrc $ source ~/.bashrc ``` 如果你是用 Debian packages 的 apt install 指令來安裝 TurtleBot3,則可以忽略以下的 warning 訊息 ``` bash: /home/{$YOUR_ACCOUNT}/turtlebot3_ws/install/setup.bash: No such file or directory ``` ## 3.2. SBC 單板電腦設定 :::info - 安裝時需要供電及時間較久,不適合使用電池,建議使用TB3 內附的 SMPS 電源線接市電來供電。 - 需另備 HDMI 螢幕、鍵盤、滑鼠以完成設定 - 如要使用 webOS Robotics Platform,請參考 [**webOS Robotics Platform**](https://github.com/ros/meta-ros/wiki/OpenEmbedded-Build-Instructions) 指南。Packages 會在高效能 PC 上,使用 OpenEmbedded cross-compiled 後生成 image 映像檔。 ::: ### 3.2.1. 準備 microSD 卡及讀卡機 如果 PC 沒有 microSD 槽,請改用 microSD 讀卡機來燒錄映像檔。 ![](https://i.imgur.com/k9QUeo1.png) ### 3.2.2. 下載 TB3 SBC OS image ROS2 Foxy 需要 Ubuntu 20.04,請依不同硬體來下載 - 下載 [Raspberry Pi 3B+ ROS2 Foxy image](https://www.robotis.com/service/download.php?no=2058) - SHA256 : e1916b75573e3944c72552664ee1e32e9be32a026bd5b4323d0a4b5778243a1e - 下載 [Raspberry Pi 4B (2GB or 4GB) ROS2 Foxy image](https://www.robotis.com/service/download.php?no=2064) - SHA256 : 8b8b54ad80c7a02ae35da8e9e5d9750fdf21ec6098052a804986ab22ce10ba7e - 此映像檔會不相容於 Raspberry Pi 4B with 8GB RAM 版 :::info 可能會修改 recovery 映像檔,不會另行通知。 ::: ### 3.2.3. 解壓縮 image 將下載的 .img 檔解壓縮存到本地硬碟 ### 3.2.4. 燒錄 image 到 microSD 卡 可使用不同的映像檔燒錄工具,如 Raspberry Pi Imager 或 Linux Disks utility #### 3.2.4.1. 使用 Raspberry Pi Imager - 從樹莓派官網下載 [**Raspberry Pi Imager**](https://www.raspberrypi.org/software/) - 可參考 [Raspberry Pi Imager 詳細文件](https://www.raspberrypi.org/blog/raspberry-pi-imager-imaging-utility/) ![](https://emanual.robotis.com/assets/images/platform/turtlebot3/setup/rpi_imager.gif) 步驟 1. 按 CHOOSE OS 2. 按 Use Custom 選擇儲存於硬碟的 .img 映像檔 3. 按 CHOOSE STORAGE 選擇 microSD 4. 按 WRITE 開始燒錄映像檔 #### 3.2.4.2. 使用 Disks Utility Disks utility 工具程式已經內含在 Ubuntu Desktop 版內,搜尋 Disks 就可找到開啟此程式。 ![](https://emanual.robotis.com/assets/images/platform/turtlebot3/setup/disks.gif) 步驟 1. 在左邊控制面板選擇 microSD 2. 選擇 Restore Disk Image 選項 3. 開啟存在硬碟內的 .img 映像檔 4. 按 Start Restoring... > Restore 鍵 ### 3.2.5. Resize the Partition 調整分區大小 為了減少 recovery 映像檔的大小並減少將映像檔燒錄到 microSD 上的時間,recovery 檔的 partition 分區要被最小化。請調整分區大小以使用未分配的空間。 :::warning **請注意不要選擇錯誤的磁碟或分區。對 PC 的系統碟進行分區,可能會導致嚴重的系統故障。** ::: - [下載安裝 GParted GUI tool](https://gparted.org/download.php) ![](https://emanual.robotis.com/assets/images/platform/turtlebot3/setup/gparted.gif) 步驟 1. 從選單選擇 microSD 卡(mount 的位置會依系統而異) 2. 右鍵單擊黃色分區 3. 選擇 Resize/Move 選項 4. 拖拉分區的右方邊界,一直到最右方 5. 點擊 Resize/Move 鍵 6. 點擊上方的 Apply All Operations 綠色勾選 V 鍵 ### 3.2.6. 設置 WiFi 網路設定 :::info Note: 如果碰到有關 ROS GPG Key 的 apt failures(因為目前的 GPG key 已過期),你需要去更新 GPG Key。請參照 [ROS GPG Key Expiration Incident](https://emanual.robotis.com/docs/en/platform/turtlebot3/sbc_setup/#https://discourse.ros.org/t/ros-gpg-key-expiration-incident/20669) 來解決。 ::: 1. 開新的 terminal(Ctrl + Alt + T),到 microSD 卡內的 netplan 目錄。 使用 superuser 權限 sudo 來編輯 50-cloud-init.yaml 檔 ``` $ cd /media/$USER/writable/etc/netplan $ sudo nano 50-cloud-init.yaml ``` 檔案開啟後,把你的 wifi SSID 及密碼替換到 WIFI_SSID 及 WIFI_PASSWORD。 ![](https://i.imgur.com/mIUhdcR.png) Ctrl + S 儲存檔案後,Ctrl + X 跳出 ![](https://emanual.robotis.com/assets/images/platform/turtlebot3/setup/network_setup.gif) :::info 如果出現 “No such file or directory” 訊息,請確認 microSD 卡已經 mount 到系統上 ::: 之後 1. 樹莓派開機 a. 連接 HDMI 螢幕到樹莓派的 HDMI port b. 連接鍵盤跟滑鼠到樹莓派的 USB port c. 插入 microSD 卡 d. 連接電源(透過USB or OpenCR)讓樹莓派開機 e. 登入 ID: ubuntu,密碼: turtlebot :::danger HDMI 螢幕必須在開機前就接上樹莓派,要不然樹莓派的 HDMI port 會 disable 停用 ::: ### 3.2.7. ROS2 網路設置 在 ROS2 DDS communication 中,在相同網域時,ROS_Domain_ID 的設定在 **Remote PC** 及 **TurtleBot3** 端都要相同。 TurtleBot3 .bashrc 檔內預設 ROS_Domain_ID 是 30,建議將 Remote PC 跟 TurtleBot3 的 ROS_Domain_ID 都設為 30 ``` ROS_DOMAIN_ID=30 #TURTLEBOT3 ``` :::warning 警示: 請勿在相同網域內使用重複的 ROS_Domain_ID,這會造成傳輸資訊的衝突。 ::: ### 3.2.8. 新光達 LDS-02 的設定 | LDS-01 | LDS-02 | |:------------------------------------:|:------------------------------------:| | ![](https://i.imgur.com/HwtZjjx.png) | ![](https://i.imgur.com/BuuZp7A.png) | 2022 年版 TurtleBot3 標配的光達已經改為 LDS-02。請使用下列指令在 SBC(樹莓派) 上來設定 LDS-02 光達。 1. 安裝 LDS-02 driver 及更新 TB3 package ``` $ sudo apt update $ sudo apt install libudev-dev $ cd ~/turtlebot3_ws/src $ git clone -b ros2-devel https://github.com/ROBOTIS-GIT/ld08_driver.git $ cd ~/turtlebot3_ws/src/turtlebot3 && git pull $ rm -r turtlebot3_cartographer turtlebot3_navigation2 $ cd ~/turtlebot3_ws && colcon build --symlink-install ``` 2. Export LDS_MODEL to bashrc 檔。LDS model 可以是 LDS-01 或 LDS-02。 ``` $ echo 'export LDS_MODEL=LDS-02' >> ~/.bashrc $ source ~/.bashrc ``` 這樣就完成了 TB3 SBC 的設定。可參照下列 Ubuntu Blog 來取得更詳細資訊 - [Improving Security with Ubuntu](https://ubuntu.com/blog/steps-to-maximise-robotics-security-with-ubuntu) - [Improving User Experience of TurtleBot3 Waffle Pi](https://ubuntu.com/blog/building-a-better-turtlebot3) - [How to set up TurtleBot3 Waffle Pi in minutes with Snaps](https://ubuntu.com/blog/how-to-set-up-turtlebot3-in-minutes-with-snaps) ### 3.2.8-1. 使用手動方式設定 SBC 手動安裝會比由 recovery 映像檔安裝,花更多時間,但可以更有彈性的安裝需要的 packages。**手動方式不建議初學者採用** 1. 下載 Ubuntu 20.04 server 映像檔 - [Ubuntu 20.04 Server 64-bit](https://ubuntu.com/download/raspberry-pi) 2. 解壓縮 image 3. 燒錄 image 到 microSD 卡。可使用不同的映像檔燒錄工具,如 Raspberry Pi Imager 或 Linux Disks utility。 ![](https://emanual.robotis.com/assets/images/platform/turtlebot3/setup/rpi_imager.gif) a. 按 CHOOSE OS b. 按 Use Custom 選擇儲存於硬碟的 .img 映像檔 c. 按 CHOOSE STORAGE 選擇 microSD d. 按 WRITE 開始燒錄映像檔 4. 樹莓派開機 a. 連接 HDMI 螢幕到樹莓派的 HDMI port b. 連接鍵盤跟滑鼠到樹莓派的 USB port c. 插入 microSD 卡 d. 連接電源(透過USB or OpenCR)讓樹莓派開機 5. 設置樹莓派 a. 登入 ID: ubuntu,密碼: ubuntu,登入後會要求更改密碼 b. 打開自動更新檔 ``` $ sudo nano /etc/apt/apt.conf.d/20auto-upgrades ``` 6. 編輯 disable 停用自動更新設定 ``` APT::Periodic::Update-Package-Lists "0"; APT::Periodic::Unattended-Upgrade "0"; ``` a. Ctrl + S 儲存檔案,Ctrl + X 結束 7. 輸入指令設定 WiFi 網路 ``` $ sudo nano /etc/netplan/50-cloud-init.yaml ``` 8. 檔案開啟後,將下列內容添加到檔案的最後。然後將 WIFI_SSID 及 WIFI_PASSWORD 內容替換為你的 Wifi ID 及密碼,之後 Ctrl + S 儲存檔案,Ctrl + X 結束 ![](https://i.imgur.com/v2qInWZ.png) 9. SBC 樹莓派重開機 ``` $ sudo reboot ``` 10. 設定 systemd 避免無網路時會開機延遲,需要以下指令來 mask systemd 程序。 ``` $ systemctl mask systemd-networkd-wait-online.service ``` 11. Disable 停用 Suspend 及 Hilbernation ``` $ sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target ``` 12. 樹莓派重開機後,如果要在 Remote PC 上使用 SSH 連上樹莓派工作,則在 Remote PC 的 terminal 輸入以下指令,預設密碼是 ubuntu 或使用新密碼 ``` $ ssh ubuntu@{IP Address of Raspberry PI} ``` 13. 安裝 ROS2 Foxy Fiztroy 在 SBC terminal 輸入下列指令,一次一行 也可參考此腳本 [script 檔](https://raw.githubusercontent.com/ROBOTIS-GIT/robotis_tools/master/install_ros2_foxy_rpi.sh),來了解安裝的細節 ``` $ sudo apt update $ wget https://raw.githubusercontent.com/ROBOTIS-GIT/robotis_tools/master/install_ros2_foxy_rpi.sh $ chmod 755 ./install_ros2_foxy_rpi.sh $ bash ./install_ros2_foxy_rpi.sh ``` 以上安裝如果失敗,可參考官方 [official ROS2 Foxy installation guide](https://docs.ros.org/en/foxy/Installation/Ubuntu-Install-Debians.html) 來處理。 14. 安裝及 Build ROS Packages ``` $ sudo apt install python3-argcomplete python3-colcon-common-extensions libboost-system-dev build-essential $ sudo apt install ros-foxy-hls-lfcd-lds-driver $ sudo apt install ros-foxy-turtlebot3-msgs $ sudo apt install ros-foxy-dynamixel-sdk $ mkdir -p ~/turtlebot3_ws/src && cd ~/turtlebot3_ws/src $ git clone -b foxy-devel https://github.com/ROBOTIS-GIT/turtlebot3.git $ cd ~/turtlebot3_ws/src/turtlebot3 $ rm -r turtlebot3_cartographer turtlebot3_navigation2 $ cd ~/turtlebot3_ws/ $ echo 'source /opt/ros/foxy/setup.bash' >> ~/.bashrc $ source ~/.bashrc $ colcon build --symlink-install --parallel-workers 1 $ echo 'source ~/turtlebot3_ws/install/setup.bash' >> ~/.bashrc $ source ~/.bashrc ``` 15. 設定 OpenCR 的 USB port ``` $ sudo cp `ros2 pkg prefix turtlebot3_bringup`/share/turtlebot3_bringup/script/99-turtlebot3-cdc.rules /etc/udev/rules.d/ $ sudo udevadm control --reload-rules $ sudo udevadm trigger ``` 16. 設定 ROS Domain ID in ROS2 DDS communication。在相同網域時,ROS_Domain_ID 的設定在 **Remote PC** 及 **TurtleBot3** 端需要相同。參照以下指令來指定 ROS_Domain_ID 給 TB3 上的 SBC - 預設 TurtleBot3 ID 是 30 - 建議將 Remote PC 跟 TurtleBot3 的 ROS_Domain_ID 都設為 30 ``` $ echo 'export ROS_DOMAIN_ID=30 #TURTLEBOT3' >> ~/.bashrc $ source ~/.bashrc ``` :::warning 警示: 請勿在相同網域內使用重複的 ROS_Domain_ID,這會造成傳輸資訊的衝突。 ::: 2022 年版 TurtleBot3 標配的光達已經改為 LDS-02。請使用下列指令在 SBC(樹莓派) 上來設定 LDS-02 光達。 1. 安裝 LDS-02 driver 及更新 TB3 package ``` $ sudo apt update $ sudo apt install libudev-dev $ cd ~/turtlebot3_ws/src $ git clone -b ros2-devel https://github.com/ROBOTIS-GIT/ld08_driver.git $ cd ~/turtlebot3_ws && colcon build --symlink-install ``` 2. Export LDS_MODEL to bashrc 檔及套用變更。LDS model 可以是 LDS-01 或 LDS-02。 ``` $ echo 'export LDS_MODEL=LDS-02' >> ~/.bashrc $ source ~/.bashrc ``` ## 3.3. OpenCR 控制板設定 1. 使用 microUSB 連接線連接樹莓派及 OpenCR 2. 樹莓派安裝所需套件來上傳 OpenCR 韌體 ``` $ sudo dpkg --add-architecture armhf $ sudo apt update $ sudo apt install libc6:armhf ``` 3. 依照 TB3 的款式,設定 OpenCR_MODEL 參數為 burger 或 waffle ``` $ export OPENCR_PORT=/dev/ttyACM0 $ export OPENCR_MODEL=burger $ rm -rf ./opencr_update.tar.bz2 ``` 4. 下載韌體解壓縮 ``` $ wget https://github.com/ROBOTIS-GIT/OpenCR-Binaries/raw/master/turtlebot3/ROS2/latest/opencr_update.tar.bz2 $ tar -xjf ./opencr_update.tar.bz2 ``` 5. 上傳韌體到 OpenCR ``` $ cd ~/opencr_update $ ./update.sh $OPENCR_PORT $OPENCR_MODEL.opencr ``` 6. Burger 如果成功上傳韌體,會出現類似下列資訊 ![](https://i.imgur.com/wL37GsT.png) 7. 如果上傳失敗,可以嘗試在 recovery mode 下重新上傳韌體。OpenCR 的 recovery mode 啟動順序如下。在 recovery mode 時,OpenCR 的 STATUS led 燈會定時的閃爍。 - 按住 PUSH SW2 鍵 - 按一下 Reset 鍵然後鬆開 - 再鬆開 PUSH SW2 鍵 ![](https://i.imgur.com/ZilkkEU.png) **補充資料: 使用 Arduino IDE 來上傳韌體步驟** 跟 Dashing 相同內容,請參考 Dashing 內容 ### 3.3.1. OpenCR 測試 跟 Dashing 相同內容,請參考 Dashing 內容 ## 3.4. 硬體組裝 ![](https://i.imgur.com/CEvRMfd.png) ### 3.4.1. 組裝手冊 跟 Dashing 相同內容,請參考 Dashing 內容 ### 3.4.2. TB3 組裝影片 跟 Dashing 相同內容,請參考 Dashing 內容 ## 3.5. Bringup 開始啟用 ### 3.5.1. 啟動 TB3 1. 在 PC 上 Ctrl + Alt + T 開新 terminal,連上樹莓派的 IP address。使用預設的密碼 turtlebot ``` $ ssh ubuntu@{IP_ADDRESS_OF_RASPBERRY_PI} ``` 2. 啟動基礎套件開始 TB3 應用。替換TURTLEBOT3_MODEL 參數為使用的款式- burger,waffle,或 waffle_pi ``` $ export TURTLEBOT3_MODEL=burger $ ros2 launch turtlebot3_bringup robot.launch.py ``` 3. 如果使用的 TB3 是 burger,視窗會出現訊息 ``` $ export TURTLEBOT3_MODEL=burger $ ros2 launch turtlebot3_bringup robot.launch.py [INFO] [launch]: All log files can be found below /home/ubuntu/.ros/log/2019-08-19-01-24-19-009803-ubuntu-15310 [INFO] [launch]: Default logging verbosity is set to INFO urdf_file_name : turtlebot3_burger.urdf [INFO] [robot_state_publisher-1]: process started with pid [15320] [INFO] [hlds_laser_publisher-2]: process started with pid [15321] [INFO] [turtlebot3_ros-3]: process started with pid [15322] [robot_state_publisher-1] Initialize urdf model from file: /home/ubuntu/turtlebot_ws/install/turtlebot3_description/share/turtlebot3_description/urdf/turtlebot3_burger.urdf [robot_state_publisher-1] Parsing robot urdf xml string. [robot_state_publisher-1] Link base_link had 5 children [robot_state_publisher-1] Link caster_back_link had 0 children [robot_state_publisher-1] Link imu_link had 0 children [robot_state_publisher-1] Link base_scan had 0 children [robot_state_publisher-1] Link wheel_left_link had 0 children [robot_state_publisher-1] Link wheel_right_link had 0 children [robot_state_publisher-1] got segment base_footprint [robot_state_publisher-1] got segment base_link [robot_state_publisher-1] got segment base_scan [robot_state_publisher-1] got segment caster_back_link [robot_state_publisher-1] got segment imu_link [robot_state_publisher-1] got segment wheel_left_link [robot_state_publisher-1] got segment wheel_right_link [turtlebot3_ros-3] [INFO] [turtlebot3_node]: Init TurtleBot3 Node Main [turtlebot3_ros-3] [INFO] [turtlebot3_node]: Init DynamixelSDKWrapper [turtlebot3_ros-3] [INFO] [DynamixelSDKWrapper]: Succeeded to open the port(/dev/ttyACM0)! [turtlebot3_ros-3] [INFO] [DynamixelSDKWrapper]: Succeeded to change the baudrate! [robot_state_publisher-1] Adding fixed segment from base_footprint to base_link [robot_state_publisher-1] Adding fixed segment from base_link to caster_back_link [robot_state_publisher-1] Adding fixed segment from base_link to imu_link [robot_state_publisher-1] Adding fixed segment from base_link to base_scan [robot_state_publisher-1] Adding moving segment from base_link to wheel_left_link [robot_state_publisher-1] Adding moving segment from base_link to wheel_right_link [turtlebot3_ros-3] [INFO] [turtlebot3_node]: Start Calibration of Gyro [turtlebot3_ros-3] [INFO] [turtlebot3_node]: Calibration End [turtlebot3_ros-3] [INFO] [turtlebot3_node]: Add Motors [turtlebot3_ros-3] [INFO] [turtlebot3_node]: Add Wheels [turtlebot3_ros-3] [INFO] [turtlebot3_node]: Add Sensors [turtlebot3_ros-3] [INFO] [turtlebot3_node]: Succeeded to create battery state publisher [turtlebot3_ros-3] [INFO] [turtlebot3_node]: Succeeded to create imu publisher [turtlebot3_ros-3] [INFO] [turtlebot3_node]: Succeeded to create sensor state publisher [turtlebot3_ros-3] [INFO] [turtlebot3_node]: Succeeded to create joint state publisher [turtlebot3_ros-3] [INFO] [turtlebot3_node]: Add Devices [turtlebot3_ros-3] [INFO] [turtlebot3_node]: Succeeded to create motor power server [turtlebot3_ros-3] [INFO] [turtlebot3_node]: Succeeded to create reset server [turtlebot3_ros-3] [INFO] [turtlebot3_node]: Succeeded to create sound server [turtlebot3_ros-3] [INFO] [turtlebot3_node]: Run! [turtlebot3_ros-3] [INFO] [diff_drive_controller]: Init Odometry [turtlebot3_ros-3] [INFO] [diff_drive_controller]: Run! ``` 4. 可用指令列出 Topics 及 services - **Topic list** ``` $ ros2 topic list /battery_state /cmd_vel /imu /joint_states /magnetic_field /odom /parameter_events /robot_description /rosout /scan /sensor_state /tf /tf_static ``` - **Service list** ``` $ ros2 service list /diff_drive_controller/describe_parameters /diff_drive_controller/get_parameter_types /diff_drive_controller/get_parameters /diff_drive_controller/list_parameters /diff_drive_controller/set_parameters /diff_drive_controller/set_parameters_atomically /hlds_laser_publisher/describe_parameters /hlds_laser_publisher/get_parameter_types /hlds_laser_publisher/get_parameters /hlds_laser_publisher/list_parameters /hlds_laser_publisher/set_parameters /hlds_laser_publisher/set_parameters_atomically /launch_ros/describe_parameters /launch_ros/get_parameter_types /launch_ros/get_parameters /launch_ros/list_parameters /launch_ros/set_parameters /launch_ros/set_parameters_atomically /motor_power /reset /sound /turtlebot3_node/describe_parameters /turtlebot3_node/get_parameter_types /turtlebot3_node/get_parameters /turtlebot3_node/list_parameters /turtlebot3_node/set_parameters /turtlebot3_node/set_parameters_atomically ``` ### 3.5.2. 在 RViz 載入 TurtleBot3 1. 需先啟動 TB3 2. 開新的 terminal 啟動 RViz ``` $ ros2 launch turtlebot3_bringup rviz2.launch.py ``` ![](https://i.imgur.com/WY9Q3lb.png) ## 3.6. 基本操作 ### 3.6.1. Teleoperation 遙控 :::warning **警示**:在執行遙控前,請先從 SBC 啟動 TB3。如在桌上測試 TB3 時須注意以防掉落桌面。 ::: TurtleBot3 可用不同的設備來遙控。只要先確認 SBC 及 ROS 版本都先裝好了所需的 ROS packages。 {%youtube Z4s18hlazb4 %} :::info **備註**: 手冊中的影片內容可能隨時更新,恕不另行通知。 ::: #### 3.6.1.1. 鍵盤 跟 Dashing 相同內容,請參考 Dashing 內容 #### 3.6.1.2. RC-100 遙控器 跟 Dashing 相同內容,請參考 Dashing 內容 #### 3.6.1.3. PS3 搖桿 跟 Dashing 相同內容,請參考 Dashing 內容 #### 3.6.1.4. XBOX 360 搖桿 跟 Dashing 相同內容,請參考 Dashing 內容 ### 3.6.2. Topic Monitor 跟 Dashing 相同內容,請參考 Dashing 內容 # **4. SLAM 地圖定位** --- 跟 Dashing 相同內容,請參考 Dashing 內容 ## 4.1. 執行 SLAM Node 1. 以下步驟先啟動 TB3,如已經啟動了可以跳過此步驟 - Ctrl + Alt + T 在 Remote PC 開新 terminal,連接樹莓派的 IP address,預設密碼是 ubuntu。 ``` $ ssh ubuntu@{IP_ADDRESS_OF_RASPBERRY_PI} ``` - TURTLEBOT3_MODEL 參數需對應好,${TB3_MODEL} - burger,waffle,或 waffle_pi ``` $ export TURTLEBOT3_MODEL=${TB3_MODEL} $ ros2 launch turtlebot3_bringup robot.launch.py ``` 2. 在 Remote PC 開新 terminal,執行 SLAM node。Cartographer 是預設的 SLAM 方法。 ``` $ export TURTLEBOT3_MODEL=${TB3_MODEL} $ ros2 launch turtlebot3_cartographer cartographer.launch.py ``` ![](https://i.imgur.com/6FLFX1A.png) :::info Tips: **如何儲存 TURTLEBOT3_MODEL 參數?** 如果 TURTLEBOT3_MODEL 參數已經預先定義在 .bashrc 檔內,則 $ export TURTLEBOT3_MODEL=${TB3_MODEL} 指令可以省略。當新的 terminal 開啟時,.bashrc 檔會自動載入 - 定義 TurtleBot3 Burger 為預設 model 範例 ``` $ echo 'export TURTLEBOT3_MODEL=burger' >> ~/.bashrc $ source ~/.bashrc ``` - 定義 TurtleBot3 Waffle Pi 為預設 model 範例 ``` $ echo 'export TURTLEBOT3_MODEL=waffle_pi' >> ~/.bashrc $ source ~/.bashrc ``` ::: ## 4.2. 執行 Teleoperation Node 跟 Dashing 相同內容,請參考 Dashing 內容 ## 4.3. 微調指南 ROS2 的 SLAM 預設使用 Cartographer,透過 Lua 檔設定地圖選項。 以下列出的選項是在 turtlebot3_cartographer/config/turtlebot3_lds_2d.lua 檔內的設定,更詳細的資訊可參考 [官方 Cartographer ROS official documentation](https://google-cartographer-ros.readthedocs.io/en/latest/algo_walkthrough.html)。 ### 4.3.1. MAP_BUILDER.use_trajectory_builder_2d 此選項設定 SLAM 的種類 ### 4.3.2. TRAJECTORY_BUILDER_2D.min_range 此選項設定光達的最小可用距離 ### 4.3.3. TRAJECTORY_BUILDER_2D.max_range 此選項設定光達的最大可用距離 ### 4.3.4. TRAJECTORY_BUILDER_2D.missing_data_ray_length 在 2D 情形,Cartographer 會以此項取代超過最大距離的數據來建圖 ### 4.3.5. TRAJECTORY_BUILDER_2D.use_imu_data 如使用 2D SLAM,距離資訊可以被即時處理,而不須額外的數據源。此時你可以選擇是否要 Cartographer 使用 IMU 感測器來的數據。 ### 4.3.6. TRAJECTORY_BUILDER_2D.use_online_correlative_scan_matching Local SLAM: RealTimeCorrelativeScanMatcher 可以根據感測器的可靠性進行切換 ### 4.3.7. TRAJECTORY_BUILDER_2D.motion_filter.max_angle_radians Local SLAM: 為了避免在每個子圖上插入過多的掃描數據,如果移動時不超過某個角度,則丟棄一次掃描數據。 ### 4.3.8. POSE_GRAPH.optimize_every_n_nodes Global SLAM(全域 SLAM): 可將 POSE_GRAPH.optimize_every_n_nodes 設置為 0,是停用 global SLAM 並專注於 local SLAM 行為的便捷方法。 ### 4.3.9. POSE_GRAPH.constraint_builder.min_score Global SLAM(全域 SLAM): 掃描匹配分數的臨界值,低於該臨界值不考慮匹配。低分數表示掃描和地圖看起來不相似。 ### 4.3.10. POSE_GRAPH.constraint_builder.global_localization_min_score Global SLAM(全域 SLAM): 低於此臨界值,則全域定位不可信任。 :::info Note: Constraints 可以在 RViz 中可視化,用來調整 global SLAM 非常方便。還可以切換為 POSE_GRAPH.constraint_builder.log_matches 來取得由 constraints builder 所輸出直方圖格式的定期報告。 ::: ## 4.4. 儲存地圖 地圖會根據機器人移動時的 odometry 測距數據,tf 資訊,及感測器掃描的資訊來建圖。當 TB3 移動時,地圖數據會呈現在 RViz 視窗。在建好所需區域的完整地圖後,將地圖資料儲存在硬碟以備後續使用。 1. 啟動在 nav2_map_server package 中的 map_saver_cli node 來產生地圖檔。地圖檔會儲存在 map_saver_cli node 所在的資料夾。除非另外命名,map 是預設的地圖檔名,會產生 map.pgm 及 map.yaml 兩個檔。 ``` $ ros2 run nav2_map_server map_saver_cli -f ~/map ``` - -f 選項是用來指定資料夾位置以及要儲存的檔名。以上的指令是指 map.pgm 及 map.yaml 檔,會被儲存在 home 資料夾 ~/ (/home/${username}). ## 4.5. 地圖 地圖是 ROS 社群中常用的二維 **Occupancy Grid Map(OGM)** 地圖。儲存的地圖大略如下圖所示,**白色**是機器人可以移動的空白區域,**黑色**是機器人不能移動的佔用區域,**灰色**則是未知區域。地圖可在 Navigation 導航中使用。 ![](https://i.imgur.com/NKeh7u8.png) 下圖顯示了使用 TurtleBot3 創建大型地圖的結果。花了大約一個小時才製作出一幅移動距離約為 350 公尺的地圖。 ![](https://i.imgur.com/RfsuCzp.png) # **5. Navigation 導航** --- 跟 Dashing 相同內容,請參考 Dashing 內容 ## 5.1. 執行 Navigation Nodes 跟 Dashing 相同內容,請參考 Dashing 內容 ## 5.2. 估計 Initial Pose 跟 Dashing 相同內容,請參考 Dashing 內容 ## 5.3. Set Navigation Goal 設定導航目標 跟 Dashing 相同內容,請參考 Dashing 內容 ## 5.4. 微調指南 跟 Dashing 相同內容,請參考 Dashing 內容 ### 5.4.1. Costmap 參數 跟 Dashing 相同內容,請參考 Dashing 內容 ### 5.4.2. dwb_controller 跟 Dashing 相同內容,請參考 Dashing 內容 # **6. Simulation 模擬** --- 跟 Dashing 相同內容,請參考 Dashing 內容 ## 6.1. Gazebo Simulation {%youtube UzOoJ6a_mOg %} :::info **備註**: 手冊中的影片內容可能隨時更新,恕不另行通知。 ::: Gazebo Simulation 使用 ROS Gazebo package,因此必須事先安裝支援 ROS2 Foxy 的 Gazebo 版本。 ### 6.1.1. 安裝 Simulation Package **TurtleBot3 Simulation Package** 需要 turtlebot3 及 turtlebot3_msgs packages 為先決條件。沒有這兩個 packages,無法啟動 Simulation。 如果還沒有安裝所需 packages,可參照 Remote PC 設定章節來安裝。 ``` $ cd ~/turtlebot3_ws/src/ $ git clone -b foxy-devel https://github.com/ROBOTIS-GIT/turtlebot3_simulations.git $ cd ~/turtlebot3_ws && colcon build --symlink-install ``` ### 6.1.2. 啟動 Simulation World 世界地圖 跟 Dashing 相同內容,請參考 Dashing 內容 ### 6.1.3. 操作 TB3 跟 Dashing 相同內容,請參考 Dashing 內容 ## 6.2. SLAM 模擬 跟 Dashing 相同內容,請參考 Dashing 內容 ### 6.2.1. 開啟 Simulation World 世界地圖 跟 Dashing 相同內容,請參考 Dashing 內容 ### 6.2.2. 執行 SLAM Node 跟 Dashing 相同內容,請參考 Dashing 內容 ### 6.2.3. 執行 Teleoperation Node 跟 Dashing 相同內容,請參考 Dashing 內容 ### 6.2.4. 儲存地圖 當地圖成功產生後,在 Remote PC 開新 terminal(Ctrl + Alt + T) 並儲存地圖 ![](https://i.imgur.com/JZK7zZ5.png) ``` $ ros2 run nav2_map_server map_saver_cli -f ~/map ``` ![](https://i.imgur.com/Q5ozbRR.png) 所儲存的 map.pgm 檔 ## 6.3. Navigation Simulation 模擬導航 跟 Dashing 相同內容,請參考 Dashing 內容 ### 6.3.1. 開啟模擬的世界地圖 跟 Dashing 相同內容,請參考 Dashing 內容 ### 6.3.2. 執行 Navigation Node 跟 Dashing 相同內容,請參考 Dashing 內容 ### 6.3.3. 估計 Initial Pose 初始方位 跟 Dashing 相同內容,請參考 Dashing 內容 ### 6.3.4. Set Navigation Goal 設定導航目標 跟 Dashing 相同內容,請參考 Dashing 內容 ## 6.4. Fake Node Simulation 假節點模擬 跟 Dashing 相同內容,請參考 Dashing 內容 ## 6.5. 單獨的 Gazebo Simulation :::info 此功能只支援 Kinetic 版 ::: # **7. Manipulation 機器手臂** --- :::info **備註**: - 操作的內容已在 Ubuntu 20.04 及 ROS2 Foxy Fitzroy 版本上測試過。 - 如要了解更多 OpenManipulator-X 機器手臂資訊,請參考 [OpenManipulator-X 線上手冊(英)](https://emanual.robotis.com/docs/en/platform/openmanipulator_x/overview/) ::: :::info **備註**: 此手冊中的內容可能隨時更新,有些影片也會跟 emanual 上的不同,恕不另行通知。 ::: :::success **提示**:Ubuntu 的 Terminal (終端機)可以在螢幕左上方的 Search 圖示找到. 快捷鍵可以使用 Ctrl-Alt-T. ::: ## 7.1. TurtleBot3 跟 OpenManipulator-X 機器手臂 :::info 跟 Dashing 相同內容,請參考 Dashing 內容 ::: ## 7.2. 手臂軟體設定 :::info **備註**:TurtleBot3 Manipulation for ROS2 Foxy 需要 turtlebot3_manipulation 套件。 請按照以下說明安裝所需的套件及其相依性套件。 ::: **[TurtleBot3]** 1. 使用 ssh 指令連上 TB3 上的樹莓派 ``` $ ssh ubuntu@{IP_ADDRESS_OF_TURTLEBOT3} ``` 2. 下列指令安裝 TurtleBot3 Manipulation 相關套件 ``` $ cd ~/turtlebot3_ws/src/ $ git clone -b foxy-devel https://github.com/ROBOTIS-GIT/turtlebot3_manipulation.git $ cd ~/turtlebot3_ws && colcon build --symlink-install ``` **[Remote PC]** 1. 在 Remote PC 開新的 terminal 2. 下列指令安裝相關套件 ``` $ sudo apt install ros-foxy-dynamixel-sdk ros-foxy-ros2-control ros-foxy-ros2-controllers ros-foxy-gripper-controllers ros-foxy-moveit $ cd ~/turtlebot3_ws/src/ $ git clone -b foxy-devel https://github.com/ROBOTIS-GIT/turtlebot3_manipulation.git $ cd ~/turtlebot3_ws && colcon build --symlink-install ``` ## 7.3. 手臂硬體組裝 跟 Dashing 相同內容,請參考 Dashing 內容 ## 7.4. OpenCR 控制板設定 :::info **備註**:要使用 OpenManipulator-X 機器手臂,需要先上傳韌體到 OpenCR,你可以選擇任一種上傳韌體的方法(shell script 或 Arduino IDE)。但我們強烈建議使用 **shell script 腳本**。 如果需要修改 TurtleBot3 的韌體,則可以使用第二種方法。 - 方法 1:[Shell script 腳本](https://emanual.robotis.com/docs/en/platform/turtlebot3/manipulation/#shell-script),使用 shell script 腳本上傳預建好的二進位檔。 - 方法 2:[Arduino IDE](https://emanual.robotis.com/docs/en/platform/turtlebot3/manipulation/#arduino-ide),build 原始碼並使用 Arduino IDE 上傳生成的二進位檔。 OpenCR Arduino board manager 不支援 Arm-based 的處理器,如 Raspberry or Jetson Nano。建議在 PC 上操作。 ::: :::warning **警示**:在進行上傳韌體到 OpenCR 前,請確保所有 DYNAMIXEL 智能馬達都已連接到 OpenCR 控制板。 否則,樹莓派可能會出現意外問題。 ::: 將 OpenManipulator-X 手臂安裝到 TB3 後,需要上傳控制手臂馬達的韌體到 OpenCR 板,請依照下列步驟。 1. TB3 SBC 端: 下載 OpenCR 韌體到 SBC 樹莓派,上傳正確的韌體 ``` $ export OPENCR_PORT=/dev/ttyACM0 $ export OPENCR_MODEL=turtlebot3_manipulation $ rm -rf ./opencr_update.tar.bz2 $ wget https://github.com/ROBOTIS-GIT/OpenCR-Binaries/raw/master/turtlebot3/ROS2/latest/opencr_update.tar.bz2 $ tar -xvf opencr_update.tar.bz2 $ cd ./opencr_update $ ./update.sh $OPENCR_PORT $OPENCR_MODEL.opencr ``` 2. 當上傳完成,你會看到 terminal 上出現 **jump_to_fw** 的字串。 ### 7.4.1. 使用 Arduino IDE 來上傳韌體 :::info OpenCR board manager 並不支援 ARM based SBC 的 Arduino IDE,如樹莓派 或 NVidia Jetson。 請在 PC 上用 Arduino IDE 來上傳韌體。 ::: 1. 如 PC 的 OS 是 Linux,下列指令設定 OpenCR 的 USB port。如果其他 OS(OSX or Windows),可跳過此步驟。 ``` $ wget https://raw.githubusercontent.com/ROBOTIS-GIT/OpenCR/master/99-opencr-cdc.rules $ sudo cp ./99-opencr-cdc.rules /etc/udev/rules.d/ $ sudo udevadm control --reload-rules $ sudo udevadm trigger $ sudo apt install libncurses5-dev:i386 ``` 2. 安裝 Arduino IDE - [下載最新的 Arduino IDE](https://www.arduino.cc/en/software) 3. 安裝好後,執行 Arduino IDE 4. 按 Ctrl + , 來打開 Preferences menu 5. 在 Additional Boards Manager URLs 輸入下列位址 ``` https://raw.githubusercontent.com/ROBOTIS-GIT/OpenCR/master/arduino/opencr_release/package_opencr_index.json ``` ![](https://i.imgur.com/zcRVecI.png) 6. 選擇 Sketch > Include Library > Manage Libraries... 以安裝 DYNAMIXEL2Arduino 函式庫。 ![image](https://hackmd.io/_uploads/Skk2GdhST.png) 7. 從 Library Manager 中搜尋 DYNAMIXEL2Arduino 並安裝該庫。 ![image](https://hackmd.io/_uploads/SJ_eQd2ST.png) 8. 開啟 TurtleBot3 Manipulation 範例 - File > Examples > turtlebot3 > turtlebot3_manipulation > turtlebot3_manipulation 9. 從 OpenCR 板 micro USB 連到 PC 上,從 Arduino IDE 的 Tools > Board 選單選擇 OpenCR > OpenCR Board 10. 從 Tools > Port 選單中選擇連接 OpenCR 的 USB port 11. upload 圖示或 Ctrl+U 來上傳韌體 sketch ![](https://i.imgur.com/S3zNgU6.png) ![](https://i.imgur.com/fxp7cNS.png) 12. 如果上傳失敗,可以嘗試在 recovery mode 下重新上傳韌體。OpenCR 的 recovery mode 啟動順序如下。在 recovery mode 時,OpenCR 的 STATUS led 燈會定時的閃爍。 - 按住 PUSH SW2 鍵 - 按一下 Reset 鍵然後鬆開 - 再鬆開 PUSH SW2 鍵 ![](https://i.imgur.com/ZilkkEU.png) ## 7.5. 啟動 :::info 如果是用 Gazebo 來跑 TB3 Manipulation 機器手臂模擬,請跳到 Simulation 模擬章節 ::: 下列指令會啟動安裝有 OpenManipulator-X 手臂的 TB3。 **[TurtleBot3]** 1. 在 TB3 SBC 上開新 terminal 2. 下列指令啟動 TB3 Manipulation 機器手臂 ``` $ ros2 launch turtlebot3_manipulation_bringup hardware.launch.py ``` :::danger **注意身體位置** 當 TB3 Manipulation 機器手臂啟動後,OpenManipulator-X 手臂會移動到初始姿態。建議你將手臂先擺放跟下圖類似的姿態,避免手臂初始化時,會跟身體做碰觸。 ![](https://i.imgur.com/hBSACtG.png) ::: ## 7.6. Simulation 模擬 遵循下列指示,以便使用 Gazebo 來模擬 TB3 Manipulation 機器手臂 ### 7.6.1. 如何執行 Gazebo [Remote PC] 下列指令可在 Gazebo world 世界地圖中啟動 TB3 Manipulator-X 手臂 ``` $ ros2 launch turtlebot3_manipulation_bringup gazebo.launch.py ``` ![image](https://hackmd.io/_uploads/SkbsX-eUp.png) :::info TIPS 如要執行 RViz,請附加 start_rviz 參數如下 ``` $ ros2 launch turtlebot3_manipulation_bringup gazebo.launch.py start_rviz:=true ``` ::: 要在 Gazebo 模擬中控制 TB3,MoveIt 的 servo server node 需要先啟動 ``` $ ros2 launch turtlebot3_manipulation_moveit_config servo.launch.py ``` 接著啟動 keyboard teleoperation node ``` $ ros2 run turtlebot3_manipulation_teleop turtlebot3_manipulation_teleop ``` :::info 以下鍵盤按鍵可用來控制 TB3: - 使用 o | k | l |; keys to move turtlebot base 及使用 'space' key to stop the base - 使用 s | x | z | c | a | d | f | v keys to Cartesian jog - 使用 1 | 2 | 3 | 4 | q | w | e | r keys to joint jog. - 'ESC' to quit. ::: ### 7.6.2. 在 MoveIt 中模擬 [Remote PC] 要在 Gazebo 中使用 MoveIt 操作 OpenManipulator-X 手臂,必需要先結束 Gazebo 及 RViz 的其他工具。 輸入下列指令來啟動 RViz 及 MoveIt 設定 ``` $ ros2 launch turtlebot3_manipulation_moveit_config moveit_gazebo.launch.py ``` RViz 的 MoveIt 介面會啟動以及 Gazebo 模擬器 ![image](https://hackmd.io/_uploads/BkMSCGlI6.png) ## 7.7. Operate the Actual OpenManipulator 操作實體的手臂 :::info 請注意,要操作實體 OpenManipulator-X 手臂,需要先執行 Bringup 啟動章節 ::: [Remote PC] 輸入以下指令,來啟動 RViz 的 MoveIt ``` $ ros2 launch turtlebot3_manipulation_moveit_config moveit_core.launch.py ``` 如要用 keyboard teleoperation node 來操作機器人,則 RViz 需先結束,之後開新的 terminal 視窗啟動 servo server node 及 teleoperation nodes ``` $ ros2 launch turtlebot3_manipulation_moveit_config servo.launch.py ``` ``` $ ros2 run turtlebot3_manipulation_teleop turtlebot3_manipulation_teleop ``` ## 7.8. SLAM :::info 使用以下的指引時,請先閱讀過 SLAM 地圖章節 ::: ### 7.8.1. 執行 SLAM Nodes [Remote PC] 1. 開新的 terminal 視窗 2. 以下指令啟動 slam node ``` $ ros2 launch turtlebot3_manipulation_cartographer cartographer.launch.py ``` ### 7.8.2. 執行 Teleoperation Nodes [Remote PC] 1. 開新的 terminal 2. 啟動 servo server node ``` $ ros2 launch turtlebot3_manipulation_moveit_config servo.launch.py ``` 3. 啟動 teleop node ``` $ ros2 run turtlebot3_manipulation_teleop turtlebot3_manipulation_teleop ``` 4. 使用 O | K | L | ; 按鍵來驅動 TB3 移動 ### 7.8.3. 儲存地圖 [Remote PC] 1. 開新的 terminal 2. 在 RViz 中執行 nav2_map_server 來儲存目前的地圖 ``` $ ros2 run nav2_map_server map_saver_cli -f ~/map ``` ![image](https://hackmd.io/_uploads/ryYgmmlU6.png) ## 7.9. Navigation :::info 使用以下的指引時,請先閱讀過 Navigation 章節 ::: 1. 開新的 terminal 2. 以下指令啟動 navigation 檔 ``` $ ros2 launch turtlebot3_manipulation_navigation2 navigation2.launch.py map_yaml_file:=$HOME/map.yaml ``` ![image](https://hackmd.io/_uploads/B125QXgIa.png) ## 7.10. TurtleBot3 Home Service 挑戰賽 :::info 此功能只適用 Kinetic 及 Noetic 版 ::: # **8. Autonomous Driving 自動駕駛** --- ![](https://i.imgur.com/3CpDKxK.jpg) :::info TB3 AutoRace 目前只支援 ROS1 Kinetic 及 Noetic 版 ::: # **9. Machine Learning 機器學習** --- :::info 此功能目前只支援 ROS1 Kinetic,Melodic 及 ROS2 Dashing 版 ::: # **10. 實作 TB3 的不同應用程式** :::info 此功能目前只支援 ROS1 Kinetic,ROS2 Dashing 版 ::: # **11. Locomotion 各種 TB3 改裝運動造型** --- 跟 Melodic 相同內容,請參考 Melodic 內容 **TurtleBot3 Friends 改裝造型列表(locomotion list)** - TurtleBot3 Friends: Car 小車 - TurtleBot3 Friends: OpenManipulator 機器手臂 - TurtleBot3 Friends: Segway 賽格威二輪平衡 - TurtleBot3 Friends: Conveyor 輸送車 - TurtleBot3 Friends: Monster 怪獸四驅車 - TurtleBot3 Friends: Tank 履帶車 - TurtleBot3 Friends: Omni 全向輪 - TurtleBot3 Friends: Mecanum 萬象輪 - TurtleBot3 Friends: Bike 三輪車 - TurtleBot3 Friends: Road Train 聯結車 - TurtleBot3 Friends: Real TurtleBot 真烏龜 - TurtleBot3 Friends: Carrier 多層運送車 ## 11.1. TurtleBot3 Friends: Car 小車 跟 Melodic 相同內容,請參考 Melodic 內容 :::info 此改裝車的 3D 模型目前停止銷售 ::: - 影片 {%youtube IkPexspUgKk %} {%youtube 1V33iEu4ylw %} ## 11.2. TurtleBot3 Friends: OpenManipulator 機器手臂 ![](https://i.imgur.com/6pshgKI.png) 跟 Melodic 相同內容,請參考 Melodic 內容 - 影片 {%youtube Qhvk5cnX2hM %} {%youtube qbht0ssv8M0 %} {%youtube P82pZsqpBg0 %} {%youtube DLOq8yNcCoE %} ## 11.3. TurtleBot3 Friends: Segway 賽格威二輪平衡 ![](https://i.imgur.com/awypubW.png) 跟 Melodic 相同內容,請參考 Melodic 內容 - 影片 {%youtube VAY-0xBOE2g %} ## 11.4. TurtleBot3 Friends: Conveyor 輸送車 ![](https://i.imgur.com/NTYi2RL.png) 跟 Melodic 相同內容,請參考 Melodic 內容 - 影片 {%youtube uv2faO7GhXc %} ## 11.5. TurtleBot3 Friends: Monster 怪獸四驅車 ![](https://i.imgur.com/yLdnCi8.png) 跟 Melodic 相同內容,請參考 Melodic 內容 - 影片 {%youtube UqdwGLH1-cA %} ## 11.6. TurtleBot3 Friends: Tank 履帶車 ![](https://i.imgur.com/uc2u8VS.png) 跟 Melodic 相同內容,請參考 Melodic 內容 - 影片 {%youtube vndnwpVEpVE %} ## 11.7. TurtleBot3 Friends: Omni 全向輪 ![](https://i.imgur.com/MGu7HkR.png) 跟 Melodic 相同內容,請參考 Melodic 內容 - 影片 {%youtube r8wRACM_ZbE %} ## 11.8. TurtleBot3 Friends: Mecanum 萬象輪 ![](https://i.imgur.com/24wkG2h.png) 跟 Melodic 相同內容,請參考 Melodic 內容 - 影片: 參考上節 TB3 改裝 7: Omni 全向輪影片 ## 11.9. TurtleBot3 Friends: Bike 三輪摩托車 ![](https://i.imgur.com/QPxly4g.png) 跟 Melodic 相同內容,請參考 Melodic 內容 - 影片: 請參考上方 TB3 改裝 1: Car 小車及 TB3 改裝 5: Monster 怪獸四驅車的影片 ## 11.10. TurtleBot3 Friends: Road Train 聯結車 ![](https://i.imgur.com/II6iWgz.png) 跟 Melodic 相同內容,請參考 Melodic 內容 - 影片 {%youtube uhkq1w4YoEE %} ## 11.11. TurtleBot3 Friends: Real TurtleBot 真烏龜 ![](https://i.imgur.com/gHXG4xm.png) 跟 Melodic 相同內容,請參考 Melodic 內容 - 影片 {%youtube KNWkAe0ob9g %} {%youtube vort-z9HDlU %} ## 11.12. TurtleBot3 Friends: Carrier 多層運送車 ![](https://i.imgur.com/Nbcy9zk.png) 跟 Melodic 相同內容,請參考 Melodic 內容 - 影片 {%youtube 5NYdgnzxykc %} {%youtube u7qb8xiSiNg %} # **12. Learn 學習資源課程** --- ## 12.1. Amazon AWS RoboMaker 使用 TurtleBot3 跟 Melodic 相同內容,請參考 Melodic 內容 ### 12.1.1. AWS RoboMaker 範例使用 TB3 跟 Melodic 相同內容,請參考 Melodic 內容 ### 12.1.2. AWS RoboMaker 強化學習範例使用 TB3 跟 Melodic 相同內容,請參考 Melodic 內容 ## 12.2 透過 Matlab 蒐集數據 跟 Melodic 相同內容,請參考 Melodic 內容 ## 12.3. The Construct 線上教學網站 跟 Melodic 相同內容,請參考 Melodic 內容 ### 12.3.1. MASTER WITH ROS: TurtleBot3 (英文課程) 跟 Melodic 相同內容,請參考 Melodic 內容 ### 12.3.2. 使用 RDS v2.0 在 5 分鐘內進行 TurtleBot3 模擬 {%youtube 8wg2i297MXU %} ### 12.3.3. TurtleBot3 光達掃描的訂閱 {%youtube 2i_iRhzIPfo %} ## 12.4. TurtleBot3 Blockly 跟 Melodic 相同內容,請參考 Melodic 內容 ## 12.5. TurtleBot3 Simulation on ROS Indigo 跟 Melodic 相同內容,請參考 Melodic 內容 ## 12.6. Youtube 影片課程 跟 Melodic 相同內容,請參考 Melodic 內容 ## 12.7. 實體書 跟 Melodic 相同內容,請參考 Melodic 內容 ## 12.7. TurtleBot3 影片分享 ### 12.7.1. Open Source Team 的 TB3 影片 跟 Melodic 相同內容,請參考 Melodic 內容 ### 12.7.2. ROBOTIS Channel 的 TB3 影片 跟 Melodic 相同內容,請參考 Melodic 內容 ### 12.7.3. TB3 的一些有趣專案項目介紹 #### 12.7.3.1 TB3 協作專案 TurtleBot3 是一項多個合作夥伴協作專案的成果,由 Open Robotics, ROBOTIS, 及許多夥伴如 The Construct, Intel, Onshape, OROCA, AuTURBO, ROS in Robotclub Malaysia, Astana Digital, Polariant Experiment, Tokyo University of Agriculture and Technology-GVlab, Networked Control Robotics Lab at National Chiao Tung University, SIM Group at TU Darmstadt. Open Robotics 負責軟體跟社群活動,而 ROBOTIS 負責生產跟全球行銷。 這個 TurtleBot3 協作專案最重要的部分是基於 open source 開源的軟體,硬體和內容。我們鼓勵更多的合作夥伴和研究合作者能參與這個專案,以豐富機器人領域。所以我們準備了這個頁面。本章節介紹了 TurtleBot3 合作夥伴和研究合作者的一些值得讚賞的專案。 - TurtleBot3 提供者 ![](https://i.imgur.com/T4kLRkD.png) - TurtleBot3 合作夥伴及研究合作者 ![](https://i.imgur.com/c4mttJQ.png) - [合作夥伴的網頁連結](https://www.turtlebot.com/partners) - TurtleBot3 各地區授權代理商 ![](https://i.imgur.com/QlGLPLX.png) - [各地區代理商的網頁連結](https://www.turtlebot.com/partners) - **採智科技為台灣 TurtleBot3 官方唯一授權代理商** #### 12.7.3.2. 一些有趣的 TB3 個人專案 跟 Melodic 相同內容,請參考 Melodic 內容 # **13. 更多產品資訊** --- ## 13.1. 附錄 - TB3 主要零件補充說明 ### 13.1.1. Dynamixel 智能馬達 ![](https://i.imgur.com/AAqMJr5.png) #### 13.1.1.1. Overview {%youtube gZWoyCvU-U8 %} **DYNAMIXEL X** 系列是一種新型高性能網路化 AI 智能馬達,可廣泛用於構建各種類型的機器人,具有可靠性和可擴展性。 TurtleBot3 Burger,Waffle 和 Waffle Pi 機器人,因為它們有不同的要求,故採用兩種不同類型的 DYNAMIXEL X 系列智能馬達。DYNAMIXEL X 系列採共享設計,因此,用戶可以根據應用不同更換所需的智能馬達。 - X 系列的基本特色: - 更佳的扭力、更小的體積 - 增強的耐用性和可擴展性 - 中空後蓋設計,可大幅降低連接線受到的擠壓 (3 向的串線方式),也可避免連接線脫落 - 組裝時螺絲可直接鎖入馬達外殼,不需要螺帽 - 鋁質外殼可增強散熱性 - 多種控制功能 - 6 種操作模式(扭力控制,速度控制,位置控制,延伸位置控制,基於電流之位置控制,PWM控制) - 基於電流的扭力控制 (4096 格, 2.69mA/格) - Profile control 規範控制可使用於規劃平順的動作(smooth motion planning) - 軌跡數據和移動狀態 (In-Position 到位, 跟隨誤差等) - 節能 (待機電流從 100 mA 減到 40 mA ) #### 13.1.1.2. 規格 規格如有不同,以 [ROBOTIS 網站](https://robotis.com)資料為主 | Items | XL430-W250 <br>(for Burger) | XM430-W210 (for <br>Waffle and Waffle Pi) | |:---------- | ------------------------------------------ |:-------------------------------------------------------------------------- | | 微控制器 | ST CORTEX-M3 (STM32F103C8 <br>@ 72Mhz, 32bit) | ST CORTEX-M3 (STM32F103C8 @ <br>72Mhz, 32bit) | | 位置感測器 | Contactless Absolute <br>Encoder (12bit, 360°) | Contactless Absolute <br>Encoder (12bit, 360°) | | 智能馬達 | Cored Motor | **Coreless Motor ** | | Baud Rate | 9600 bps ~ 4.5 Mbps | 9600 bps ~ 4.5 Mbps | | 控制模式 | Velocity, Position, Extended Position, PWM | Velocity, Position, Extended <br>Position, PWM, Current, Current-base Position | | 齒輪比 | 258.5 : 1 | 212.6 : 1 | | 靜止轉矩 | 1.0 N.m (@ 9V, 1A) | 2.7 N.m (@ 11.1V, 2.1A) | | - | 1.4 N.m (@ 11.1V, 1.3A) | 3.0 N.m (@ 12V, 2.3A) | | - | 1.5 N.m (@ 12V, 1.4A) | 3.7 N.m (@ 14.8V, 2.7A) | | 無負載速度 | 47rpm (@ 9V) | 70rpm (@ 11.1V) | | - | 57rpm (@ 11.1V) | 77rpm (@ 12V) | | - | 61rpm (@ 12V) | 95rpm (@ 14.8V) | | 通訊 | TTL Level Multi Drop Bus | TTL Level / RS485 Multi Drop Bus | | 材質 | 工程塑材 | 金屬齒輪, 金屬(前中段外殼),<br> 工程塑材(後段外殼) | | 待機電流 | 52mA | 40mA | - 更多智能馬達的資訊,可以在 ROBOTIS e-Manual 網站找到 - [XL430-W250](https://emanual.robotis.com/docs/en/dxl/x/xl430-w250/) for TurtleBot3 Burger - [XM430-W210](https://emanual.robotis.com/docs/en/dxl/x/xm430-w210/) for TurtleBot3 Waffle and Waffle Pi #### 13.1.1.3. Dynamixel SDK 開發軟體 ![](https://i.imgur.com/jiDe7vH.png) ROBOTIS Dynamixel SDK 是一個軟體開發程式庫,為數據封包通信提供 Dynamixel 控制功能。 該 API 專為 Dynamixel 智能馬達和基於 Dynamixel 的機器人平台而設計。TurtleBot3 使用 OpenCR 中的 Dynamixel SDK 來控制智能馬達。 - 有關 Dynamixel SDK 的更多信息,請參見 ROBOTIS e-Manual 和 GitHub 連接。 - [Dynamixel SDK 線上手冊](http://emanual.robotis.com/docs/en/software/dynamixel/dynamixel_sdk/overview/) - [Dynamixel SDK 在 Github 上的軟體儲存庫](https://github.com/ROBOTIS-GIT/DynamixelSDK) ### 13.1.2. OpenCR 1.0 控制板 ![](https://i.imgur.com/Q7f9nxb.jpg) #### 13.1.2.1. Overview OpenCR 是 TurtleBot3 的主控制板。OpenCR(Open-source Control module for ROS) 是為 ROS 嵌入式系統開發的,提供完全開源的硬體和軟體。關於控制板的一切資訊(如 Schematcs,PCB Gerber,BOM 表和 TurtleBot3 的韌體原始碼),都可以在用戶和 ROS 社群的開源許可下免費分享。 STM32F7 系列是 OpenCR 板內部的微控制器,它基於功能強大的 ARM Cortex-M7 具浮點單元的晶片。OpenCR 的開發環境可從 Arduino IDE 到 Scratch 等面向年輕學生用戶,到為專家所提供的傳統韌體開發。 OpenCR 提供數位和類比輸入/輸出接腳,可與擴充板或各種感測器連接。此外OpenCR 還具有各種通信接口:USB 用於連接 PC,UART,SPI,I2C,CAN 則用於其他嵌入式設備。 使用 SBC 單板電腦時,OpenCR 可以提供最佳解決方案。它支持 SBC 和感測器的12V,5V,3.3V 電源輸出。它還支持電池和 SMPS 外接電源線之間的熱插拔電源輸入。 OpenCR 控制板將是實現嵌入式控制設計的最佳解決方案。 {%youtube -_kBfIS6wJs %} #### 13.1.2.2. 規格 :::info **備註**:OpenCR 控制板的熱插拔電源切換:外接電源變壓器(12V, 5A SMPS)跟電池之間的熱插拔功能,可實現 UPS 不斷電的特色。 ::: 規格如有不同,以 ROBOTIS 網站資料為主 | Items | 規格 | |:---------------------- | ---- | | Microcontroller | STM32F746ZGT6 / 32-bit ARM Cortex®-M7 with FPU (216MHz, 462DMIPS) | | Sensors |(Discontinued) Gyroscope 3Axis, Accelerometer 3Axis, Magnetometer 3Axis (MPU9250)<br>(New) 3-axis Gyroscope, 3-Axis Accelerometer, A Digital Motion Processor™ (ICM-20648) | | Programmer | ARM Cortex 10pin JTAG/SWD connector<br>USB Device Firmware Upgrade (DFU)<br>Serial | | Extension pins | 32 pins (L 14, R 18) *Arduino connectivity<br>Sensor module x 4 pins<br>Extension connector x 18 pins | | Communication circuits | USB (Micro-B USB connector/USB 2.0/Host/Peripheral/OTG)<br>TTL (B3B-EH-A / DYNAMIXEL)<br>RS485 (B4B-EH-A / DYNAMIXEL)<br>UART x 2 (20010WS-04)<br>CAN (20010WS-04) | | LEDs and buttons | LD2 (red/green) : USB communication<br>User LED x 4 : LD3 (red), LD4 (green), LD5 (blue)<br>User button x 2 | | Powers | External input source<br>5 V (USB VBUS), 7-24 V (Battery or SMPS)<br>Default battery : LI-PO 11.1V 1,800mAh 19.98Wh<br>Default SMPS: 12V 5A<br> External output source<br>12V@1A(SMW250-02), 5V@4A(5267-02A), 3.3V@800mA(20010WS-02)<br>External battery Port for RTC (Real Time Clock) (Molex 53047-0210)<br>Power LED: LD1 (red, 3.3 V power on)<br>Reset button x 1 (for power reset of board)<br>Power on/off switch x 1 | | Dimensions | 105(W) X 75(D) mm | | Mass | 60g | :::info **備註**: MPU9250 sensor has been replaced with ICM-20648, since 2020, as MPU9250 is discontinued to produce. ::: #### 13.1.2.3. 使用指南 - 執行 turtlebot3_core 節點 ``` $ rosrun rosserial_python serial_node.py __name:=turtlebot3_core _port:=/dev/ttyACM0 _baud:=115200 ``` - 測試 ``` $ rostopic echo /imu seq: 179 stamp: secs: 1486448047 nsecs: 147523921 frame_id: imu_link orientation: x: 0.0165222994983 y: -0.0212152898312 z: 0.276503056288 w: 0.960632443428 orientation_covariance: [0.0024999999441206455, 0.0, 0.0, 0.0, 0.0024999999441206455, 0.0, 0.0, 0.0, 0.0024999999441206455] angular_velocity: x: 2.0 y: 1.0 z: -1.0 angular_velocity_covariance: [0.019999999552965164, 0.0, 0.0, 0.0, 0.019999999552965164, 0.0, 0.0, 0.0, 0.019999999552965164] linear_acceleration: x: 528.0 y: 295.0 z: 16648.0 linear_acceleration_covariance: [0.03999999910593033, 0.0, 0.0, 0.0, 0.03999999910593033, 0.0, 0.0, 0.0, 0.03999999910593033] --- ``` - Debugging 偵錯 turtlebot3_core.ino 包括了偵錯程式碼以檢查測距數據,連接的感測器及 TurtleBot3 或 Dynamixels 智能馬達的狀態。這可能有助於你實作程式碼,並在沒有 ROS 連接的情況下對其進行測試。 **第一步**: 連接 LN-101 或任何 USB to Serial 轉接器 ![](https://i.imgur.com/muEhh8H.png) **第二步**: 開啟 turtlebot3_core_config.h 檔,啟動 [DEBUG](https://github.com/ROBOTIS-GIT/OpenCR/blob/develop/arduino/opencr_arduino/opencr/libraries/turtlebot3/examples/turtlebot3_burger/turtlebot3_core/turtlebot3_core_config.h#L73)。之後上傳到 OpenCR 上。 **第三步**: 連接轉接器到 OpenCR 的 UART2 **第四步**: 下載 minicom 及設定 baudrate 57600 和 port name ``` $ sudo apt-get install minicom ``` ``` $ minicom -s ``` **第五步**: 按 OpenCR 板上的 reset 鍵,你會看到 turtlebot3_core.ino 啟動及一些數據 ``` Success to init Motor Driver Success to init Sensor Success to init Diagnosis Success to init Controller --------------------------------------- EXTERNAL SENSORS --------------------------------------- Bumper : 2 Cliff : 204.00 Sonar : 1.00 Illumination : 480.00 --------------------------------------- OpenCR SENSORS --------------------------------------- Battery : 12.15 Button : 0 IMU : w : 1.00 x : 0.00 y : -0.00 z : 0.00 --------------------------------------- DYNAMIXELS --------------------------------------- Torque : 1 Encoder(left) : 876 Encoder(right) : 4001 --------------------------------------- TurtleBot3 --------------------------------------- Odometry : x : 0.00 y : 0.00 theta : 0.00 ``` - 如何修改 ROS 程式庫的程式碼 可以在以下路徑中修改 ROS 程式庫。 - [Your/Arduino/Board/Package/Directory/OpenCR/hardware/OpenCR/Version/libraries/turtlebot3](https://github.com/ROBOTIS-GIT/OpenCR/tree/master/arduino/opencr_arduino/opencr/libraries/turtlebot3) - [Your/Arduino/Board/Package/Directory/OpenCR/hardware/OpenCR/Version/libraries/turtlebot3_ros_lib](https://github.com/ROBOTIS-GIT/OpenCR/tree/master/arduino/opencr_arduino/opencr/libraries/turtlebot3_ros_lib) 如果要在 sketch 資料夾中修改它,請將上述兩個資料夾移動到 “sketchbook/libraries” 資料夾下。 - 如何增加 topic 訊息 對一般 topic 標頭檔,你可執行以下在 [rosserial tutorial](http://wiki.ros.org/rosserial_arduino/Tutorials/Arduino%20IDE%20Setup) 的 section 2.2 的指令 ``` $ cd <sketchbook>/libraries $ rm -rf ros_lib $ rosrun rosserial_arduino make_libraries.py . ``` 由於上述命令生成的某些與硬體相關的程式庫與 OpenCR 控制板不同,因此必須只複製必要的主 topic 標頭文件。然後將生成的標頭文件複製到下面的路徑。 - [/turtlebot3_ros_lib](https://github.com/ROBOTIS-GIT/OpenCR/tree/master/arduino/opencr_arduino/opencr/libraries/turtlebot3_ros_lib) #### 13.1.2.4. 開源軟體 你可以下載原始碼修改後分享給朋友 - OpenCR 開源軟體原始碼: https://github.com/ROBOTIS-GIT/OpenCR #### 13.1.2.5. 開源硬體 如果想客製自己專屬的 OpenCR 控制板,可以下載必要的文件,如 PCB Gerber,BOM 表。當硬體電路板準備就緒時,韌體原始碼就可以燒錄到 MCU 中。 - OpenCR 開源硬體:https://github.com/ROBOTIS-GIT/OpenCR-Hardware #### 13.1.2.6. 線上手冊 - [OpenCR e-manual](http://emanual.robotis.com/docs/en/parts/controller/opencr10/) ### 13.1.3. LDS-01 光達 :::info 自 2022 起,LDS-01 已停產,LDS-02 光達取代 ::: #### 13.1.3.1. Overview ![](https://i.imgur.com/G7ElZpj.png) - 360° 光達感測器 LDS-01 是一款 2D 雷射掃描儀,能夠 360 度感測,收集機器人四周的數據,用於 SLAM 和導航。 - LDS-01 可用於 TurtleBot3 Burger,Waffle 和 Waffle Pi。 - 它支援 USB 接口(USB2LDS),易於在 PC 上安裝。 - 它支援嵌入式板的 UART 接口。 #### 13.1.3.2. 介紹影片 影片 1:如何使用 LDS-01 光達 - 內容: 1. Specification 2. ROS 3. Windows, Linux, macOS 4. Embedded Board 5. SLAM and Navigation 6. Self-Parking 7. 3D Sensing 8. for Makers 創客 {%youtube wmZQoTdtioY %} 影片 2:Laser Distance Sensor (LDS) Example {%youtube 9oic8aT3wIc %} 影片3:ROS Hector SLAM demo using only a 360 Laser Distance Sensor LDS-01 made by HLDS (Hitachi-LG Data Storage) {%youtube s7CflpA6TOo %} 影片4:ROS Gmapping and Cartographer SLAM demo using TurtleBot3 and 360 Laser Distance Sensor LDS-01 {%youtube lkW4-dG2BCY %} #### 13.1.3.3. 規格 **一般規格** | Item | 規格 | |:------------------------ |:------------------------------------------------------------------ | | Operating supply voltage | 5V DC ±5% | | Light source | Semiconductor Laser Diode(λ=785nm) | | LASER safety | IEC60825-1 Class 1 | | Current consumption | 400mA or less (Rush current 1A) | | Detection distance | 120mm ~ 3,500mm | | Interface | 3.3V USART (230,400 bps) 42bytes per 6 degrees, Full Duplex option | | Ambient Light Resistance | 10,000 lux or less | | Sampling Rate | 1.8kHz | | Dimensions | 69.5(W) X 95.5(D) X 39.5(H)mm | | Mass | Under 125g | **量測效能規格** | Item | 規格 | |:----------------------------------- |:------------- | | Distance Range | 120 ~ 3,500mm | | Distance Accuracy (120mm ~ 499mm) | ±15mm | | Distance Accuracy(500mm ~ 3,500mm) | ±5.0% | | Distance Precision(120mm ~ 499mm) | ±10mm | | Distance Precision(500mm ~ 3,500mm) | ±3.5% | | Scan Rate | 300±10 rpm | | Angular Range | 360° | | Angular Resolution | 1° | #### 13.1.3.4. 詳細規格文件 以下連結包含有關基本性能,測量性能,機構佈局,光路,數據信息,接腳說明和指令的信息。 - 詳細規格 [PDF 文件](http://emanual.robotis.com/assets/docs/LDS_Basic_Specification.pdf)。 :::info **備註**:用於 TurtleBot3 的 360° 雷射距離感測器 LDS-01 使用 molex 51021-0800 和 53048-0810 替代基本外殼和連接器。 ::: - [Connector for LDS] [Molex 51021-0800](http://www.molex.com/pdm_docs/sd/510210800_sd.pdf) - [Connector for USB2LDS] [Molex 53048-0810](http://www.molex.com/pdm_docs/sd/530480810_sd.pdf) #### 13.1.3.5. TB3 使用 LDS-01光達 LDS-01 光達是 TurtleBot3 Burger,Waffle,及 Waffle Pi 款使用的標配光達。 ![](https://i.imgur.com/530gJWU.png) #### 13.1.3.6. 使用指南 (for ROS) 我們提供 [LDS-01 光達的 ROS 套件](http://wiki.ros.org/hls_lfcd_lds_driver)。其硬體規格是 HLS(Hitachi-LG Sensor) LFCD LDS(Laser Distance Sensor),軟體是對應的 hls_lfcd_lds_driver。 :::info **備註**:光達韌體自更新後(自 2017 年 10 月後),光達在供電後就直接運行。 ::: #### 13.1.3.7. 安裝 ``` $ sudo apt-get install ros-kinetic-hls-lfcd-lds-driver ``` #### 13.1.3.8. 設定 LDS-01 權限 ``` $ sudo chmod a+rw /dev/ttyUSB0 ``` #### 13.1.3.9. 執行 hlds_laser_publisher Node ``` $ roslaunch hls_lfcd_lds_driver hlds_laser.launch ``` #### 13.1.3.10 在 RViz 中執行 hlds_laser_publisher Node ``` $ roslaunch hls_lfcd_lds_driver view_hlds_laser.launch ``` #### 13.1.3.11. 驅動程式的使用指南 - LDS-01 光達除了支援 ROS,也支援 Windows、Linux 及 MacOS 的開發環境 - 所需軟體是 - GCC(for Linux、MacOS),MinGW(for Windows) - Boost Library(Lib for boost system,測試版本為 v1.66.0) **下載驅動程式** - 下載 LDS-01 driver ``` $ git clone https://github.com/ROBOTIS-GIT/hls_lfcd_lds_driver.git ``` - 或用瀏覽器直接由 github 儲存庫下載 - https://github.com/ROBOTIS-GIT/hls_lfcd_lds_driver - 不同環境所需安裝相依軟體 - GCC(for Linux、MacOS),[MinGW](https://sourceforge.net/projects/mingw/files/)(for Windows) - [Boost Library](http://www.boost.org/users/download/) **Build** - 下列的 makefile 指令是在 Linux 上用的。Windows 及 MacOS 的指令需根據相對應的開發環境。 ``` $ cd hls_lfcd_lds_driver/applications/lds_driver/ $ make ``` **執行** - 當執行 LDS-01 驅動程式後,你會在 terminal 上看到 raw data 原始數據。詳細資訊請參考原始碼。 ``` $ ./lds_driver r[359]=0.438000,r[358]=0.385000,r[357]=0.379000,... ``` #### 13.1.3.12 使用指南(for GUI 圖形介面) - 們有提供基本的 GUI 圖形介面工具,可視覺化的檢查 LDS-01 的數據 - 工具軟體支援 Linux,Windows,及 MacOS - 軟體安裝需要: - Qt Creator and Libs (在 Qt Creator v4.5.0 及 Qt Libs v5.10.0 測試過。) - GCC (for Linux and MacOS), MinGW (for Windows)。當安裝 Qt 時,可以一起安裝。 - Boost library (Lib for boost system,在 v1.66.0 測試過) **下載** - 下載 LDS-01 driver 及 GUI 圖形介面工具原始碼: ``` $ git clone https://github.com/ROBOTIS-GIT/hls_lfcd_lds_driver.git ``` - 或用瀏覽器直接由 github 儲存庫下載 - https://github.com/ROBOTIS-GIT/hls_lfcd_lds_driver - 安裝所需軟體 - [Qt – Open Source Version](https://www.qt.io/download) - GCC (for Linux and macOS), [MinGW](https://sourceforge.net/projects/mingw/files/) (for Windows) - [Boost library](http://www.boost.org/users/download/) **Build** - 執行 Qt Creator - 開啟檔案(Ctrl-O) lds_polar_graph.pro (hls_lfcd_lds_driver/applications/lds_polar_graph/lds_polar_graph.pro) - 更改[輸入原始碼的 port 名稱](https://github.com/ROBOTIS-GIT/hls_lfcd_lds_driver/blob/cf866c6b80060ab9270a664d665d287afcca2c10/applications/lds_polar_graph/lds_polar_graph.cpp#L47) - 開始 Build all (Ctrl-Shift-B) **執行** - 執行應用程式(Ctrl-R) ![](https://i.imgur.com/0ebk9Nm.png) #### 13.1.3.13. 使用指南(for 內嵌控制板) - 我們提供方法將 LDS-01 連接到內嵌控制板上 - LDS-01 光達的數據可以被內嵌控制板使用(如 OpenCR 或 Arduino),可以在下圖的 LCD 螢幕上以圖形顯示。 **準備** - 如果沒有準備介面板來連接 LDS-01,你可以參考下圖,連接內嵌控制板的 UART及供電。 ![](https://i.imgur.com/qswCnu5.png) :::warning **警示**:LDS-01 的佈線顏色可能與製造商的圖片不同。 ::: - OpenCR 內嵌控制板可透過 Arduino IDE 來開發及下載韌體。因此你必須事先安裝 Arduino IDE 及 OpenCR board 的套件。可參考下方連結: - [install Arduino IDE 及 OpenCR 板](http://emanual.robotis.com/docs/en/parts/controller/opencr10/#arduino-ide) **下載韌體及執行** 1. 在連接 USB 到 PC 後,在 Arduino IDE 選擇 Tools -> Board -> OpenCR Board 2. 更改 Tools -> Port 為連接到板子的 port 3. 在 Arduino IDE Examples,選擇 LDS-01 韌體(File -> Examples -> OpenCR -> Etc -> LDS -> drawLDS) 4. 點擊 Arduino IDE 的 Upload 圖示,顯示紅色圓圈來建立及下載韌體。當下載完成,韌體會自動執行。 {%youtube 7wKyW6yLNSg %} #### 13.1.3.14. 認證 如有未列出的認證信息,請聯絡我們。 **FCC** :::info **備註**:本設備已經過測試,符合 FCC 規則第 15 部分對 B 類數位設備的限制。這些限制旨在提供合理的保護,防止在住宅區安裝中的有害干擾。本設備會產生,使用並輻射射頻能量,如果不按照說明進行安裝和使用,可能會對無線電通信造成有害干擾。但是,無法保證在特定安裝中不會發生干擾。如果此設備確實對無線電或電視接收造成有害干擾(可以通過關閉和打開設備來確定),建議用戶嘗試通過以下一種措施來改善干擾: - 重新調整或擺放接收天線。 - 增加設備和接收器之間的距離。 - 將設備連接到與接收器連接的電路,分別在不同的電路插座上。 - 請諮詢經銷商或有經驗的無線電/電視技術人員以獲取幫助。 ::: :::warning **警告**:未經製造商明確批准的任何更改或修改可能會使用戶失去操作該設備的授權。 ::: ### 13.1.4. LDS-02 光達 自 2022 起,LDS-01光達已停產,以LDS-02取代 #### 13.1.4.1. Overview ![](https://i.imgur.com/ty3hxao.png) - LDS-02 光達可 2D 360度掃描,蒐集機器人周遭數據,給 SLAM 及 Navigation 使用 - LDS-02 可直接給 TB3 Burger 及 Waffle Pi 使用 - LDS-02 只具有 Tx UART 介面 - 可使用 USB2LDS 轉接器連接到 PC 或 SBC 上 #### 13.1.4.2. 規格 :::info 規格如有差異,以 ROBOTIS 原廠數據為主 ::: **一般規格** | Item | 規格 | | -------- | -------- | | Operating supply voltage | 5V DC ± 10% | | PWM Frequency | 10 ~ 30 KHz (Square wave, High : 3.3V, Low : 0V) | | PWM Duty Cycle | 0 ~ 100% | | LASWER Wave Length | Low powered Infrared Laser (λ=793 nm) | | LASER safety | Class I, 21 CFR 1040.10 and 1040.11 | | Current consumption | 240 mA (Start up current 400 mA) | | Detection distance | 160 ~ 8,000 mm | | Interface | 3.3V USART (115200 bps, 8 data bits, no parity, 1 stop bit), Tx Only | | Ambient Light Resistance | 25,000 lux | | Life Time | 1,000 hrs | | Sampling Rate | 2.3kHz (Fixed) | | Operating Temperature | -10 ~ 40 °C | | Storage Temperature | -30 ~ 70 °C | | Dimensions | 70(W) X 90(D) X 42(H)mm | | Mass | 131 g | **量測效能規格** | Item | 規格 | | -------- | -------- | | Distance Range | 160 ~ 8,000mm | | Distance Accuracy (160 ~ 300 mm) | ±10mm | | Distance Accuracy(300 ~ 6,000 mm) | ±3.0% | | Distance Precision(6,000 ~ 8,000 mm) | ±5.0% | | 1 Scan Frequency | 5Hz or above | | Angular Range | 360 ° | | 2 Angular Resolution | 1 ° | :::info **備註**: 1 Scan Frequency may vary by each product. 2 Due to the fixed sampling rate, the Angular Resolution may vary by the Scan Frequency. ::: #### 13.1.4.3. Data Packet 數據封包 LDS-02採用單向通訊方式,一旦穩定工作就開始發送測量數據,無需下任何指令。 | Packet | 說明 | Example | | -------- | -------- | -------- | | Header | 0x54 | 0x54 | | Length | 0x2C | 0x2C | | Speed (2Byte) | Speed_L, Speed_H | 0x68, 0x08 | | Start Angle (2Byte) | Angle_L, Angle_H | 0xAB, 0x7E | | Data (36Byte) | Data | Data | | End Angle (2Byte) | Angle_L, Angle_H | 0xBE, 0x82 | | Timestamp (2Byte) | Time_L, Time_H | 0x3A, 0x1A | | CRC | CRC | 0x50 | - Packet Example - Speed : 0x0868 (2152 °/s) - Start Angle : 0x7EAB (32427 / 100 = 324.27 °) - End Angle : 0x82BE (33470 / 100 = 334.70 °) - Timestamp : 0x1A3A (6714 ms) **Data (36Byte)** 是由 distance(2Byte) 及 confidence(1Byte) 共 12 個測量點所組成。如下 | 項目 | 說明 | Example | | -------- | -------- | -------- | | Point1 Distance (2Byte) | Distance_L, Distance_H | 0xE0, 0x00 | | Point1 Confidence | Confidence | 0xE4 | | Point2 Distance (2Byte) | Distance_L, Distance_H | 0xDC, 0x00 | | Point2 Confidence | Confidence | 0xE2 | | .. | .. | .. | | Point12 Distance (2Byte) | Distance_L, Distance_H | 0xB0, 0x00 | | Point12 Confidence | Confidence | 0xEA | - Data Example - Point1 Distance : 0x00E0 (224 mm) - Point1 Confidence : 0xE4 (228) - Point2 Distance : 0x00DC (220 mm) - Point2 Confidence : 0xE2 (226) - Point12 Distance : 0x00B0 (176 mm) - Point12 Confidence : 0xEA (234) ### 13.1.5. Intel RealSense R200 深度攝影機 Intel Realsense 是一個用於實現基於手勢的人機互動技術的平台。它由一系列消費者等級的 3D 攝影機和一個易於使用的機器感知程式庫組成。Intel RealSense R200 相機是一款 USB 3.0 設備,可提供彩色,深度和紅外光視頻串流。TurtleBot3 Waffle 款採用 Intel RealSense R200 來實現 3D SLAM 和導航,並且可以套用在各種產業應用,例如基於使用 RealSense 的創新主動式立體聲技術,所開發的手勢識別、物體辨識、場景辨識。 {%youtube V8VJUkWWaO8 %} :::info **備註**: - 因 Intel RealSense R200 已停產,故 TB3 Waffle 款也已停售。此節之內容不予翻譯。如需參考,請直接訪問[**英文頁面**](http://emanual.robotis.com/docs/en/platform/turtlebot3/appendix_realsense/#appendix-realsense)。 - TurtleBot3 Waffle Pi 已改採樹莓派攝影機 ::: ### 13.1.6. Raspberry Pi camera v2 樹莓派攝影機 ![](https://i.imgur.com/3A1OvkP.png) #### 13.1.6.1. Overview Raspberry Pi Camera 模組 v2 於 2016 年 4 月取代了原有的相機模組。v2 Camera 模組具有 Sony IMX219 800 萬畫素感測器(與原始相機的 500 萬畫素 OmniVision OV5647 感測器相比)。Camera 模組可用於拍攝高清影片以及靜態照片。它對初學者來說很容易使用,對進階用戶也可以擴展他們的知識。網上有許多例子用於延時,慢動作和其他影片效果。您還可以使用與攝影機一起提供的程式庫來創建不同效果。 #### 13.1.6.2. 規格 **硬體規格** | Items | Specifications | | ------------------------------ |:----------------------------------- | | Net price | $25 | | Size | Around 25 × 24 × 9 mm | | Weight | 3g | | Still resolution | 8 Megapixels | | Video modes | 1080p30, 720p60 and 640 × 480p60/90 | | Linux integration | V4L2 driver available | | C programming API | OpenMAX IL and others available | | Sensor | Sony IMX219 | | Sensor | 3280 × 2464 pixels | | Sensor | 3.68 x 2.76 mm (4.6 mm diagonal) | | Pixel size | 1.12 µm x 1.12 µm | | Optical size | 1/4” | | Full-frame SLR lens equivalent | 35 mm | | S/N ratio | 36 dB | | Dynamic range | 67 dB @ 8x gain | | Sensitivity | 680 mV/lux-sec | | Dark current | 16 mV/sec @ 60 C | | Well capacity | 4.3 Ke- | | Fixed focus | 1 m to infinity | | Focal length | 3.04 mm | | Horizontal field of view | 62.2 degrees | | Vertical field of view | 48.8 degrees | | Focal ratio (F-Stop) | 2.0 | **硬體特色** | 特色 | 是否可實現 | |:----------------------------------------------------------------------------------- | ------ | | Chief ray angle correction |Yes | | Global and rolling shutter | Rolling shutter | | Automatic exposure control (AEC) |No - done by ISP instead | | Automatic white balance (AWB) |No - done by ISP instead | | Automatic black level calibration (ABLC) |No - done by ISP instead | | Automatic 50/60 Hz luminance detection | No - done by ISP instead | | Frame rate up to 120 fps |Max 90fps. Limitations on frame size for<br> the higher frame rates (VGA only for above 47fps) | | AEC/AGC 16-zone size/position/weight control |No - done by ISP instead | | Mirror and flip |Yes | | Cropping | No - done by ISP instead (except 1080p mode) | | Lens correction |No - done by ISP instead | | Defective pixel cancelling |No - done by ISP instead | | 10-bit RAW RGB data | Yes - format conversions available via GPU | | Support for LED and flash strobe mode | LED flash | | Support for internal and external frame<br> synchronisation for frame exposure mode |No | | Support for 2 × 2 binning for better<br>SNR in low light conditions |Anything output res below 1296 x 976 will<br> use the 2 x 2 binned mode | | Support for horizontal and vertical<br> sub-sampling |Yes, via binning and skipping | | On-chip phase lock loop (PLL) |Yes | | Standard serial SCCB interface | Yes | | Digital video port (DVP) parallel<br> output interface |No | | MIPI interface (two lanes) |Yes | | 32 bytes of embedded one-time <br>programmable (OTP) memory |No | | Embedded 1.5V regulator for core power |Yes | **軟體特色** | 軟體特色 | 說明 | | ----------------------------- |:-------------------------------------------------------------------------------------------------------------------------------------------------- | | Picture formats | JPEG (accelerated), JPEG + RAW, GIF, BMP, PNG, YUV420, RGB888 | | Video formats | raw h.264 (accelerated) | | Effects | negative, solarise, posterize, whiteboard, blackboard, sketch, denoise, emboss, oilpaint, hatch, gpen, pastel, watercolour, film, blur, saturation | | Exposure modes | auto, night, nightpreview, backlight, spotlight, sports, snow, beach, verylong, fixedfps, antishake, fireworks | | Metering modes | average, spot, backlit, matrix | | Automatic white balance modes | off, auto, sun, cloud, shade, tungsten, fluorescent, incandescent, flash, horizon | | Triggers | Keypress, UNIX signal, timeout | | Extra modes | demo, burst/timelapse, circular buffer, video with motion vectors, segmented video, live preview on 3D models | **機構製圖** - Camera 模組 v2 [PDF](https://www.raspberrypi.org/documentation/hardware/camera/rpi-cam-v2_1-dimensions.pdf) - 詳細的規格文件:[Raspberry Pi Camera Module v2 型錄](https://www.raspberrypi.org/documentation/hardware/camera/README.md) #### 13.1.6.3. 在 TB3 上使用 Raspberry Pi Camera Raspberry Pi Camera V2 是 TurtleBot3 Waffle Pi 款的標配 camera。 ![](https://i.imgur.com/DzJf5d4.png) **介紹影片** TB3 Waffle Pi 款是使用 Raspberry Pi Camera Module v2 為標配 camera。請參考下列影片。 {%youtube AyZ5lcz5IzM %} #### 13.1.6.4. 使用指南 [Raspberry Pi Camera Packages](https://github.com/UbiquityRobotics/raspicam_node) 套件包支援在 ROS 上使用 Raspberry Pi Camera v1.x 及 v2.x 攝影機。以下表格列出安裝 Raspberry Pi Camera 所需之套件。在下節會介紹安裝方式。 | Package | Description | | ------------------------------------------------------------------------ |:-------------------------------------------------------------------- | | [Raspberry Pi Camera](https://github.com/UbiquityRobotics/raspicam_node) | Underlying library driver for communicating with Raspberry Pi Camera | **安裝** **[TB3 SBC 端]** 設定Camera硬體 ``` $ sudo raspi-config ``` ![](https://i.imgur.com/UA1NLBI.png) 選 3,Interfacing Options ![](https://i.imgur.com/YcKKG7X.png) 選 P1 Camera ![](https://i.imgur.com/wOXvWjB.png) 啟動 camera interface ![](https://i.imgur.com/spb5O7P.png) ![](https://i.imgur.com/Ql8zZuv.png) Raspberry Pi 重啟後,使用以下指令測試系統安裝是否正確。 ``` $ raspistill -v -o test.jpg ``` 顯示器上應會從攝影機看到 5 秒的預覽畫面,然後照相後存檔為 test.jpg **[TB3 SBC 端]**:下列指令可在 ROS 系統安裝相依的 Raspberry Pi Camera package ``` $ cd ~/catkin_ws/src $ git clone https://github.com/UbiquityRobotics/raspicam_node.git $ sudo apt-get install ros-kinetic-compressed-image-transport ros-kinetic-camera-info-manager $ cd ~/catkin_ws && catkin_make ``` **執行 raspicam node 節點** **[TB3 SBC 端]** 執行下列指令 ``` $ roslaunch turtlebot3_bringup turtlebot3_rpicamera.launch ``` 或是 ``` $ roslaunch raspicam_node camerav2_1280x960.launch ``` 當 raspicam node 在執行時,你可以啟動 rqt_image_view 來觀看由 camera 傳來的數據 :::warning **警示**:在遠端電腦執行 Rviz 前,請先確認 Raspberry Pi 3 板跟遠端電腦已經連接好。 ::: **[Remote PC 端]** 執行下列指令 ``` $ rqt_image_view ``` 一旦 GUI 圖形應用程序出現在螢幕上,您可以從應用程序頂端的下拉選單中選擇與 Raspberry Pi Camera 相關的數據主題名稱。 #### 13.1.6.5. 參考資源 - [Raspberry Pi Camera Module 攝影機模組規格](https://www.raspberrypi.org/documentation/hardware/camera/README.md) - [硬體設置](https://www.raspberrypi.org/documentation/configuration/camera.md) - [軟體設置](https://www.raspberrypi.org/documentation/raspbian/applications/camera.md) - [開始上手](https://projects.raspberrypi.org/en/projects/getting-started-with-picamera) - [ROS Node](https://github.com/UbiquityRobotics/raspicam_node) ## 13.2. 相容之第三方設備 如果要使用第三方設備替換原有的 TB3 標配,請參考此章節。 ### 13.2.1. Computer - TB3 的主要 SBC 電腦是樹莓派3(Burger and Waffle Pi),Intel Joule 570x(Waffle)。TB3 的 SBC 單板電腦,有足夠效能,但使用者會需要更好的 CPU,使用 GPU,增加記憶體來滿足其他的需求。此章節說明如何替換 SBC。 - 下圖顯示不同款的第三方 SBC。每個 SBC 規格都不同。只要你能夠在第三方 SBC 上安裝 Linux 及 ROS,你就可以使用它做為 TB3 的主電腦。當然如 Intel NUC,mini PC,小筆電等體積小的電腦,也可以做為 TB3 的主電腦用。 ![](https://i.imgur.com/AdWoq0r.png) 以下是 TB3 開發團隊有測試過的 SBC 列表: - [Raspberry Pi 3](https://www.raspberrypi.org/products/) - [Intel Joule 570x](https://ark.intel.com/products/96414/Intel-Joule-570x-Developer-Kit) - [DragonBoard 410c](https://developer.qualcomm.com/hardware/dragonboard-410c) - [NVIDIA Jetson TX2](https://developer.nvidia.com/embedded/buy/jetson-tx2-devkit) - [UP Board](http://www.up-board.org/up/) - [UP Core](http://www.up-board.org/upcore/) - [LattePanda](https://www.lattepanda.com/) - [ODROID-XU4](http://www.hardkernel.com/) #### 13.2.1.1. 硬體組裝 - 大部分的 SBC 都可以用 TB3 內附的 PCB Support 組裝起來。你可以跟採智科技採購額外的 PCB Support,或者下載 [3D 檔](http://www.robotis.com/service/download.php?no=676)用 3D printer 列印出來使用。 ![](https://i.imgur.com/LvcXMxP.png) - 參考下圖,使用 PCB Support 對準 SBC 固定孔,將 SBC 固定到 TB3 的層板上 ![](https://i.imgur.com/9sKvBh3.png) #### 13.2.1.2. 電源 - 固定 SBC 簡單,為 SBC 供電不容易。你需要修改現有的 power cable,或是購買/自製符合 SBC 用的 power cable。 - TB3 提供 2 種 power cables。下圖左邊是給樹莓派用,右邊是給 Intel Joule 570x 用。power cable 須符合 SBC 的供電規格。OpenCR 有 5V(4A) 及 12V(1A) 兩種 power,是 SBC 常用的規格。 ![](https://i.imgur.com/1VFed0b.png) - SBC 的電源是下方 OpenCR pinmap 左側的三個連接器 ![](https://i.imgur.com/4VTyQ3W.png) ### 13.2.2. 感測器 - TB3 Burger 的標配感測器有 360° 光達,9 軸 IMU,編碼器。TB3 Waffle 則多加 Intel RealSense 深度攝影機。TB3 Waffle Pi 則使用樹莓派鏡頭代替。 - 如果使用額外的感測器,你可以在將感測器連接到機器人後使用它。ROS 提供了一個開發環境,可以在其中使用上述感測器的驅動程序和軟體庫。但並非所有感測器都有支援 ROS 套件,但越來越多的感測器相關套件正在增加中。 ![](https://i.imgur.com/1Hbxc26.png) - 可以到 [ROS Wiki 的 Sensors Page](http://wiki.ros.org/Sensors) 看看有那些感測器支援 ROS - 如果要添加類比感測器,可以接到 OpenCR 控制板上,如果要使用非 USB 或 Ethernet 介面的類比感測器,請參考下一章節。 ## 13.3. 添加新感測器到 TB3 OpenCR 板 本節說明如何連接額外的感測器,如 IR、超音波、switch 開關等到 OpenCR 控制板。 ### 13.3.1. Bumper 碰觸感測器 - 名稱: 碰觸感測器 Touch sensor (TS-10) 側視 ![](https://i.imgur.com/o5zvlz8.png) 前視 ![](https://i.imgur.com/qLteETG.png) 後視 ![](https://i.imgur.com/8W1PPZ3.png) - 預設 PIN | Device |PIN | | -------- | -------- | | 前方感測器 | ROBOTIS_5-PIN 3 | | 後方感測器 | ROBOTIS_5-PIN 4 | :::info 如要使用別的 PIN,請參考 [OpenCR Pinmap](http://emanual.robotis.com/docs/en/parts/controller/opencr10/) ::: - 執行範例 in TB3 :::warning 請記得要先啟動 TB3 後才執行範例 ::: [Remote PC] 啟動 bumper 檔 ``` $ roslaunch turtlebot3_example turtlebot3_bumper.launch ``` - 在Arduino IDE下執行 此範例可在 Arduino IDE 內開啟 選擇 File -> Examples -> ROS -> 2. Sensors -> a_Bumper,上傳到 OpenCR [Remote PC] 執行 ros serial_node package ``` $ rosrun rosserial_python serial_node.py __name:=turtlebot3_core _port:=/dev/ttyACM0 _baud:=115200 ``` :::warning Warning: 如果上傳範例到 OpenCR,則必須重新上傳 [turtlebot_core](http://emanual.robotis.com/docs/en/platform/turtlebot3/opencr_setup/#opencr-setup) ::: ### 13.3.2. IR 感測器 - 名稱: IR sensor (IRSS-10) ![](https://i.imgur.com/9kS8ZQA.png) ![](https://i.imgur.com/cdUK3NE.png) - 預設 PIN | Device |PIN | | -------- | -------- | | IR sensor | ROBOTIS_5-PIN 2 | :::info 如要使用別的 PIN,請參考 [OpenCR Pinmap](http://emanual.robotis.com/docs/en/parts/controller/opencr10/) ::: - 執行範例 in TB3 :::warning 請記得要先啟動 TB3 後才執行範例 ::: [Remote PC] 啟動 cliff launch 檔 ``` $ roslaunch turtlebot3_example turtlebot3_cliff.launch ``` - 在Arduino IDE下執行 此範例可在 Arduino IDE 內開啟 選擇 File -> Examples -> ROS -> 2. Sensors -> b_Cliff,上傳到 OpenCR [Remote PC] 執行 ros serial_node package ``` $ rosrun rosserial_python serial_node.py __name:=turtlebot3_core _port:=/dev/ttyACM0 _baud:=115200 ``` ### 13.3.3. Ultrasonic 超音波 - 名稱: 超音波感測器 (HC-SR04) ![](https://i.imgur.com/7Dp7kiI.png) - 預設 PIN | Device |PIN | | -------- | -------- | | Trigger | BDPIN_GPIO_1 | | Echo | BDPIN_GPIO_2 | :::info 如要使用別的 PIN,請參考 [OpenCR Pinmap](http://emanual.robotis.com/docs/en/parts/controller/opencr10/) ::: - 執行範例 in TB3 :::warning 請記得要先啟動 TB3 後才執行範例 ::: [Remote PC] 啟動 sonar launch 檔 ``` $ roslaunch turtlebot3_example turtlebot3_sonar.launch ``` - 在Arduino IDE下執行 此範例可在 Arduino IDE 內開啟 選擇 File -> Examples -> ROS -> 2. Sensors -> c_Ultrasonic,上傳到 OpenCR [Remote PC] 執行 ros serial_node package ``` $ rosrun rosserial_python serial_node.py __name:=turtlebot3_core _port:=/dev/ttyACM0 _baud:=115200 ``` ### 13.3.4. Illumination 照明 - 名稱: LDR sensor (Flying-Fish MH-sensor) ![](https://i.imgur.com/lbnP44v.png) ![](https://i.imgur.com/9APfbNP.png) - 預設 PIN | Device |PIN | | -------- | -------- | | Analog | A1 | :::info 如要使用別的 PIN,請參考 [OpenCR Pinmap](http://emanual.robotis.com/docs/en/parts/controller/opencr10/) ::: - 執行範例 in TB3 :::warning 請記得要先啟動 TB3 後才執行範例 ::: [Remote PC] 啟動 illumination launch 檔 ``` $ roslaunch turtlebot3_example turtlebot3_illumination.launch ``` - 在Arduino IDE下執行 此範例可在 Arduino IDE 內開啟 選擇 File -> Examples -> ROS -> 2. Sensors -> d_Illumination,上傳到 OpenCR [Remote PC] 執行 ros serial_node package ``` $ rosrun rosserial_python serial_node.py __name:=turtlebot3_core _port:=/dev/ttyACM0 _baud:=115200 ``` ### 13.3.5. LED - 名稱: led (led101) ![](https://i.imgur.com/OQxTh6t.png) ![](https://i.imgur.com/sy6Ofl6.png) - 預設 PIN | Device | PIN | | -------- | -------- | | Front_left | BDPIN_GPIO_4 | | Front_right | BDPIN_GPIO_6 | | Back_left | BDPIN_GPIO_8 | | Back_right | BDPIN_GPIO_10 | :::info 如要使用別的 PIN,請參考 [OpenCR Pinmap](http://emanual.robotis.com/docs/en/parts/controller/opencr10/) ::: - 執行範例 in TB3 當連上 led 後此範例永遠啟用。led 會根據 TB3 的直線及角速度顯示不同模式 ## 13.4. 開源資源下載及授權 ### 13.4.1. TB3 開源軟體下載 - TurtleBot3 軟體 - [TurtleBot3](https://github.com/ROBOTIS-GIT/turtlebot3) - [TurtleBot3 Messages](https://github.com/ROBOTIS-GIT/turtlebot3_msgs) - [TurtleBot3 Simulations](https://github.com/ROBOTIS-GIT/turtlebot3_simulations) - [TurtleBot3 Applications](https://github.com/ROBOTIS-GIT/turtlebot3_applications) - [TurtleBot3 Applications Messages](https://github.com/ROBOTIS-GIT/turtlebot3_applications_msgs) - [TurtleBot3 Autorace](https://github.com/ROBOTIS-GIT/turtlebot3_autorace) - [TurtleBot3 Deliver](https://github.com/ROBOTIS-GIT/turtlebot3_deliver) - OpenCR1.0 控制板韌體 - [TurtleBot3 Burger, Waffle. Waffle Pi and Friends](https://github.com/ROBOTIS-GIT/OpenCR) - TurtleBot3 的參考軟體 - [TurtleBot](https://github.com/turtlebot) - [DYNAMIXEL SDK](https://github.com/ROBOTIS-GIT/DynamixelSDK) - [DYNAMIXEL Workbench](https://github.com/ROBOTIS-GIT/dynamixel-workbench) - [LDS Driver](https://github.com/ROBOTIS-GIT/hls_lfcd_lds_driver) - [OpenManipulator](https://github.com/ROBOTIS-GIT/open_manipulator) - [OpenManipulator Messages](https://github.com/ROBOTIS-GIT/open_manipulator_msgs) - [OpenManipulator Simulations](https://github.com/ROBOTIS-GIT/open_manipulator_simulations) - [OpenManipulator Perceptions](https://github.com/ROBOTIS-GIT/open_manipulator_perceptions) - [OpenManipulator with TB3](https://github.com/ROBOTIS-GIT/open_manipulator_with_tb3) - [OpenManipulator with TB3 Messages](https://github.com/ROBOTIS-GIT/open_manipulator_with_tb3_msgs) - [OpenManipulator with TB3 Simulations](https://github.com/ROBOTIS-GIT/open_manipulator_with_tb3_simulations) ### 13.4.2. 開源硬體下載 - 電路及 PCB Gerber 檔 - [OpenCR1.0](https://github.com/ROBOTIS-GIT/OpenCR-Hardware) - TurtleBot3 的硬體款式 - [TurtleBot3 Burger](http://www.robotis.com/service/download.php?no=676) - [TurtleBot3 Waffle](http://www.robotis.com/service/download.php?no=677) - [TurtleBot3 Waffle Pi](http://www.robotis.com/service/download.php?no=678) - urtleBot3 的朋友硬體改裝造型 - [TurtleBot3 OpenManipulator](http://www.robotis.com/service/download.php?no=679) - [TurtleBot3 Segway](http://www.robotis.com/service/download.php?no=680) - [TurtleBot3 Conveyor](http://www.robotis.com/service/download.php?no=681) - [TurtleBot3 Monster](http://www.robotis.com/service/download.php?no=682) - [TurtleBot3 Tank](http://www.robotis.com/service/download.php?no=683) - [TurtleBot3 Omni](http://www.robotis.com/service/download.php?no=684) - [TurtleBot3 Mecanum](http://www.robotis.com/service/download.php?no=685) - [TurtleBot3 Bike](http://www.robotis.com/service/download.php?no=686) - [TurtleBot3 Road Train](http://www.robotis.com/service/download.php?no=687) - [TurtleBot3 Real TurtleBot](http://www.robotis.com/service/download.php?no=688) - [TurtleBot3 Carrier](http://www.robotis.com/service/download.php?no=689) - OpenManiapulator 機器手臂硬體 - [OpenManiapulator Chain](http://www.robotis.com/service/download.php?no=690) - [OpenManiapulator SCARA](http://www.robotis.com/service/download.php?no=691) - [OpenManiapulator Link](http://www.robotis.com/service/download.php?no=692) ### 13.4.3. 軟體授權 主要的軟體授權是 [Apache license 2.0](https://www.apache.org/licenses/LICENSE-2.0). 但有一些原始授權是 [3-Clause BSD License](https://opensource.org/licenses/BSD-3-Clause) or [GPLv3](https://opensource.org/licenses/GPL-3.0). ### 13.4.4. 硬體授權 TurtleBot3 是一個開源的硬體專案,授權是 [Open Source Hardware Statement of Principles and Definition v1.0](http://freedomdefined.org/OSHW). ### 13.4.5. 文件授權 文件授權是 [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/). # **14. 常見問題 FAQ** --- **常見問題**: 1. 如何在 Raspberry Pi 樹莓派啟動 SSH Server 2. 如何在 TB3 及 Remote PC 間同步時間 3. 設定 TB3 上的 Dynamixel 智能馬達 4. 當電池連接在 TB3 時,可以充電嗎? 5. 如何下載 TB3 的 3D 列印 STL 檔案 6. Intel Joule 深度攝影機 USB-C Port 在 Win 10 不能辨識 7. Intel Joule 深度攝影機在開機/安裝時凍結 8. 如何更新軟體 9. 如何更新韌體 ## 14.1. 如何在 Raspberry Pi 樹莓派啟動 SSH Server 首先,您必須在 Remote PC 和 Raspberry Pi 上安裝 SSH。 ``` $ sudo apt-get install ssh ``` 對於 Raspberry Pi(TurtleBot3 Burger 和 Waffle Pi),由於 Ubuntu MATE 16.04.x 和 Raspbian 的 SSH 服務器預設是禁用的。如果要啟用 SSH,請參閱以下文檔。 - [SSH Instruction](https://www.raspberrypi.org/documentation/remote-access/ssh/) - [Ubuntu MATE in Raspberry Pi](https://ubuntu-mate.org/raspberry-pi/) 或使用以下指令。 ``` $ sudo service ssh start $ sudo ufw allow ssh ``` 在開始連接 SSH 之前,您需要檢查 host name 主機名稱。 下圖中的紅色方框顯示主機名稱。 ![](https://i.imgur.com/nZnuogL.png) 然後,你就可以在 Remote PC 上使用 SSH 來下指令。 ``` $ ssh ${HOSTNAME}@xxx.xxx.xx.xx ``` ![](https://i.imgur.com/qosp9M7.png) ## 14.2. 如何在 TB3 及 Remote PC 間同步時間 :::info **備註**:此方法需要 TurtleBot 和 Remote PC 都連網,且都在同一個網段。 ::: - 安裝 ntpdate,並同步 NTP 服務器到 TurtleBot 和 Remote PC 上 。 ``` $ sudo apt-get install ntpdate $ sudo ntpdate ntp.ubuntu.com ``` ## 14.3. 設定 TB3 上的 Dynamixel 智能馬達 :::warning **警告**:請一次**只連接一個** DYNAMIXEL 智能馬達到 OpenCR 控制板上。 ::: 1. 透過 USB 線將 OpenCR 連到 PC,並開啟電源 2. 按住 SW2 鍵,然後按一下 Reset 鍵,當 Status LED 在閃爍時,放開 SW2 鍵。可參考[開機程序](https://emanual.robotis.com/docs/en/parts/controller/opencr10/#boot-sequence)。 **3. 上傳設定韌體到 OpenCR** 如下圖所示,找到 Examples > turtlebot3 > turtlebot3_setup > turtlebot3_setup_motor 並打開範例。 ![](https://i.imgur.com/TQqskNw.png) **4. 點擊 Arduino IDE 上的 Upload 鍵** 如果範例成功上傳到 OpenCR 上,請將一個 DYNAMIXEL 智能馬達連接到 OpenCR 上。點擊右上角的 Serial Monitor 圖標,如下圖所示。 ![](https://i.imgur.com/RokAeuI.png) **5. 重置 OpenCR** 如果範例未正常運行,請按 RESET 按鈕。 ![](https://i.imgur.com/E7ftFKn.png) **6. 選擇合適的 Option 選項** 當 Serial Monitor 運行時,DYNAMIXEL 設置選單,如下圖所示。 TurtleBot3 有兩個用於左右輪的 DYNAMIXEL 智能馬達組成,因此請根據組裝位置選擇合適的選項。 例如,要設置左側 DYNAMIXEL 智能馬達,請在文字框中輸入 1。 ![](https://i.imgur.com/l1nmCSQ.png) **7. 確認** 為防止出現任何錯誤,我們需要做確認。 要繼續進行配置,請在文字框中輸入 Y. ![](https://i.imgur.com/VUO3m26.png) **8. 設定 Dynamixel 智能馬達** 設置工具開始使用不同的 ID 和 Baudrates 來搜索連接的 DYNAMIXEL 智能馬達。如果檢測到 DYNAMIXEL,它將自動設置給 TurtleBot3 使用。當設置完成後,屏幕上會顯示 OK 消息。 ![](https://i.imgur.com/7cuR10h.png) **9. 測試 Dynamixel 智能馬達** 完成設置過程並驗證是否已正確進行更改。如果您選擇 DYNAMIXEL 的測試選單之一,則所選的 DYNAMIXEL 將開始順時針和逆時針旋轉。要結束測試,請按 Enter鍵。例如,要測試左側 DYNAMIXEL,請輸入 3,如下圖所示,輸入 4 則表示測試右側 DYNAMIXEL。 ![](https://i.imgur.com/HDbrLhC.png) **10. 上傳 TB3 Core** 如果 DYNAMIXEL 智能馬達設置完成,則應將 TurtleBot3 Core 範例上傳到 OpenCR 控制板。請從 Examples > tutlebot3 > turtlebot3_burger 或 turtlebot3_waffle > turtlebot3core 中找到適當的核心範例,並將範例上傳到 OpenCR。 ## 14.4. 當電池連接在 TB3 時,可以充電嗎? 當電池連接到 TB3 時,**不建議**對電池進行充電和放電,這可能會使產品的保固失效。 如果一定要在 TurtleBot3 on 開啟時進行充電 or 更換電池,請按照以下步驟操作: 1. 先將 SMPS 12V 5A 外接電源線連接到 OpenCR 控制板上 2. 將耗盡的電池從 OpenCR 移除 3. 將耗盡的電池連接到電池充電器,或用充滿電的電池更換耗盡的電池 4. 將充滿電的電池連接到 OpenCR 5. 從 OpenCR 移除 SMPS 12V 5A 外接電源線 ## 14.5. 如何下載 TB3 的 3D 列印 STL 檔案 您可以通過以下方式下載 STL 檔案。 我們在下面的鏈接中發布了 TurtleBot3 Friends各種改裝硬體的設計文件。 - [Locomotion(TurtleBot3 Friends 各式改裝造型)](http://emanual.robotis.com/docs/en/platform/turtlebot3/locomotion/#turtlebot3-friends-car) 因此,您可以直接從每個 Onshape 雲端網站下載 STL 文件,如下圖所示。 1. 登錄。(如果您沒有 ID,則必須創建一個。) 2. 點擊 “toggle tab manager”(選單將顯示在瀏覽器的左側。) 3. 點擊 “Parts folder” 4. 右鍵單擊要下載的文件的圖標。 5. 點擊 “Export...” 6. 最後,你可以下載需要的輸出檔案類型。 ![](https://i.imgur.com/Hrp8eGy.png) ![](https://i.imgur.com/DhDkMlD.png) ## 14.6. Intel Joule 深度攝影機 USB-C Port 在 Win 10 不能辨識 :::info **備註**: TB3 Waffle 款附的 ~~Intel Joule 570x 深度攝影機~~已經停產 ::: 有些用戶回報說,當他們嘗試更新 BIOS 時,Windows 10 上無法識別 USB-C 端口。 請查看下列解決方案的鏈接(感謝 Rknlhrqy 和 VRAORESEARCH)。 - [ROS Discourse](https://discourse.ros.org/t/turtlebot-3-successfully-upload-alternative-ubuntu-desktop-16-04-to-joule/2224) - [Intel Communities](https://communities.intel.com/thread/109766) ## 14.7. Intel Joule 深度攝影機在開機/安裝時凍結 :::info **備註**: TB3 Waffle 款附的 ~~Intel Joule 570x 深度攝影機~~已經停產 ::: 如果未正確安裝 BIOS 韌體,則可能會發生這種情況。 請再次燒錄 BIOS 韌體 #193版。 1. 關閉 Intel Joule。 2. 使用以下連接所下載的 [BIOS 韌體 #193](https://software.intel.com/en-us/flashing-the-bios-on-joule) 來進行更新。 - [下載 BIOS 韌體#193](https://downloadmirror.intel.com/26206/eng/joule-firmware-2017-02-19-193-public.zip) 3. 確保在紅色框中看到該訊息。 ![](https://i.imgur.com/zNueBpI.png) ## 14.8. 如何更新 TB3 軟體 **[TB3 SBC 端]** ``` $ cd ~/catkin_ws/src/ $ rm -rf turtlebot3/ turtlebot3_msgs/ hls_lfcd_lds_driver/ $ git clone https://github.com/ROBOTIS-GIT/hls_lfcd_lds_driver.git $ git clone https://github.com/ROBOTIS-GIT/turtlebot3_msgs.git $ git clone https://github.com/ROBOTIS-GIT/turtlebot3.git $ cd ~/catkin_ws/src/turtlebot3 $ sudo rm -r turtlebot3_description/ turtlebot3_teleop/ turtlebot3_navigation/ turtlebot3_slam/ turtlebot3_example/ $ cd ~/catkin_ws/ $ rm -rf build/ devel/ $ cd ~/catkin_ws && catkin_make -j1 ``` **[Remote PC 端]** ``` $ cd ~/catkin_ws/src/ $ rm -rf turtlebot3/ turtlebot3_msgs/ $ git clone https://github.com/ROBOTIS-GIT/turtlebot3_msgs.git $ git clone https://github.com/ROBOTIS-GIT/turtlebot3.git $ cd ~/catkin_ws/ $ rm -rf build/ devel/ $ cd ~/catkin_ws && catkin_make ``` ## 14.9. 如何更新 TB3 韌體 [TB3 SBC 端] - Burger ``` $ export OPENCR_PORT=/dev/ttyACM0 $ export OPENCR_MODEL=burger $ rm -rf ./opencr_update.tar.bz2 $ wget https://github.com/ROBOTIS-GIT/OpenCR/raw/master/arduino/opencr_release/shell_update/opencr_update.tar.bz2 && tar -xvf opencr_update.tar.bz2 && cd ./opencr_update && ./update.sh $OPENCR_PORT $OPENCR_MODEL.opencr && cd .. ``` - Waffle 或 Waffle Pi ``` $ export OPENCR_PORT=/dev/ttyACM0 $ export OPENCR_MODEL=waffle $ rm -rf ./opencr_update.tar.bz2 $ wget https://github.com/ROBOTIS-GIT/OpenCR/raw/master/arduino/opencr_release/shell_update/opencr_update.tar.bz2 && tar -xvf opencr_update.tar.bz2 && cd ./opencr_update && ./update.sh $OPENCR_PORT $OPENCR_MODEL.opencr && cd .. ``` # **15. 聯絡採智科技** --- ![](https://i.imgur.com/jZ7APk4.png) ![](https://i.imgur.com/mJ5jCT8.png) 採智科技是 [**TurtleBot3 台灣唯一官方授權代理商**](https://www.turtlebot.com/partners/),如有產品需求,使用,技術或維修上的問題,請聯絡我們。 **採智科技股份有限公司** 台北市11076信義區松德路12號10F Tel: +886-2-2345-7799 Fax: +886-2-2345-0867 mail: info(at)idminer.com.tw 採智科技網站: http://www.idminer.com.tw/ ** **下載 "ROS 機器人編程" 簡中版** (使用 TurtleBot3 為 ROS 1 實作平台) - [**ROS 機器人編程- 簡中 PDF**](https://www.dropbox.com/s/5cqhl5f17e2p1b5/ROS_Robot_Programming_CN.pdf?dl=0) - [**ROS Robot Programming- 英文 PDF**](https://www.dropbox.com/s/x1bj7u878p2hgtq/ROS_Robot_Programming_EN.pdf?dl=0) ![](https://i.imgur.com/R8L7KfX.png) | **簡中版章節列表** | | | |:--------------------- |:----------------------- | --------------- | | 1. 機器人軟件平台 | 6. ROS 工具 | 11. SLAM 和導航 | | 2. 機器人操作系統 ROS | 7. ROS 編程基礎 | 12. 服務機器人 | | 3. 搭建 ROS 開發環境 | 8. 機器人、傳感器和電機 | 13. 機械手臂 | | 4. ROS 的重要概念 | 9. 嵌入式系統 | | | 5. ROS 命令 | 10. 移動機器人 | | ###### tags: `TurtleBot3(ROS2)`

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully