PX4 version: 1.12.0
git clone [<https://github.com/PX4/PX4-Autopilot.git>](<https://github.com/PX4/PX4-Autopilot.git>) --recursive
cd PX4-Autopilot
bash ./Tools/setup/ubuntu.sh
reboot
DONT_RUN=1 make px4_sitl_default gazebo
실행 방법1 ( 기존 HILs와 동일 )
cd ~/PX4-Autopilot
source Tools/setup_gazebo.bash $(pwd) $(pwd)/build/px4_sitl_default
roslaunch gazebo_ros empty_world.launch world_name:=$(pwd)/Tools/sitl_gazebo/worlds/empty.world
실행 방법2
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
새로운 Gazebo 맵(World)을 만들었을 경우. 'physics' 설정이 중요!
...
<physics name='default_physics' default='0' type='ode'>
<gravity>0 0 -9.8066</gravity>
<ode>
<solver>
<type>quick</type>
<iters>10</iters>
<sor>1.3</sor>
<use_dynamic_moi_rescaling>0</use_dynamic_moi_rescaling>
</solver>
<constraints>
<cfm>0</cfm>
<erp>0.2</erp>
<contact_max_correcting_vel>100</contact_max_correcting_vel>
<contact_surface_layer>0.001</contact_surface_layer>
</constraints>
</ode>
<max_step_size>0.004</max_step_size>
<real_time_factor>1</real_time_factor>
<real_time_update_rate>250</real_time_update_rate>
<magnetic_field>6.0e-6 2.3e-5 -4.2e-5</magnetic_field>
</physics>
...
새로운 맵 사용시 하단 수정 필요
PX4-Autopilot/launch/posix_sitl.launch 수정