프로그래밍/dronekit
[simulation] dronekit gazebo simulation (SITL)
Se-chan Oh
2022. 8. 30. 12:53
1. 작업환경
OS : Ubuntu 20.04 LTS
Software : ROS noetic, dronekit
2. 시뮬레이션 환경 구축
installing ardupilot : https://github.com/Intelligent-Quads/iq_tutorials/blob/master/docs/Installing_Ardupilot_20_04.md
Installing Gazebo and ArduPilot Plugin : https://github.com/Intelligent-Quads/iq_tutorials/blob/master/docs/installing_gazebo_arduplugin.md
3. 시뮬레이션 실행
#첫번째 터미널에서 gazebo를 실행
gazebo --verbose worlds/iris_arducopter_runway.world
#두번째 터미널에서 mavproxy 실행
cd ~/ardupilot/ArduCopter
../Tools/autotest/sim_vehicle.py -f gazebo-iris --console --map
#세번째 터미널에서 dronekit 코드를 실행(127.0.0.1:5762로 연결)
python3 takeoff.py
참고: ardupilot 공식 문서에는 Ubuntu 16.04와 18.04 환경에서의 gazebo simulation만을 소개하고 있으므로 이 블로그에서 소개하는 방법을 따르는 것을 추천한다.
https://ardupilot.org/dev/docs/using-gazebo-simulator-with-sitl.html