Skip to content

Commit

Permalink
Update ros2_spawn_model.md (#492)
Browse files Browse the repository at this point in the history
Signed-off-by: Amronos <[email protected]>
  • Loading branch information
Amronos authored Sep 3, 2024
1 parent 2f7e141 commit 511d395
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion harmonic/ros2_spawn_model.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 511d395

Please sign in to comment.