ubuntu16.04安装turtlebot

  • 安装环境
    • turtlebot安装
    • 启动仿真环境
    • 键盘控制
    • 运行rviz

安装环境

  • Ubuntu16.04
  • ROS -kinetic

turtlebot安装

$ sudo apt-get install ros-kinetic-turtlebot*

启动仿真环境

$ roslaunch turtlebot_gazebo turtlebot_world.launch

ubuntu16.04安装turtlebot_第1张图片

错误:*Invalid tag: environment variable ‘TURTLEBOT_GAZEBO_WORLD_FILE’ is not set. Arg xml is arg default=”$(env TURTLEBOT_GAZEBO_WORLD_FILE)” name=”world_file”The traceback for the exception was written to the log file.

解决方法:重新配置环境

(1)初始化rosdep

$ sudo rosdep init
$ rosdep update

(2)环境设置

$ echo "source /opt/ros/kinetic/setup.bash" >> ~/.bashrc
$ source ~/.bashrc

成功之后的界面:

ubuntu16.04安装turtlebot_第2张图片

键盘控制

打开一个新终端:

$ roslaunch turtlebot_teleop keyboard_teleop.launch

ubuntu16.04安装turtlebot_第3张图片

注意:只能在终端界面用键盘控制turtlebot移动,无法在Gazebo界面控制.

运行rviz

打开一个新终端:

$ roslaunch turtlebot_rviz_launchers view_robot.launch

ubuntu16.04安装turtlebot_第4张图片

你可能感兴趣的:(ubuntu16.04安装turtlebot)