1、查看Gazebo的安装位置:
which gzserver
which gzclient
2、安装gazebo_ros_pkgs(命令)
//ROS Lunar:
sudo apt-get install ros-lunar-gazebo-ros-pkgs ros-lunar-gazebo-ros-control
//ROS Kinetic:
sudo apt-get install ros-kinetic-gazebo-ros-pkgs ros-kinetic-gazebo-ros-control
//ROS Indigo:
sudo apt-get install ros-indigo-gazebo-ros-pkgs ros-indigo-gazebo-ros-control
3、添加工作空间到.bashrc
echo "source ~/catkin_ws/devel/setup.bash" >> ~/.bashrc
4、使用Install from Source (on Ubuntu) 安装gazebo_ros_pkgs
#ROS Kinetic
//Kinetic is using the gazebo 7.x series, start by installing it:
1、sudo apt-get install -y libgazebo7-dev
//Download the source code from the gazebo_ros_pkgs github repository:
2、cd ~/catkin_ws/src
3、git clone https://github.com/ros-simulation/gazebo_ros_pkgs.git -b kinetic-devel
//Check for any missing dependencies using rosdep:
4、rosdep update
5、rosdep check --from-paths . --ignore-src --rosdistro kinetic
//You can automatically install the missing dependencies using rosdep via debian
install:
rosdep install --from-paths . --ignore-src --rosdistro kinetic -y
//Now jump to the build the gazebo_ros_pkgs section.