1. TurtleBot3环境配置
# 下载TurtleBot3核心包
mkdir -p ~/catkin_ws/src
cd ~/catkin_ws/src
git clone -b noetic-devel https://github.com/ROBOTIS-GIT/turtlebot3.git
git clone -b noetic https://github.com/ROBOTIS-GIT/turtlebot3_msgs.git
git clone -b noetic-devel https://github.com/ROBOTIS-GIT/turtlebot3_simulations.git# 构建环境
cd ~/catkin_ws
catkin_make
echo "source ~/catkin_ws/devel/setup.bash" >> ~/.bashrc
# 设置默认机型(burger/waffle/waffle_pi)
echo "export TURTLEBOT3_MODEL=waffle_pi" >> ~/.bashrc
source ~/.bashrc
- waffle_pi
- waffle
- burger
2. 启动Gazebo仿真
# 使用空白环境仅加载机器人
roslaunch turtlebot3_gazebo turtlebot3_empty_world.launch
# 使用默认预置环境
roslaunch turtlebot3_gazebo turtlebot3_world.launch
# 房屋环境(首次需下载200M模型)
roslaunch turtlebot3_gazebo turtlebot3_house.launch
- 空白环境
- 默认预置环
- 房屋环境
3. 控制
# 先加载环境及Turtlebot
roslaunch turtlebot3_gazebo turtlebot3_house.launch # 再启动新终端
# 使用WASD控制移动,空格急停
roslaunch turtlebot3_teleop turtlebot3_teleop_key.launch
# 启动自主避障节点
roslaunch turtlebot3_gazebo turtlebot3_simulation.launch