Skip to content

Commit

Permalink
Switch to Jazzy
Browse files Browse the repository at this point in the history
Signed-off-by: Aarav Gupta <[email protected]>
  • Loading branch information
Amronos committed Sep 17, 2024
1 parent 1eb1c1a commit 4bfec28
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 18 deletions.
14 changes: 7 additions & 7 deletions harmonic/ros2_integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ simulatenously simulated by a Gazebo world.

## ros_gz_bridge

[`ros_gz_bridge`](https://github.com/gazebosim/ros_gz) provides a network bridge which enables the exchange of messages between ROS 2 and [Gazebo Transport](https://github.com/gazebosim/gz-transport). Its support is limited to only certain message types. Please, check this [README](https://github.com/gazebosim/ros_gz/blob/ros2/ros_gz_bridge/README.md) to verify if your message type is supported by the bridge.
[`ros_gz_bridge`](https://github.com/gazebosim/ros_gz) provides a network bridge which enables the exchange of messages between ROS 2 and [Gazebo Transport](https://github.com/gazebosim/gz-transport). Its support is limited to only certain message types. Please, check this [README](https://github.com/gazebosim/ros_gz/blob/jazzy/ros_gz_bridge/README.md) to verify if your message type is supported by the bridge.

Example uses of the bridge can be found in [`ros_gz_sim_demos`](https://github.com/gazebosim/ros_gz/tree/ros2/ros_gz_sim_demos), including demo launch files with bridging of all major actuation and sensor types.

Expand All @@ -29,7 +29,7 @@ The ROS message type is followed by an `@`, `[`, or `]` symbol where:
* `[` is a bridge from Gazebo to ROS.
* `]` is a bridge from ROS to Gazebo.

Have a look at these [examples]( https://github.com/gazebosim/ros_gz/blob/ros2/ros_gz_bridge/README.md#example-1a-gazebo-transport-talker-and-ros-2-listener)
Have a look at these [examples]( https://github.com/gazebosim/ros_gz/blob/jazzy/ros_gz_bridge/README.md#example-1a-gazebo-transport-talker-and-ros-2-listener)
explaining how to make communication connections from ROS to Gazebo and vice versa.

It is also possible to use ROS Launch with the `ros_gz_bridge` and represent the topics in yaml format to be given to the bridge at launch time.
Expand Down Expand Up @@ -58,7 +58,7 @@ speedup performance.
* `direction`: It's possible to specify `GZ_TO_ROS`, `ROS_TO_GZ` and
`BIDIRECTIONAL`.

See [this example](https://github.com/gazebosim/ros_gz/blob/ros2/ros_gz_bridge/test/config/full.yaml)
See [this example](https://github.com/gazebosim/ros_gz/blob/jazzy/ros_gz_bridge/test/config/full.yaml)
for a valid configuration file.

## Launching the bridge using the launch files included in `ros_gz_bridge` package.
Expand All @@ -78,7 +78,7 @@ And now, the container will load your bridge with:
ros2 launch ros_gz_bridge ros_gz_bridge.launch.py bridge_name:=ros_gz_bridge config_file:=<path_to_your_YAML_file>
```

Check [this block](https://github.com/gazebosim/ros_gz/blob/ros2/ros_gz_bridge/launch/ros_gz_bridge.launch.py#L27-L33)
Check [this block](https://github.com/gazebosim/ros_gz/blob/jazzy/ros_gz_bridge/launch/ros_gz_bridge.launch.py#L27-L33)
from the source code to know all the different parameters accepted by this
launch file.

Expand Down Expand Up @@ -203,10 +203,10 @@ A video walk-through of this tutorial is available from our YouTube channel: [Ga

## Visualize in RViz

Take a step further and try out demos from [`ros_gz_sim_demos`](https://github.com/gazebosim/ros_gz/tree/ros2/ros_gz_sim_demos).
Take a step further and try out demos from [`ros_gz_sim_demos`](https://github.com/gazebosim/ros_gz/tree/jazzy/ros_gz_sim_demos).

For the `sdf_parser` demo, install [`ros_gz`](https://github.com/gazebosim/ros_gz/tree/ros2) and the parser plugin `sdformat_urdf` from source in a colcon workspace.
Read more about `sdformat_urdf` [here](https://github.com/ros/sdformat_urdf/blob/ros2/sdformat_urdf/README.md).
For the `sdf_parser` demo, install [`ros_gz`](https://github.com/gazebosim/ros_gz/tree/jazzy) and the parser plugin `sdformat_urdf` from source in a colcon workspace.
Read more about `sdformat_urdf` [here](https://github.com/ros/sdformat_urdf/blob/jazzy/sdformat_urdf/README.md).

Run the demo launch file with the rviz launch argument set:

Expand Down
4 changes: 2 additions & 2 deletions harmonic/ros2_interop.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ For publishing and controlling the robot pose, we need joint states of the robot

![jsp_gui](tutorials/ros2_integration/jsp_gui.png)

See [documentation](http://docs.ros.org/en/rolling/p/joint_state_publisher_gui/) for node API.
See [documentation](http://docs.ros.org/en/jazzy/p/joint_state_publisher_gui/) for node API.
This functionality is useful during initial development of the model.
At this point we have achieved the first aim defined in [Setup](#setup).

Expand Down Expand Up @@ -95,7 +95,7 @@ Learn more about the bridge from [ROS 2 Integration](ros2_integration).
The main pain point of using existing simulation assets with ROS 2 tools was updating URDF files into a Gazebo-readable format. This is no longer required. If you are maintaining a URDF and an SDF file in a project, you can now drop the URDF and just use the SDF for both ROS and Gazebo.

This is made possible by `sdformat_urdf`, a parser plugin library that converts an SDF file to URDF C++ DOM structures, making it understandle by the ROS 2 ecosystem.
Although, there are some limitations of the plugin, like not all SDFormat tags are compatible. For example, if you have any sensors attached to a joint, it won't be parsed. More details [here](https://github.com/ros/sdformat_urdf/tree/ros2/sdformat_urdf).
Although, there are some limitations of the plugin, like not all SDFormat tags are compatible. For example, if you have any sensors attached to a joint, it won't be parsed. More details [here](https://github.com/ros/sdformat_urdf/tree/jazzy/sdformat_urdf).

To embed this functionality, we simply need to print the SDFormat file to the `/robot_description` ROS topic, and internally ROS will find a suitable parser, `sdformat_urdf` in this case, to read the file. This is already done while configuring the `robot_state_publisher` earlier.

Expand Down
6 changes: 3 additions & 3 deletions harmonic/ros2_launch_gazebo.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Gazebo can be launched from a ROS 2 launch system in multiple ways:

## Using the launch files included in
[ros_gz_sim](https://github.com/gazebosim/ros_gz/tree/ros2/ros_gz_sim).
[ros_gz_sim](https://github.com/gazebosim/ros_gz/tree/jazzy/ros_gz_sim).

The package `ros_gz_sim` contains two launch files named `gz_server.launch.py`
and `gz_sim.launch.py`. You can use them to start Gazebo server or Gazebo (server and GUI)
Expand All @@ -20,8 +20,8 @@ ros2 launch ros_gz_sim gz_server.launch.py world_sdf_file:=empty.sdf
```

Consult the argument block of each launch file
[here](https://github.com/gazebosim/ros_gz/blob/ros2/ros_gz_sim/launch/gz_sim.launch.py.in#L75-L96)
and [here](https://github.com/gazebosim/ros_gz/blob/ros2/ros_gz_sim/launch/gz_server.launch.py#L27-L38)
[here](https://github.com/gazebosim/ros_gz/blob/jazzy/ros_gz_sim/launch/gz_sim.launch.py.in#L75-L96)
and [here](https://github.com/gazebosim/ros_gz/blob/jazzy/ros_gz_sim/launch/gz_server.launch.py#L27-L38)
to learn about the different parameters that are accepted by each launch file.

## Using a custom launch file.
Expand Down
5 changes: 1 addition & 4 deletions harmonic/ros2_overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ different types of integrations that you can achieve between Gazebo and ROS.

* Use ROS to launch Gazebo: ROS prescribes a specific way to launch all
the pieces needed in your system. There's a dedicated
[launch mechanism](https://docs.ros.org/en/rolling/Tutorials/Intermediate/Launch/Creating-Launch-Files.html)
[launch mechanism](https://docs.ros.org/en/jazzy/Tutorials/Intermediate/Launch/Creating-Launch-Files.html)
to orchestrate the launch of all your components and many tooling around it.
Gazebo can be launched in this way.

Expand All @@ -26,9 +26,6 @@ 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 Down
3 changes: 1 addition & 2 deletions harmonic/ros2_spawn_model.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ 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
Expand All @@ -15,7 +14,7 @@ existing simulation. Here's an example:
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 entity_name:=my_vehicle x:=5.0 y:=5.0 z:=0.5
```

Check [this block](https://github.com/gazebosim/ros_gz/blob/ros2/ros_gz_sim/launch/ros_gz_spawn_model.launch.py#L26-L45)
Check [this block](https://github.com/gazebosim/ros_gz/blob/jazzy/ros_gz_sim/launch/ros_gz_spawn_model.launch.py#L26-L45)
from the source code to know all the different parameters accepted by this
launch file.

Expand Down

0 comments on commit 4bfec28

Please sign in to comment.