安装日期:2019-10-10
ROS版本:ROS Kinetic Kame
Ubuntu版本:Ubuntu 16.04.6 LTS,(
lsb_release -a
)ROS源:Tsinghua University
Python版本:Python 2.7.12
CMake 版本:3.5.1
一键安装脚本
1 |
curl https://gitee.com/askeynil/AskConfiguration/raw/master/ros.sh | bash |
一些常用的 Ubuntu 自动化脚本:
手动安装方式
来源:ros 安装官方教程
更新 Ubuntu 为 Tsinghua 源
来源: Tsinghua 源
- 备份原有源文件
1 |
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak |
将 sources.list 备份一份为sources.list.bak
- 将以下文件覆盖
sources.list
里面的内容
1 |
# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释 |
- 更新源
1 |
sudo apt update |
添加 ros 源
- 添加 Tsinghua 的 ROS 源
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' |
- 设置秘钥
1 |
sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654 |
- 更新源
1 |
sudo apt update |
安装 ros
1 |
sudo apt install ros-kinetic-desktop-full |
初始化 rosdep
1 |
sudo rosdep init |
添加环境配置
如果使用 bash,则
1 |
echo "source /opt/ros/kinetic/setup.bash" >> ~/.bashrc |
如果使用 zsh,则
1 |
echo "source /opt/ros/kinetic/setup.zsh" >> ~/.zshrc |
构建工厂依赖
1 |
sudo apt install python-rosinstall python-rosinstall-generator python-wstool build-essential |