iT邦幫忙

0

2個需要Matlab的Kinematics data

  • 分享至 

  • xImage
  •  

這兩邊都要Matlab 2019b以後的版本
(1)這篇看起來,著重在da Vinci PSM前端夾子jaw的咬合力,跟動作. 照它網頁寫的,在RAL-2018子目錄下的plot_torque.m可以先跑看看,會先調出之前的資料
https://ithelp.ithome.com.tw/upload/images/20230601/201572746BduG4AAs1.png

可是visulization下的檔案,在2018a無法跑.

(2)這篇提供自己的da Vinci kinematics data,取名為ROSMA dataset;不過dataset要另外下載(很慢,建議先下載一個就好)
然後執行roscore
然後執行Matlab, 在Matlab的GUI的命令列執行

cd ~/rosma_dataset/Matlab_GUI
run('gui_rosma') 

之後按Browse鈕選擇csv檔所在的地方,例如
https://ithelp.ithome.com.tw/upload/images/20230626/20157274Lu06JGeER8.png
https://ithelp.ithome.com.tw/upload/images/20230626/20157274uraUY8XflQ.png
https://ithelp.ithome.com.tw/upload/images/20230626/20157274LYY3SiMD0Q.png
https://ithelp.ithome.com.tw/upload/images/20230626/20157274MbpHJkoKrM.png
然後按Play三角形
Yes
就可以看到MTL跟PSM軌跡

-----
如果要在RViz看動作,似乎行不通

#拷貝一些設定檔,將rosma/config下的檔案copy到
cp ~/rosma_dataset/config/full_system.rviz ~/catkin_ws/src/dvrk-ros/dvrk_model/rviz_config
cp ~/rosma_dataset/config/dvrk_full_rviz.launch ~/catkin_ws/src/dvrk-ros/dvrk_robot/launch
cp ~/rosma_dataset/config/sawControllersPID-PSM_modified.xml ~/catkin_ws/src/cisst-saw/sawIntuitiveResearchKit/share

cp ~/catkin_ws/src/cisst-saw/sawIntuitiveResearchKit/share/tool/LARGE_NEEDLE_DRIVER_420006.json ~/catkin_ws/src/cisst-saw/sawIntuitiveResearchKit/share/psm-large-needle-driver.json #抓不到
cp ~/catkin_ws/src/cisst-saw/sawIntuitiveResearchKit/share/tool/sawControllersPID-MTMR.xml ~/catkin_ws/src/cisst-saw/sawIntuitiveResearchKit/share #抓不到
cp ~/catkin_ws/src/cisst-saw/sawIntuitiveResearchKit/share/tool/sawControllersPID-MTML.xml ~/catkin_ws/src/cisst-saw/sawIntuitiveResearchKit/share #抓不到
cp ~/catkin_ws/src/cisst-saw/sawIntuitiveResearchKit/share/kinematic/mtmr.json ~/catkin_ws/src/cisst-saw/sawIntuitiveResearchKit/share/mtm.json #抓不到

cp ~/rosma_dataset/config/full_teleop_SIMULATED.json ~/catkin_ws/src/cisst-saw/sawIntuitiveResearchKit/share/full_teleop_modified_SIMULATED.json #有錯

要先修改dvrk_full_rviz.launch檔案,

gedit ~/catkin_ws/src/dvrk-ros/dvrk_robot/launch/dvrk_full_rviz.launch

找到4個

node name="robot_state_publisher" pkg="robot_state_publisher" type="state_publisher"

其中type全部改為type="robot_state_publisher", 否則會出現"ERROR: cannot launch node of type [robot_state_publisher/state_publisher]: Cannot locate node of type [state_publisher] in package [robot_state_publisher]. Make sure file exists in package path and permission is set to executable (chmod +x)"

cd ~/catkin_ws
source devel/setup.bash
roslaunch dvrk_robot dvrk_full_rviz.launch slave1:=PSM1 slave2:=PSM2 master1:=MTMR master2:=MTML config:=/home/$(whoami)/catkin_ws/src/cisst-saw/sawIntuitiveResearchKit/share/full_teleop_modified_SIMULATED.json

可惜還是有問題,它沒有辦法PSM1, PSM2, MTML, MTMR分開, 因此無法連動上面Matlab的軌跡運動
https://ithelp.ithome.com.tw/upload/images/20230626/20157274aNBsR2RBpi.png
https://ithelp.ithome.com.tw/upload/images/20230626/20157274v9SkfCU8kX.png
https://ithelp.ithome.com.tw/upload/images/20230626/20157274FgS4vzFr7l.png
你可以看到連PSM跟MTM都連在一起/images/emoticon/emoticon06.gif

我把share/console/console-full-system-simulated.json拿來執行,它會叫出dVRK,但問題一樣

roslaunch dvrk_robot dvrk_full_rviz.launch slave1:=PSM1 slave2:=PSM2 master1:=MTMR master2:=MTML config:=/home/$(whoami)/catkin_ws/src/cisst-saw/sawIntuitiveResearchKit/share/console/console-full-system-simulated.json

https://ithelp.ithome.com.tw/upload/images/20230626/201572742a3vXjhIHp.png


圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言