装dVRK(一)

达文西手术很早就开源以供研究了,但愈来愈多paper,很多都是以他为基础架设上去,所以我才尝试装看看

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

我刚开始装Ubuntu 20.04版时,犯了一个低级错误,按到升级,允许它升级到22.04版,结果就GG了. ROS 1始终装不起来,后来索性改装ROS 2,虽然装ROS 2很顺畅,但换成dVRK装不起来,http://img2.58codes.com/2024/emoticon20.gif爬文用source安装也装不起来,浪费了2天.http://img2.58codes.com/2024/emoticon02.gif
之后放弃,重装Ubuntu 20.04, 之后安装就可以一路下去就可以了

所以Ubuntu要乖乖的装20.04版,不要升级,而且记得去关掉他自动升级

Ubuntu20.04中文键盘的需要自己手动更改,我是参考这个网页去装的

之后装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' #来源跟keysudo apt install curl # if you haven't already installed curlcurl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -sudo apt updatesudo apt install ros-noetic-desktop-full  #安装echo "source /opt/ros/noetic/setup.bash" >> ~/.bashrc #更改环境变数source ~/.bashrcsudo apt install python3-rosdep python3-rosinstall python3-rosinstall-generator python3-wstool build-essential  #加装其他必须套件sudo apt install python3-rosdep  #初始化sudo rosdep initrosdep update

当安装完ROS 1之后,其实会自动装好Rvis,gazebo.但MoveIt好像要自己装.

然后乖乖从这网页的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 workspacecd ~/catkin_ws                     # go in the workspacewstool init src                    # we're going to use wstool to pull all the code from githubcatkin init                        # create files for catkin build toolcatkin config --cmake-args -DCMAKE_BUILD_TYPE=Release # all code should be compiled in release modecd src                             # go in source directory to pull codewstool merge https://raw.githubusercontent.com/jhu-dvrk/dvrk-ros/master/dvrk_ros.rosinstall # or replace master by develwstool up                          # now wstool knows which repositories to pull, let's get the codecatkin build --summary             # ... and finally compile everything

之后修改环境变数

gedit ~/.bashrc

插入下面这段

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

就可以看到
http://img2.58codes.com/2024/20157274bivsn3UUGR.png
...好吧,全亚洲只有香港中文大学,跟韩国首尔大学有dVRK硬体,来连接达文西初代机,所以执行结果连接全部disable,但软体似乎很好安装

(后记,原来储存草稿不可以关网页,打了一堆都不见了,重打)


关于作者: 网站小编

码农网专注IT技术教程资源分享平台,学习资源下载网站,58码农网包含计算机技术、网站程序源码下载、编程技术论坛、互联网资源下载等产品服务,提供原创、优质、完整内容的专业码农交流分享平台。

热门文章