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 apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116
sudo apt-get update安装桌面完整版
sudo apt-get install ros-indigo-desktop-full
sudo rosdep init rosdep update
为了每次打开一个新的shell后会自动加载有关ROS的系统环境变量,执行如下命令
echo "source /opt/ros/indigo/setup.bash" >> ~/.bashrc source ~/.bashrc
若仅需要对当前shell进行有关ROS的操作可直接执行
source /opt/ros/indigo/setup.bash
按照上述步骤操作后,打开一个新的shell,执行如下命令
roscore
若配置正确则会显示类似下列的信息
xxf@ubuntu:~$ roscore ... logging to /home/xxf/.ros/log/b39cb778-8d95-11e7-95aa-0050562fc680/roslaunch-ubuntu-6049.log Checking log directory for disk usage. This may take awhile. Press Ctrl-C to interrupt Done checking log file disk usage. Usage is <1GB. started roslaunch server http://ubuntu:46369/ ros_comm version 1.11.20 SUMMARY ======== PARAMETERS * /rosdistro: indigo * /rosversion: 1.11.20 NODES auto-starting new master process[master]: started with pid [6061] ROS_MASTER_URI=http://ubuntu:11311/ setting /run_id to b39cb778-8d95-11e7-95aa-0050562fc680 process[rosout-1]: started with pid [6085] started core service [/rosout]