Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ros_gz documentation updates #508

Merged
merged 4 commits into from
Sep 11, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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="world_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)"
world_string="$(var world_string)"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just realized this change was merged recently, but I don't think it makes sense to call this world_string since this is being used to spawn a model. Mind changing this to model_string here and in ros_gz?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated in ab674e3 and gazebosim/ros_gz#605

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.
Loading