15.6. Simulation 模擬
警告:不要在 TurtleBot3 的 SBC 端執行此節指令。 請在 remote PC 上按照此節步驟進行操作。
[Remote PC 端]
1. 增加 GAZEBO_MODEL_PATH 路徑
$ echo '# Add gazebo model path' >> ~/.bashrc
$ echo 'export GAZEBO_MODEL_PATH=$GAZEBO_MODEL_PATH:~/turtlebot3_ws/src/turtlebot3/turtlebot3_simulations/turtlebot3_gazebo/models' >> ~/.bashrc
$ source ~/.bashrc2. 在 Turtlebot3 world 地圖載入 TB3
$ export TURTLEBOT3_MODEL=${TB3_MODEL}
$ ros2 launch turtlebot3_gazebo turtlebot3_world.launch.py
3. 啟動 Cartographer
4. 執行 teleoperation node 節點
5. 儲存地圖

6. 載入TB3 模型然後以下指令啟動 Navigation2
點擊選單欄中的 “2D Pose Estimate” 按鈕,然後在地圖上指向 turtlebot3 的精確方位。
如果 TurtleBot3 靠近 costmap 或接近了 costmap 地圖,請點擊選單欄中的Navigation2 Goal 按鈕,然後在地圖上指向目標方位。

Last updated
Was this helpful?