Skip to content

Commit

Permalink
ros_gz documentation updates (gazebosim#508)
Browse files Browse the repository at this point in the history
* Documentation updates including updated bridge parameters, links to other ros_gz tutorials and note about the functionality only available in Rolling.

Signed-off-by: Carlos Agüero <[email protected]>
  • Loading branch information
caguero authored and azeey committed Jan 9, 2025
1 parent 79a6c71 commit 54a3d1c
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 11 deletions.
11 changes: 6 additions & 5 deletions harmonic/ros2_integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,15 @@ within this tag. Here's an example:

```xml
<launch>
<arg name="name" default="ros_gz_bridge" />
<arg name="config_file" default="" />
<arg name="bridge_name" />
<arg name="config_file" />
<arg name="container_name" default="ros_gz_container" />
<arg name="namespace" default="" />
<arg name="use_composition" default="True" />
<arg name="use_respawn" default="False" />
<arg name="log_level" default="info" />
<ros_gz_bridge
name="$(var name)"
<ros_gz_bridge
bridge_name="$(var bridge_name)"
config_file="$(var config_file)"
container_name="$(var container_name)"
namespace="$(var namespace)"
Expand All @@ -97,11 +97,12 @@ within this tag. Here's an example:
log_level="$(var log_level)">
</ros_gz_bridge>
</launch>

```

In this case the `<ros_gz_bridge>` parameters are read from the command line.
That's an option but not strictly necessary as you could decide to hardcode some
of the values.
of the values or not even use all the parameters.

## Publish key strokes to ROS

Expand Down
2 changes: 1 addition & 1 deletion harmonic/ros2_launch_gazebo.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ within this tag. Here's an example for launching Gazebo server:

In this case the `<gz_server>` parameters are read from the command line. That's
an option but not strictly necessary as you could decide to hardcode some of the
values.
values or not even use all the parameters.

### Python
Python launch files provide more low-level customization and logic compared to XML launch files.
Expand Down
13 changes: 13 additions & 0 deletions harmonic/ros2_overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ Please follow the [Install Gazebo and ROS document](ros_installation)
before starting this tutorial. A working installation of ROS 2 and Gazebo is
required to go further.

Important: Most of this functionality is only available in ROS 2 Rolling.
We'll backport it to ROS 2 Jazzy soon.

## Composition

If you inspect the parameters of the launch files mentioned in the next
Expand All @@ -41,3 +44,13 @@ launched with the `container_node_name` parameter matching the container name
including Gazebo and the bridge.

You can learn more about ROS composition in [this tutorial](https://docs.ros.org/en/galactic/Tutorials/Intermediate/Composition.html).

## What's next?

Here are the next follow-up tutorials that you can check to learn more about
Gazebo/ROS integration.

* [How to launch Gazebo from ROS 2](ros2_launch_gazebo).
* [How to use ROS 2 to interact with Gazebo](ros2_integration).
* [Example of using ROS 2 to load a model and interact with it in Gazebo](ros2_interop).
* [How to spawn a Gazebo model from ROS 2](ros2_spawn_model).
10 changes: 5 additions & 5 deletions harmonic/ros2_spawn_model.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ within this tag. Here's an example:
<launch>
<arg name="world" default="" />
<arg name="file" default="" />
<arg name="xml_string" default="" />
<arg name="model_string" default="" />
<arg name="topic" default="" />
<arg name="name" default="" />
<arg name="entity_name" default="" />
<arg name="allow_renaming" default="False" />
<arg name="x" default="" />
<arg name="y" default="" />
Expand All @@ -43,9 +43,9 @@ within this tag. Here's an example:
<gz_spawn_model
world="$(var world)"
file="$(var file)"
xml_string="$(var xml_string)"
model_string="$(var model_string)"
topic="$(var topic)"
name="$(var name)"
entity_name="$(var entity_name)"
allow_renaming="$(var allow_renaming)"
x="$(var x)"
y="$(var y)"
Expand All @@ -59,4 +59,4 @@ within this tag. Here's an example:

In this case the `<gz_spawn_model>` parameters are read from the command line.
That's an option but not strictly necessary as you could decide to hardcode some
of the values.
of the values or not even use all of the parameters.

0 comments on commit 54a3d1c

Please sign in to comment.