mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
- new modules/simulation directory to collect all simulators and related modules - new Tools/simulation directory to collect and organize scattered simulation submodules, scripts, etc - simulation module renamed to simulator_mavlink - sih renamed to simulator_sih (not a great name, but I wanted to be clear it was a simulator) - ignition_simulator renamed to simulator_ignition_bridge - large sitl_target.cmake split by simulation option and in some cases pushed to appropriate modules - sitl targets broken down to what's actually available (eg jmavsim only has 1 model and 1 world) - new Gazebo consistently referred to as Ignition for now (probably the least confusing thing until we fully drop Gazebo classic support someday)
45 lines
2.0 KiB
XML
45 lines
2.0 KiB
XML
<?xml version="1.0"?>
|
|
<launch>
|
|
<!-- Posix SITL environment launch script -->
|
|
<!-- launches PX4 SITL, Gazebo environment, and spawns vehicle -->
|
|
<!-- vehicle pose -->
|
|
<arg name="x" default="0"/>
|
|
<arg name="y" default="0"/>
|
|
<arg name="z" default="0"/>
|
|
<arg name="R" default="0"/>
|
|
<arg name="P" default="0"/>
|
|
<arg name="Y" default="0"/>
|
|
<!-- vehicle model and world -->
|
|
<arg name="est" default="ekf2"/>
|
|
<arg name="vehicle" default="iris"/>
|
|
<arg name="world" default="$(find mavlink_sitl_gazebo)/worlds/empty.world"/>
|
|
<arg name="sdf" default="$(find mavlink_sitl_gazebo)/models/$(arg vehicle)/$(arg vehicle).sdf"/>
|
|
<env name="PX4_SIM_MODEL" value="$(arg vehicle)" />
|
|
|
|
<!-- gazebo configs -->
|
|
<arg name="gui" default="true"/>
|
|
<arg name="debug" default="false"/>
|
|
<arg name="verbose" default="false"/>
|
|
<arg name="paused" default="false"/>
|
|
<arg name="respawn_gazebo" default="false"/>
|
|
<!-- PX4 configs -->
|
|
<arg name="interactive" default="true"/>
|
|
<!-- PX4 SITL -->
|
|
<arg unless="$(arg interactive)" name="px4_command_arg1" value="-d"/>
|
|
<arg if="$(arg interactive)" name="px4_command_arg1" value=""/>
|
|
<node name="sitl" pkg="px4" type="px4" output="screen"
|
|
args="$(find px4)/build/px4_sitl_default/etc -s etc/init.d-posix/rcS $(arg px4_command_arg1)" required="true"/>
|
|
|
|
<!-- Gazebo sim -->
|
|
<include file="$(find gazebo_ros)/launch/empty_world.launch">
|
|
<arg name="gui" value="$(arg gui)"/>
|
|
<arg name="world_name" value="$(arg world)"/>
|
|
<arg name="debug" value="$(arg debug)"/>
|
|
<arg name="verbose" value="$(arg verbose)"/>
|
|
<arg name="paused" value="$(arg paused)"/>
|
|
<arg name="respawn_gazebo" value="$(arg respawn_gazebo)"/>
|
|
</include>
|
|
<!-- gazebo model -->
|
|
<node name="$(anon vehicle_spawn)" pkg="gazebo_ros" type="spawn_model" output="screen" args="-sdf -file $(arg sdf) -model $(arg vehicle) -x $(arg x) -y $(arg y) -z $(arg z) -R $(arg R) -P $(arg P) -Y $(arg Y)"/>
|
|
</launch>
|