From 4bceb037e3bf7832ffc362a0e270241ef6dfe6ad Mon Sep 17 00:00:00 2001 From: Amronos <134804732+Amronos@users.noreply.github.com> Date: Mon, 2 Sep 2024 20:42:35 +0530 Subject: [PATCH] Update ros2_spawn_model.md Signed-off-by: Amronos <134804732+Amronos@users.noreply.github.com> --- harmonic/ros2_spawn_model.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/harmonic/ros2_spawn_model.md b/harmonic/ros2_spawn_model.md index 52040ed5e..611a75ad8 100644 --- a/harmonic/ros2_spawn_model.md +++ b/harmonic/ros2_spawn_model.md @@ -5,13 +5,14 @@ Additionally, it's possible to spawn new models at any time. To do so using ROS we have provided the following mechanisms: ## Spawn a model using the launch file included in `ros_gz_sim`. +*Currently only available in Rolling.* The package `ros_gz_sim` contains a launch file named `ros_gz_spawn_model.launch.py`. You can use it to spawn a new model into an existing simulation. Here's an example: ```bash -ros2 launch ros_gz_sim gz_spawn_model.launch.py 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 +ros2 launch ros_gz_sim ros_gz_spawn_model.launch.py 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 ``` Check [this block](https://github.com/gazebosim/ros_gz/blob/cadae1c8323a74395c09a37e3de4c669c8c09d4f/ros_gz_sim/launch/ros_gz_spawn_model.launch.py#L33-L44)