Dingo
      • 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
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Write
        • Owners
        • Signed-in users
        • Everyone
        Owners 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
    • Make a copy
    • Transfer ownership
    • Delete this note
    • 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 Help
Menu
Options
Engagement control Make a copy 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
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Write
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners 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
    # Dingo 開發紀錄 :::danger ## **To 教授以及助教:** 由於使用的是Hackmd轉換pdf功能,有些資料並沒有完整顯示,歡迎點擊觀看[完整版](https://hackmd.io/@kendellhsu/Dingo_record): https://hackmd.io/@kendellhsu/Dingo_record ::: ## 短期進度規劃 - [x] 切片完solidworks檔案 -> 列印機器狗部件 - [x] 測試電路 -> 腳 -> 接上servo會一直出現短路的狀況 - [x] 連接硬體 - [x] 列印機器狗部件 - [ ] 建置模擬環境 - [ ] 建置各種地形 -> AI生成地形 - [x] 校正馬達 - [x] Bluetooth Setup - [x] Wifi Setup - [x] LCD Node Additional Setup - [x] Setting necessary permissions for ROS - [x] Setting up I2C -> IMU接不到 - [x] Setting up SPI -> 要讓樹莓派一開機就可以給權限 - [x] Setting up Serial Comms - [ ] SD Card Backup - [ ] Servo Calibration - [ ] Docker Container - [ ] !!Dingo_Driver!! - [ ] [ROS學習](https://hackmd.io/@HC8294/H111zM2Ayg/edit) - [ ] 研究影像資料預處理 - [ ] Issac Lab熟悉 - [ ] 整理電路並完成組裝 ## 進度回報 ### 機器狗硬體零件 3D列印零件完成 ![螢幕擷取畫面 2025-04-16 013613131](https://hackmd.io/_uploads/HJ8EtzhRkg.png) ### 測試電路 1. 樹莓派、PCB、Arduino nano有正常過電 2. 電池還沒到-> 電池轉接頭還沒買 3. 腳目前還沒辦法正常運作 ![螢幕擷取畫面 2025-04-16 013553](https://hackmd.io/_uploads/ByI4tM20Jx.png) #### 電池充電狀況 - 充滿電:16.8V - 低於15V就準備要充電了 ::::spoiler sevor board problem Exp: 馬達會不斷出現短路的狀況 ::: info 期中報告回報後有進行一些測試 ::: ##### 連接電源採用同樣的接電源供應器仍然會抽筋 - 推測如何老說的一樣瞬間電流不夠 (瞬間電流查詢結果可能為額定電流的3~4倍) - 電供只接一個馬達的,不會產生瞬間短路,arduino沒有renew,但馬達會抽搐或停擺,故前面推測成立,瞬間電流不夠,導致抽筋。 - 採用全部用電腦USB供電,馬達正常運作。 供電正常的馬達運作的抖動很小 用電表測其電流值為30~10uA之間,很像測不到瞬間電流? :::warning 瞬間電流如果用電表的max功能測試試看呢?? ::: - [抽筋](https://youtube.com/shorts/OOFkgU3-TUU?si=OrPN6MJneFGjvCP-) - [抽筋波型](https://youtu.be/q18bRBZebSk?si=E4lFMeW8dNxHS7rs) - [抽筋v2](https://youtube.com/shorts/vZXA1rK4Ouo?si=oYbPKvHcBoq1DAx2) - [電腦供電無抽筋](https://youtube.com/shorts/BaNyMLFVBsU?si=JK2m71pWFM3CfiI3) ##### 檢查負載問題 - 目前用示波器看,有無接上負載的PWM的波型都一樣,不知道有無接錯電路導致結果一致 - PWM電阻測量500~600ohms、電壓 2.98~3.24v ,電流值 6~7mA ? - 電表測出來的值跟示波器不同,很像不能用電表測,波型不是穩定的 ##### 目前的推論 - 採用電池供電,能輸出較高的瞬間電流,並且servo board的電容可以換更大的,讓瞬間電流比較好衝上去,但會不會導致放電變慢可能要評估一下size。 - Arduino須採用同一電源以防止訊號短路,重新接好電路看ROS有沒有依然E-stop被按下,可能這問題有互相影響。 ##### 解決方法 電池到了以後,馬達就可以正常運作了 :::: 4. 接線還有些地方沒接穩,正式整線時要再確認一下穩定度 ### Ubuntu ubuntu20.04並沒有提供desktop version 所以進去之後用```sudo apt-get install ubuntu-desktop``` #### SPI 1. `ls -la /dev/spidev*` 確認權限是否有開啟,會看到 ``` dev/spidev0.0 dev/spidev0.1 ``` 3. 輸入下面4個指令 ``` sudo groupadd spi sudo usermod -aG spi <yourusername> sudo chown :spi <put the spi device name here> sudo chmod g+rw <put the spi device name here> ``` 3. :::spoiler [設定開機自動執行程序](https://ithelp.ithome.com.tw/articles/10216142) Run sudo nano `/etc/systemd/system/spi-permissions.service` and put the following into the file, saving and exiting afterwards: ``` [Unit] Description=Set SPI Permissions [Service] ExecStart=/path/to/your/script.sh User=root Group=root Restart=on-failure RestartSec=5s [Install] WantedBy=multi-user.target ``` Now, run nano ~/startspi.sh and put the following into the file, saving and exiting afterwards. Note: If your SPI device names are different, please update them accordingly: ``` #!/bin/bash sudo usermod -aG spi <yourusername> sudo chown :spi /dev/spidev0.0 sudo chmod g+rw /dev/spidev0.0 sudo chown :spi /dev/spidev0.1 sudo chmod g+rw /dev/spidev0.1 ``` Run the following in the terminal: `sudo chmod +x /path/to/your/script.sh` `sudo systemctl daemon-reload` `sudo systemctl enable spi-permissions.service` `sudo systemctl start spi-permissions.service` ::: #### LCD module 依照LCD module廠商提供的SPEC,補了漏了些module,補完後有成功執行檔案,但是依然沒有顯示LCD Solution : 全部的GPIO都要用BCM協議而不是Raspberry pi上的物理腳位 ![截圖 2025-04-16 凌晨1.26.42](https://hackmd.io/_uploads/rJuJwf2Ryx.png) #### I2C 連接IMU跟Arduino 一開始一直讀取不到正確的位置,後來發現是電路上連接的問題 ![截圖 2025-04-16 凌晨1.34.22](https://hackmd.io/_uploads/SJAsOz20kl.png) - 0x40為servo驅動板 - 0x28為IMU傳感器 #### Xbox Controller 1. Install bluetooth ``` sudo apt-get install bluetooth bluez bluez-tools sudo apt-get install pi- ``` 2. To pair and connect a controller: ``` bluetoothctl scan on bluetoothctl pair AA:BB:CC:11:22:33 (example device) bluetoothctl connect AA:BB:CC:11:22:33 bluetoothctl trust AA:BB:CC:11:22:33 ``` :::spoiler (若有遇到連線不上的問題) 在` /etc/bluetooth/main.conf` 中修改 `ControllerMode = dual` 增加藍牙的相容性 ::: 3. 測試連線正常 - 文字介面:`jstest /dev/input/js0` - 圖形界面:`joygtk` ### Gazebo模擬 利用 `Gazebo` 模擬機器狗的控制與運動行為,為後續的模型訓練做準備 (參考: [模擬影片1](https://drive.google.com/file/d/1UxMt673rTOD3MhO3O-EeZGbhRSGnYuB0/view?usp=drive_link)、[模擬影片2](https://drive.google.com/file/d/1fV99l_UiliKoCBB-7LmuPvQayBw1cEJU/view?usp=drive_link)) ![螢幕擷取畫面 2025-04-16 151123](https://hackmd.io/_uploads/S1is_0hAkg.png) ![螢幕擷取畫面 2025-04-16 151135](https://hackmd.io/_uploads/HyjiuRnAJe.png) ### Issac gym環境建置 尚在學習環境建置與法的部分,參考官方[教學網站](https://isaac-sim.github.io/IsaacLab/main/source/tutorials) 目前做法:從提供的教學程式碼中做修改,達成所需要的功能 :::spoiler Todo List - [ ] 建置模擬環境 - [x] 將機器狗放入模擬環境並連結感測器 - [x] 訓練模型 - [ ] 將訓練好的模型串接ROS :::spoiler 硬體複現日誌 ==排除馬達問題== ::: ### some reference [Another Version of Quadruped Robot](https://github.com/NDHANA94/hyperdog_ros2) ## 可能遇到的問題 ### Sim-to-Real 誤差: 模擬和現實之間差異不可避免,包括摩擦係數、馬達延遲、相機噪聲、光照變化等。這可能導致在模擬中表現良好的策略轉移到實體時效果不佳。 #### sol: 為了減少誤差,可以在訓練時加入隨機擾動:隨機改變摩擦和質量參數、在相機影像上添加噪點和隨機亮度變化、在 IMU 資料中注入高斯噪聲,增強學習效果。 在初步上機時,可逐步提高策略輸出權重,觀察並適當調整策略(例如透過在真實環境中記錄感測與動作,進一步微調神經網路)。 策略學會了一種盲走(gait),但沒有真正根據相機改變步態。為避免這點,一方面確保訓練環境設定需要視覺才能解決(如地形有隨機坑洞/障礙,純盲走會跌倒,必須看相機才能避開), 另一方面可以適當引導策略利用視覺:例如在獎勵中加入遠處地形相關的項(鼓勵提早跨越障礙)或者在網路結構上融合視覺特徵與動作決策。此外,調整圖像處理方式也很重要,可嘗試降低輸入影像解析度、轉為深度圖或高度圖以減少不必要的資訊,讓網路更容易學到有用特徵。 ### `感測-決策-執行` 需要足夠快: 理想控制頻率在 30~50Hz 以上。 相機影像的處理可能成為瓶頸,例如深度相機30Hz輸出且每幀需經CNN處理。使用樹莓派較弱計算硬體,可能無法滿足實時性。 因此在部署時或需進行模型壓縮與加速(如網路剪枝、8-bit 量化、Edge TPU加速等)以降低推理時延。另外,ROS本身引入的通訊延遲也要注意,應確保策略節點和機器人控制在同一設備上或使用共享內存傳輸減少延遲。 ### 腳底材料摩擦力不足 底部改用TPU 85A :列印參數問GPT 上層連接使用PETG | 參數項目 | 建議值 | 說明 | | -------------------- | ---------------------------- | ---------------------------------- | | **噴嘴溫度** | **230–235°C** | PINRUI 的 TPU 表面略黏,建議稍高一點黏著性更好 | | **床溫** | **50–60°C** | 提升底層附著力,避免捲邊翹起 | | **列印速度** | **20–30 mm/s** | TPU 列印穩定度關鍵,PINRUI 85A 在高速下容易拉絲或拉空 | | **外牆速度** | **15–20 mm/s** | 外表面品質會好很多 | | **風扇轉速** | **0–20%(低速或關閉)** | TPU 黏性高,風扇開太大會導致翹起、翹邊,建議關掉 | | **退料距離** | **0.8–1.2 mm(Direct Drive)** | 太長會卡絲、咬絲,尤其A1是短距離擠出器 | | **退料速度** | **15–20 mm/s** | 慢速退料減少拉絲問題 | | **Flow Ratio(流量倍數)** | **1.05–1.10** | PINRUI TPU 偶爾會有擠出不足,建議微調上升 | | **加速度限制** | **500 mm/s² 以下** | TPU 遇高加速度易擠出不穩,建議下修 | | **支撐設定** | **啟用樹狀支撐,密度 10–15%** | 若有懸空部分支撐建議輕量、易剝除即可 | ## **Micro-Textures (micrometer scale)** ### **Hexagonal Pillar Arrays** ![image](https://hackmd.io/_uploads/HkSTwdQexx.png) https://pubs.rsc.org/en/content/articlepdf/2011/sm/c1sm00015b Specs: pillar diameter ~0.5–1 mm, height ~1 mm, pitch 1.5–2 mm. Effect: Channels water/debris, boosts µ by ~10–25 % on wet surfaces. ### **Mushroom-tip Microstructures** ![image](https://hackmd.io/_uploads/r1V1F_7xex.png) https://pmc.ncbi.nlm.nih.gov/articles/PMC3061124/ Specs: stalks 20–50 µm diam., caps ~30 µm; density ~10⁴ stalks/cm². Effect: Biomimetic adhesion → reversible stick-and-slip, great on smooth floors. ## After期中報告 ### 0. SD卡壞掉,重新設定整台系統 為了避免再次發生,進行SD卡備份 在另外一台linux主機上運行備份 `sudo dd if=/dev/sdb of=~/dingo_backup.img bs=4M status=progress` 如果要復原檔案 `sudo dd if=dingo_backup of=/dev/sdb bs=4M status=progress` ## 遇到的問題 ### 1. Arduino問題 Arduino目前有供電不足的情況,目前是額外供電 TX,RX 也不太穩定 ### 2. 馬達的預設角度錯誤 馬達運作起來後 跟我們預測的角度差異蠻大的 下一步:修改Makefile檔案,讓ROS可以直接運行文件內的`Calibration.py`

    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