Turtlebot3仿真1-ROS仿真环境搭建(kinetic版)

本文最后更新于:2022年5月29日 上午

前言

操作步骤

安装仿真系统依赖包

1
sudo apt-get install -y ros-kinetic-navigation ros-kinetic-teb-local-planner* ros-kinetic-ros-control ros-kinetic-ros-controllers ros-kinetic-gazebo-ros-control ros-kinetic-ackermann-msgs ros-kinetic-serial qt4-default ros-kinetic-effort-controllers ros-kinetic-joint-state-controller ros-kinetic-tf2-ros ros-kinetic-tf

Turtlebot3包安装

  • 安装turtlebot3依赖包:

    1
    sudo apt-get install ros-kinetic-joy ros-kinetic-teleop-twist-joy ros-kinetic-teleop-twist-keyboard ros-kinetic-laser-proc ros-kinetic-rgbd-launch ros-kinetic-depthimage-to-laserscan ros-kinetic-rosserial-arduino ros-kinetic-rosserial-python ros-kinetic-rosserial-server ros-kinetic-rosserial-client ros-kinetic-rosserial-msgs ros-kinetic-amcl ros-kinetic-map-server ros-kinetic-move-base ros-kinetic-urdf ros-kinetic-xacro ros-kinetic-compressed-image-transport ros-kinetic-rqt-image-view ros-kinetic-gmapping ros-kinetic-navigation ros-kinetic-interactive-markers
  • 安装turtlebot3源码:

    1
    2
    3
    4
    mkdir -p ~/tb3_ws/src/ && cd ~/tb3_ws/src/
    git clone https://github.com/ROBOTIS-GIT/turtlebot3_msgs.git
    git clone https://github.com/ROBOTIS-GIT/turtlebot3.git
    cd ~/tb3_ws && catkin_make
  • 添加模型声明

    1
    2
    echo "export TURTLEBOT3_MODEL=burger" >> ~/.bashrc
    ## TURTLEBOT3_MODEL有burger, waffle或waffle_pi三种
  • 环境设置

    1
    echo "source ~/tb3_ws/devel/setup.bash" >> ~/.bashrc

安装turtlebot3_simulation包

1
2
3
cd ~/tb3_ws/src/
git clone https://github.com/ROBOTIS-GIT/turtlebot3_simulations.git
cd ~/tb3_ws && catkin_make

安装完成测试

  • 启动仿真:

    1
    roslaunch turtlebot3_fake turtlebot3_fake.launch
  • 启动键盘控制

    1
    roslaunch turtlebot3_teleop turtlebot3_teleop_key.launch

不出意外的话,你会看到类似下图的界面,可以通过键盘控制小车运动。

wMjdQs.png


Turtlebot3仿真1-ROS仿真环境搭建(kinetic版)
https://kevinloongc.github.io/posts/26186.html
作者
Kevin Loongc
发布于
2020年9月8日
许可协议