1 如果安装的是ros-kinetic-full-desktop那么应该自带gazebo7.如果不是则需要手动安装,链接如下:http://gazebosim.org/tutorials?tut=install_ubuntu&cat=install
2 安装ros与gazebo的接口:建议源码编译。http://gazebosim.org/tutorials?tut=ros_installing&cat=connect_ros
mkdir -p ~/catkin_ws/src
cd ~/catkin_ws/src
catkin_init_workspace
cd ~/catkin_ws
catkin_make
echo "source ~/catkin_ws/devel/setup.bash" >> ~/.bashrc
cd ~/catkin_ws/src
git clone https://github.com/ros-simulation/gazebo_ros_pkgs.git -b kinetic-devel
rosdep update
rosdep check --from-paths . --ignore-src --rosdistro kinetic
rosdep install --from-paths . --ignore-src --rosdistro kinetic -y
cd ~/catkin_ws/
catkin_make
3 安装turtlebot的功能包:sudo apt-get install turtlebot-*
4 测试用ros启动gazebo:roslaunch gazebo_ros empty_world.launch出现一个空白世界就对了,耐心等着加载地图
5运行turtlebot的gazebo仿真: roslaunch turtlebot_gazebo turtlebot_world.launch ,应该出现有个带有机器人和简单几个障碍物的世界空间。
6 打开rviz,固定坐标系选择base_link,add激光和相机插件,即可观测到仿真的传感器数据。