学习完 ROS Wiki 的基础教程后,我下一步选择学习 PR2 模拟器:
http://wiki.ros.org/pr2_simulator/Tutorials
于是就按照官网找到这个教程,但是要先安装 PR2 和 gazebo_ros 包才可以,这里记录下自己的安装过程和踩过的坑。
一、安装 gazebo_ros_pkgs
运行教程中的第一行命令:
$ roslaunch gazebo_ros empty_world.launch
[empty_world.launch] is neither a launch file in package [gazebo_ros] nor is [gazebo_ros] a launch file name
The traceback for the exception was written to the log file
这个原因是 gazebo_ros_pkgs 未安装,那就按照 gazebo 给的安装教程来安装它:
sudo apt-get install ros-kinetic-gazebo-ros-pkgs ros-kinetic-gazebo-ros-control
可是期间出现了依赖问题,我就换 Aptitude 安装来自动安装依赖关系:
sudo apt install aptitude
然后重新安装 gazebo-ros 包:
sudo aptitude install ros-kinetic-gazeb