记录在Ubuntu16中安装ROS1的步骤:
- 增加源 在终端中输入命令:
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
- 增加 key 在终端中输入命令:
sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116
或者:
sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
- 下载安装ros 在终端中输入命令:
sudo apt-get update
sudo apt-get install ros-kinetic-desktop-full
- 初始化ros环境 在终端中输入命令:
sudo rosdep init如果操作过程中提示找不到
rosdep update
rosdep
命令,请先执行sudo apt install python-rosdep
- 配置bashrc 在终端中输入命令:
echo "source /opt/ros/kinetic/setup.bash" >> ~/.bashrc
source ~/.bashrc
- 测试运行 在终端中输入命令:
roscore如有下列打印表示安装成功:
~$ roscore
... logging to /home/xx/.ros/log/f70d7090-b356-11e9-a4ab-0800270ce2f3/roslaunch-pc-12185.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://pc:33197/
ros_comm version 1.12.14SUMMARY
========PARAMETERS
* /rosdistro: kinetic
* /rosversion: 1.12.14NODESauto-starting new master
process[master]: started with pid [12196]
ROS_MASTER_URI=http://pc:11311/setting /run_id to f70d7090-b356-11e9-a4ab-0800270ce2f3
process[rosout-1]: started with pid [12209]
started core service [/rosout]
其他
- 安装编译包依赖(看情况安装)
sudo apt-get install python-rosinstall python-rosinstall-generator python-wstool build-essential
sudo apt-get install ros-kinetic-robot-upstart
【ubuntu16.04安装ROS】基本命令参考:rosrun robot_upstart install --user root --setup /home/xx/ros_ws/install/setup.bash bringup_msgs/launch/bringup_start.launch --logdir /home/xx/logs参考:http://wiki.ros.org/kinetic/Installation/Ubuntu