Try   HackMD

DIT Mecanum Wheels Project Work Log

前情提要

開始撰寫日期:112.02.24

進入 DIT 之後的第一個 project ,目標應該是要利用寒假所學的 ROS 跟 STM 來完成 project ,並且跟學習不同內容的同學互相交流。我最後分配到的組別是要做麥克納姆輪,目標是能夠走正方形之類的吧。

02.23 找到 ROS pid package 並練習使用

發現 ROS 有人有寫好了 pid 這個 package,於是我想到時候或許可以用這個來控制機器人的移動,但關於四個輪子如何個別使用 pid 控制我還沒想到。

02.24 找到另一組也是做 Eurobot 的團隊寫的麥克納姆輪運動學模型

02.26 甘特圖建立與 畫好 ROS 架構

利用 google sheet 的 project sheet planning 外掛來製作甘特圖。另外也畫好了 ROS 的架構,如果能夠順利的話希望就能直接利用這個架構。架構是基於 pid 這個 package 去設計的。
希望能在下次組內會議分配 ROS 與其他部分的工作,然後建立好會議記錄、甘特圖、工作日誌的制度。

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

第二版架構

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

04.08 python通訊成功!

  • 使用舊版搭配 normal 而非 circular
  • RX/TX檢查有無插錯
  • DMA_init()檢查順序
  • 可逐漸測試error_callback
  • cpp 通訊未測試
  • 若不是用 roslaunch 要記得 roscore

(STM如果從不同電腦間搬動,編譯前先把debug資料夾跟launch檔刪掉,按編譯他會幫你生成新的)

04.10 cpp通訊部分成功

  • STM可以subscribe,但是只要publish就會造成斷訊

04.11 cpp 完成通訊!

沒加這一行,

nh.advertise(publisher);

04.11

ROS 直接傳送速度給 STM

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

可做事項: 送穩定速度的模組,即替換掉 control.cpp 中的速度算法

05.02

修改二代機的 STM 程式(蘇建翰),修改輪子方向與編號,並把 PWM 的頻率改成 20K 以上(電流的聲音去掉了)。
遇到的問題: 電路板有些接觸不良(好像是邏輯電開關那裏需要動一下)

待處理事情:

  1. 不確定皮帶輪的齒輪比跟跑出來的距離有沒有差
  2. 車子的尺寸、輪子半徑、皮帶輪齒輪比
  3. STM 給 get_vel_x 沒測到 x = -1的情況,但正的方向ok
  4. DMA_Init() 順序記得改回來

ROS 架構與分工

若還有時間可以做的事

  1. tf 座標轉換
  2. rviz 模擬

成果發表整理

最終 ROS 結構

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More →

最終 v-t 圖

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More →

STM 與 ROS 單位換算問題

我們用的運動學模型單位是 rad/s,STM 不確定是不是用 RPM,試了很久還是數值範圍有點怪,所以決定自行用測速槍量轉速(STM速度給1,測出的RPM),得到的數值就可以直接拿來用。用法如下:

(正向運動學)

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More →

(逆向運動學)
Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More →