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