需求
可以连接互联网的电脑,并且可以运行ubuntu 16.04LTS系统。
1. 在设置中添加阿里云镜像
阿里云镜像以鼠标点击的形式完成,请按照下面的顺序依次点击
- System Setting
- Software & Updates
- Download from
- other…
- China
- mirrors.aliyun.com
- choose server
- close
2. 添加ROS镜像
三选一(国内建议选择清华大学)
官方
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
中国科技大学
sudo sh -c '. /etc/lsb-release && echo "deb http://mirrors.ustc.edu.cn/ros/ubuntu/ $DISTRIB_CODENAME main" > /etc/apt/sources.list.d/ros-latest.list'
清华大学
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'
3. 添加密钥
sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
4. 安装ROS
sudo apt-get update
sudo apt-get install ros-kinetic-desktop-full
###初始化rosdep
sudo rosdep init
rosdep update
5. 设置环境
echo "source /opt/ros/kinetic/setup.bash" >> ~/.bashrc
source ~/.bashrc
6. 添加构建包的依赖
sudo apt install python-rosinstall python-rosinstall-generator python-wstool build-essential
7. 测试
新建终端
roscore
新建终端
rosrun turtlesim turtlesim_node