我是整個硬碟裝Ubuntu,如果要分割裝Windows+Linux,可能要再爬文.
我剛開始裝Ubuntu 20.04版時,犯了一個低級錯誤,按到升級,允許它升級到22.04版,結果就GG了. ROS 1始終裝不起來,後來索性改裝ROS 2,雖然裝ROS 2很順暢,但換成dVRK裝不起來,爬文用source安裝也裝不起來,浪費了2天.
之後放棄,重裝Ubuntu 20.04, 之後安裝就可以一路下去就可以了
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好像要自己裝.
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
~/catkin_ws/devel/bin/sawIntuitiveResearchKitQtConsoleJSON -j ~/catkin_ws/src/cisst-saw/sawIntuitiveResearchKit/share/console/console-full-system-simulated.json
就可以看到
...好吧,全亞洲只有香港中文大學,跟韓國首爾大學有dVRK硬體,來連接達文西初代機,所以執行結果連接全部disable,但軟體似乎很好安裝
(後記,原來儲存草稿不可以關網頁,打了一堆都不見了,重打)