# 工作紀錄/楊鈞凱 # [手機WiFi](https://itriap6.itri.org.tw/aticr/PDA_MACList/Index.aspx) ###### tags: `工作紀錄` > :memo:這份筆記為7/24更新 ## 7/8 1. 由CAD Exchanger軟體將[官方STEP檔案](https://drive.google.com/file/d/1Iz6h_1lyu4EN9uLlfG1DANxYU34EhsyI/view)轉成wrl格式能放入webots中但是**部件破碎並且無關節資訊** 2. 透過[webots官方教學](https://cyberbotics.com/doc/guide/tutorials)學習webots操作,了解環境創建與webots模擬結構 3. 裝ros2裝壞了QQ重灌宿舍電腦 ## 7/9 1. X:Webots+ROS2 on Ubuntu 18.04 [詳細踩坑紀錄1](https://hackmd.io/bqU9LDBuR6ytg4iC2RpxnA#Webots-on-Ubuntu1804) [詳細踩坑紀錄2](https://hackmd.io/bqU9LDBuR6ytg4iC2RpxnA#WebotsROS2) 確認ROS2和webots安裝正確,但此[webots_ros2 Package](http://wiki.ros.org/webots_ros2)套件包安裝無論從apt或是從源代碼安裝均失敗噴錯:cry: 2. Proto轉換套件測試中 [urdf2webots 1.0.3](https://pypi.org/project/urdf2webots/) [安裝ROS](http://wiki.ros.org/melodic/Installation/Ubuntu) 目前安裝到<code>sudo apt install ros-melodic-desktop-full</code>指令完成 需要從1.5 Environment setup開始 3. Setup Teamviewer [沒有接上螢幕的問題](https://community.teamviewer.com/t5/Knowledge-Base/How-do-I-use-TeamViewer-on-headless-systems/ta-p/4256) 其他遠端方式均有類似問題 需連接一個螢幕 4. 安裝tensorflow於宿舍電腦 ## 7/10 7/13 7/14 :paperclip: 讀論文CNF–2019–Accelerating Convolutional Neural Networks via Activation Map Compression ## 7/15 初步建立webot模型 ![](https://i.imgur.com/0g52Pi2.png) 可參考官方[tutorial](https://cyberbotics.com/doc/guide/tutorial-6-4-wheels-robot) ## 7/16 參考[古月居 Webots建模指南2-機器人建模](https://www.guyuehome.com/7169) 設定轉軸與controller 參考[keyboard操作方式](https://cyberbotics.com/doc/reference/keyboard) 設店鍵盤連接controller 以[機器手臂資料 1](https://frankaemika.github.io/docs/control_parameters.html)、[機器手臂資料 2](https://www.generationrobots.com/media/panda-franka-emika-datasheet.pdf)、[機器手臂資料 3](https://wiredworkers.io/wp-content/uploads/2019/06/Franka-Emika-Panda-Datasheet-may-2019.pdf) 設定轉動範圍與相關參數 操作測試[程式碼](https://github.com/CT-Lab/controller-testing) ## 7/17 sparse coding model學習中... [機器人學](/zK9UmyvLQK2t1-p_3eBfLg)學習中... ## 7/20 物理參數參考[此blog](https://erdalpekel.de/?p=55) 問題:設定boundingObject仍出現撞到自己並且機械手臂會穿過其他物體,但其他物體不會穿過機器手臂? 解:沒有設定physics 問題:在Link_8設定mass出現像單擺的手臂並且兩隻手指移動超過幅度 ![](https://i.imgur.com/P7cg1uV.png) 解:直接在手掌部分加上boundingObject與physics設定,並外加上一個名稱為dummy的轉動馬達作為機械性連接 ![](https://i.imgur.com/gRkfrsi.png) 物理參數設定詳細位置:DEF joint7H HingeJoint>endPoint DEF hand Solid>physics Physics ![](https://i.imgur.com/JqrnTfT.png) [機器人學](/zK9UmyvLQK2t1-p_3eBfLg)學習中... ## 7/23 1. 從[RGB](https://drive.google.com/drive/folders/15iZfmm7wY_CEEJFuz0j-kE7CVQXdmnKG)更改,加上boundingObject與physics 2. [selfCollision](https://cyberbotics.com/doc/reference/robot)打勾 壓縮共享於雲端硬碟[RGB_withCollision](https://drive.google.com/drive/folders/15iZfmm7wY_CEEJFuz0j-kE7CVQXdmnKG) 單獨wbo檔案[Robot.wbo](https://drive.google.com/drive/folders/1cPiSG58RKu2_jDynbmXQsTjhGYZZm3hv) 問題: ![](https://i.imgur.com/G3a7TFD.png) 解: Add inertia matrices to the links ## 7/24 接續7/23inertia matrices問題,從[webots官網的physics](https://cyberbotics.com/doc/reference/physics)找到將inertiaMatrix打開後的兩組向量對應: 1. 第一組向量對應到principals moments of inertia 2. 第二組對應到products of inertia 因為[部落格](https://erdalpekel.de/?p=55)只將principals moments of inertia部分均設定為0.3,在此我們將第一組向量也都設為0.3 出現其他問題: ![](https://i.imgur.com/7u7My3s.png) 解:設定centerOfMass 不知道如何解決之問題: ![](https://i.imgur.com/wYaf9lH.png) ### position sensor ![](https://i.imgur.com/uVcpyJT.png) 命名規則positionSensor1, positionSensor2 <code>PSFunc.getValue(list)</code>:傳入PositionSensor的list,回傳該list內的各個postion sensor的position,[對應到官方文件對單一PositionSensor的<code>getValue</code>](https://cyberbotics.com/doc/reference/positionsensor?tab-language=python#positionsensor-functions) 取得位置資訊使用參考以下程式碼: ```python from ArmUtil import PSFunc psValue=PSFunc.getValue(positionSensorList) ``` ![](https://i.imgur.com/9GkaKlE.png) ## 7/27 1. paper報告剩餘實驗部分 2. 手臂Damping微調(dampingConstant 750改成200)能不出現微小震盪、增加夾爪的position sensor(楊鈞凱) > [RGB_withPhysics_ver2.0](https://drive.google.com/file/d/1wpVZ1o7ls27GtO297xZj1tpVVlbu_hdB/) ## 8/3 1. 加上touch sensor希望能在夾到東西後停止setPostion到更接近0的位置,以解決當夾起東西後出現夾爪受到被夾起物的重量而整個夾爪偏移中心。 * 目前能順利使用touchsensor,但是touchsensor僅測量受力的**變化**,因此只有一瞬間的受力,調整到最小的period也不一定每次的測得到。 2. Worldinfo增加其他夾爪與可樂瓶的material接觸反應,能在setPosition約0.03處夾起瓶子,無須直接setPostion到0 3. controller加上: * touchsensor於夾爪尖端 * 馬達的getForce * 夾爪馬達的getPosition後,根據目前Position再去增加移動的位置,取代暴力的setVelocity 最新世界+模型+controller連結:[RGB_withPhysics_ver.2.5](https://drive.google.com/file/d/1otpogVtj7BV28IuJ0XfgjFB0yWmsIbGx/view?usp=sharing) Contorller code: https://github.com/CT-Lab/IKcontrol ## 8/12 deepbots下載 pip install deepbots 後 檔案位置: C:\Users\kelvi\AppData\Local\Programs\Python\Python37\Lib\site-packages\deepbots 目前發現應該是solid 的getVelocity出錯出現NaN導致無法正常在webots 2020b跑