@@ -4,7 +4,23 @@ Gazebo will spawn all the models included in the provided world file at startup.
44Additionally, it's possible to spawn new models at any time. To do so using ROS
55we have provided the following mechanisms:
66
7- ## Spawn a model using the launch file included in ` ros_gz_sim ` .
7+ :::{note}
8+ ** Gazebo Harmonic + ROS 2 Humble**
9+
10+ The ` gz_spawn_model.launch.py ` launch file is not available in this
11+ configuration. Models must be spawned using the ` create ` executable
12+ provided by ` ros_gz_sim ` .
13+ :::
14+
15+ ## Spawn a model using ` ros_gz_sim ` (Gazebo Harmonic + ROS 2 Humble)
16+
17+ Models must be spawned using the ` create ` executable provided by ` ros_gz_sim ` . Here's an example:
18+
19+ ``` bash
20+ ros2 run ros_gz_sim create --world empty --file $( ros2 pkg prefix --share ros_gz_sim_demos) /models/vehicle/model.sdf --name my_vehicle -x 5.0 -y 5.0 -z 0.5
21+ ```
22+
23+ ## Spawn a model using the launch file included in ` ros_gz_sim ` (ROS 2 Jazzy and later).
824
925The package ` ros_gz_sim ` contains a launch file named
1026` gz_spawn_model.launch.py ` . You can use it to spawn a new model into an
@@ -20,6 +36,8 @@ launch file.
2036
2137## Spawn a model from a custom launch file.
2238
39+ > ** Note:** This workflow is supported starting from ** ROS 2 Jazzy** .
40+
2341It's also possible to spawn the model from your custom launch file. For that
2442purpose we have created the ` <gz_spawn_model/> ` tag that can be used from you
2543XML or YAML launch file. In this case, the arguments are passed as attributes
@@ -63,6 +81,8 @@ of the values or not even use all of the parameters.
6381
6482## Spawning a model alongside launching ros_gz_bridge
6583
84+ > ** Note:** This workflow is supported starting from ** ROS 2 Jazzy** .
85+
6686An example launch file for XML can be viewed [ here] ( https://github.com/gazebosim/ros_gz/blob/jazzy/ros_gz_sim/launch/ros_gz_spawn_model.launch )
6787An example launch file for Python can be viewed [ here] ( https://github.com/gazebosim/ros_gz/blob/jazzy/ros_gz_sim/launch/ros_gz_spawn_model.launch.py )
6888
0 commit comments