iT邦幫忙

1

裝dVRK(一)

  • 分享至 

  • xImage
  •  
  1. 達文西手術很早就開源以供研究了,但愈來愈多paper,很多都是以他為基礎架設上去,所以我才嘗試裝看看

我是整個硬碟裝Ubuntu,如果要分割裝Windows+Linux,可能要再爬文.

我剛開始裝Ubuntu 20.04版時,犯了一個低級錯誤,按到升級,允許它升級到22.04版,結果就GG了. ROS 1始終裝不起來,後來索性改裝ROS 2,雖然裝ROS 2很順暢,但換成dVRK裝不起來,/images/emoticon/emoticon20.gif爬文用source安裝也裝不起來,浪費了2天./images/emoticon/emoticon02.gif
之後放棄,重裝Ubuntu 20.04, 之後安裝就可以一路下去就可以了

  1. 所以Ubuntu要乖乖的裝20.04版,不要升級,而且記得去關掉他自動升級

  2. Ubuntu20.04中文鍵盤的需要自己手動更改,我是參考這個網頁去裝的

  3. 之後裝ROS 1的Noetic

sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list' #來源跟key
sudo apt install curl # if you haven't already installed curl
curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -

sudo apt update
sudo apt install ros-noetic-desktop-full  #安裝

echo "source /opt/ros/noetic/setup.bash" >> ~/.bashrc #更改環境變數
source ~/.bashrc

sudo apt install python3-rosdep python3-rosinstall python3-rosinstall-generator python3-wstool build-essential  #加裝其他必須套件

sudo apt install python3-rosdep  #初始化
sudo rosdep init
rosdep update

當安裝完ROS 1之後,其實會自動裝好Rvis,gazebo.但MoveIt好像要自己裝.

  1. 然後乖乖從這網頁的Debian packages到Environment variables一步步copy & past,就可以裝好dVRK了
sudo apt install libxml2-dev libraw1394-dev libncurses5-dev qtcreator swig sox espeak cmake-curses-gui cmake-qt-gui git subversion gfortran libcppunit-dev libqt5xmlpatterns5-dev libbluetooth-dev python3-wstool python3-catkin-tools python3-osrf-pycommon #裝其他必須套件
sudo apt install clang

#以下為安裝
source /opt/ros/noetic/setup.bash # or use whatever version of ROS is installed!
mkdir ~/catkin_ws                  # create the catkin workspace
cd ~/catkin_ws                     # go in the workspace
wstool init src                    # we're going to use wstool to pull all the code from github
catkin init                        # create files for catkin build tool
catkin config --cmake-args -DCMAKE_BUILD_TYPE=Release # all code should be compiled in release mode
cd src                             # go in source directory to pull code
wstool merge https://raw.githubusercontent.com/jhu-dvrk/dvrk-ros/master/dvrk_ros.rosinstall # or replace master by devel
wstool up                          # now wstool knows which repositories to pull, let's get the code
catkin build --summary             # ... and finally compile everything

之後修改環境變數

gedit ~/.bashrc

插入下面這段

# for ROS
if [ -f ~/catkin_ws/devel/setup.bash ]; then
  . ~/catkin_ws/devel/setup.bash
fi
# for cisst (optional)
if [ -f ~/catkin_ws/devel/cisstvars.sh ]; then
  . ~/catkin_ws/devel/cisstvars.sh
fi
  1. 然後就可以執行~/catkin_ws/devel/bin/下面的程式,例如
~/catkin_ws/devel/bin/sawIntuitiveResearchKitQtConsoleJSON -j ~/catkin_ws/src/cisst-saw/sawIntuitiveResearchKit/share/console/console-full-system-simulated.json

就可以看到
https://ithelp.ithome.com.tw/upload/images/20230404/20157274bivsn3UUGR.png
...好吧,全亞洲只有香港中文大學,跟韓國首爾大學有dVRK硬體,來連接達文西初代機,所以執行結果連接全部disable,但軟體似乎很好安裝

(後記,原來儲存草稿不可以關網頁,打了一堆都不見了,重打)


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

尚未有邦友留言

立即登入留言