SITL 시뮬레이션 설정

SITL(Software-In-the-Loop) 시뮬레이션은 비행 스택이 컴퓨터(동일한 컴퓨터 또는 동일한 네트워크의 다른 컴퓨터)에서 실행되는 시뮬레이션이다. 오직 컴퓨터만으로 시뮬레이션을 실행한다.

가제보 시뮬레이션 시작방법

ROS with Gazebo Simulation | PX4 User Guide

가제보 추가 사용 설명

Gazebo Simulation | PX4 User Guide

실행방법

빌드

cd ~/PX4-Autopilot
DONT_RUN=1 make px4_sitl_default gazebo

실행방법

cd ~/PX4-Autopilot
source Tools/setup_gazebo.bash $(pwd) $(pwd)/build/px4_sitl_default
export ROS_PACKAGE_PATH=$ROS_PACKAGE_PATH:$(pwd)
export ROS_PACKAGE_PATH=$ROS_PACKAGE_PATH:$(pwd)/Tools/sitl_gazebo

roslaunch px4 posix_sitl.launch
# 다른 기체로 실행하고 싶은 경우,(default는 iris이다. (작은 쿼드로터))
roslaunch px4 posix_sitl.launch vehicle:=standard_vtol

모델의 위치: PX4-Autopilot/Tools/sitl_gazebo/models 안에 있음

이렇게 하면 가제보가 실행되고 기체가 생성된다. QGroundControl을 실행하면 자동으로 연결될 것이다. 여기에 mavros를 연결해서 제어하면 된다. mavros는 다른 페이지서 설명할 것.

Error

추가 내용