Ubuntu 16.04(Kinect)配置ROS,亲测!!
1.准备条件
1.1.已下载虚拟机以及ubuntu16.04镜像文件
1.2.ROS对应16.04(Kinect)版本
2.安装步骤(内附常见问题解决方案)
2.1更新源
2.1.1如图,将系统更新为清华源(国内源)
2.1.2输入指令:
sudo sh -c '. /etc/lsb-release && echo "deb http://mirrors.tuna.tsinghua.edu.cn/ros/ubuntu/ `lsb_release -cs` main" > /etc/apt/sources.list.d/ros-latest.list'
2.2设置密钥
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 -
操作过程截图:
2.3更新package
sudo apt-get update
It’s convenient if the ROS environment variables are automatically added to your bash session every time a new shell is launched(接着运行这两个指令):
echo "source /opt/ros/kinetic/setup.bash" >> ~/.bashrc
source ~/.bashrc
2.4安装ROS完整版
耐心等待zzz(Kinect版本ROS)
sudo apt-get install ros-kinetic-desktop-full
2.5初始化rosdep
sudo rosdep init
这一步的正确结果:
错误结果(解决方案见下方链接):
可移步古月居老父亲的解决方案,基本可以解决初始化的问题:
古月居rosdep init ROS安装问题解决的方案
rosdep update
若得到响应时间过长等error:
古月居rosdep update time out解决方案
2.6测试ROS是否安装成功
输入指令,启动ROS:
roscore
“Ctrl+Alt+T”新开终端,输入指令,启动小乌龟(TAB键补全指令)
rosrun turtlesim turtlesim_node
出现如下图的小乌龟时说明ROS安装成功:
【附】ROS官网安装步骤链接