13.6. 以 Gazebo 模擬器來模擬 AutoRace 挑戰賽

此 AutoRace 挑戰賽是用 Gazebo 模擬器模擬。我們在 R-BIZ Challenge 中創建了TurtleBot3 AutoRace 2017 比賽環境。

  • 建議使用電腦規格

    • CPU : Intel Core i5 / 2 GHz Dual Core Processor

    • RAM : 4GB

    • 硬碟 : 最少 20GB 可用空間

    • GPU : NVIDIA GeForce GTX 9 series

警示:不要混淆您的真實相機校準配置文件和 Gazebo 上的校準配置文件。

備註:turtlebot3_autorace 套件需要事先安裝好 turtlebot3_simulations 套件作為先決條件。請先安裝它。

1. [Remote PC 端] 執行 AutoRace Gazebo。你會在 Gazebo 模擬器看到 AutoRace 2017 地圖,如下。

 $ roslaunch turtlebot3_gazebo turtlebot3_autorace.launch

2. [Remote PC 端] 執行 Mission launch 指令。你可在 Gazebo 內看到 Traffic Light,Parked TurtleBot3,及 Toll Gate。當 TB3 接近任務區域時,它們會自動啟動。

 $ roslaunch turtlebot3_gazebo turtlebot3_autorace_mission.launch

3. [Remote PC 端] 執行 AutoRace launch。如果要實際運行 AutoRace,則必須校準相機。

 $ export GAZEBO_MODE=true
 $ export AUTO_IN_CALIB=action
 $ roslaunch turtlebot3_autorace_camera turtlebot3_autorace_intrinsic_camera_calibration.launch

4. [Remote PC 端] 開新的 terminal 視窗,輸入

 $ export AUTO_EX_CALIB=action
 $ export AUTO_DT_CALIB=action
 $ export TURTLEBOT3_MODEL=burger
 $ roslaunch turtlebot3_autorace_core turtlebot3_autorace_core.launch

5. [Remote PC 端] 開新的 terminal 視窗,輸入

 $ rostopic pub -1 /core/decided_mode std_msgs/UInt8 "data: 2"

Last updated