環境
ubuntu 16.04
安裝步驟
1.添加下載源
親測清華大學的這個鏡像源可用
sudo sh -c '. /etc/lsb-release && echo "deb http://mirrors.tuna.tsinghua.edu.cn/ros/ubuntu/ $DISTRIB_CODENAME main" > /etc/apt/sources.list.d/ros-latest.list'
2.設置公鑰(一般系統均已設置)、更新下載源
sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654 sudo apt-get update
3.安裝完整版
完整版包含:ROS, rqt, rviz, robot-generic libraries, 2D/3D simulators, navigation and 2D/3D perception
sudo apt-get install ros-indigo-desktop-full
ROS環境配置
1.使用 rosdep 來安裝ROS編譯、運行所需的依賴源
rosdep工具就是用來檢查包的丟失依賴項,並且完成下載和安裝
sudo rosdep init rosdep update
2.環境變量設置
通過運行 opt/ros/kinetic/setup.sh
# 將設置寫到開機啟動中 echo "source /opt/ros/kinetic/setup.bash" >> ~/.bashrc # 使設置立即生效 source ~/.bashrc
當然你也可以每次使用時執行
source /opt/ros/kinetic/setup.bash
3. packages包編譯依賴
sudo apt install python-rosinstall python-rosinstall-generator python-wstool build-essential
