Skip to content

Commit 9383b6c

Browse files
j-riveroazeey
andauthored
Include how to run Gazebo and rework the sections in the ROS vendor d… (#445)
Signed-off-by: Jose Luis Rivero <[email protected]> Co-authored-by: Addisu Z. Taddese <[email protected]>
1 parent d5fddee commit 9383b6c

File tree

1 file changed

+33
-4
lines changed

1 file changed

+33
-4
lines changed

ros2_gz_vendor_pkgs.md

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# ROS 2 Gazebo Vendor Packages
22

3+
## History of Gazebo packaging before ROS 2 Jazzy
4+
35
ROS 2 versions prior to Jazzy used Gazebo packages that were available in
46
upstream Ubuntu. However, due to the package
57
[update policy of Ubuntu](https://wiki.ubuntu.com/StableReleaseUpdates), the
@@ -12,6 +14,8 @@ more up-to-date Gazebo packages were copied to the ROS bootstrap repository
1214
versions in sync between the Gazebo and ROS package repositories was difficult
1315
since this was a manual process.
1416

17+
## Gazebo vendor packages
18+
1519
As of ROS 2 Jazzy, Gazebo is available from the ROS package repository via
1620
vendor packages. A ROS vendor package is a ROS package that provides software
1721
that ROS needs on platforms where it might not be available, or where a
@@ -62,7 +66,23 @@ In addition to Gazebo libraries, two dependencies of Gazebo are also vendored:
6266
Use of this vendor package generally (outside of Gazebo) is not recommended as
6367
the underlying library version might change without notice.
6468

65-
## Using vendor packages in `package.xml`
69+
## Running Gazebo from vendor packages
70+
71+
To be able to use the `gz` command to run the usual commands, be sure that at least
72+
`gz_tools_vendor` package is installed. To have the `gz` command in the PATH,
73+
source the `setup.bash` from `/opt/ros/${ROS_DISTRO}` as usual.
74+
75+
```
76+
# Example running gz sim on Jazzy
77+
export ROS_DISTRO=jazzy
78+
sudo apt-get install ros-${ROS_DISTRO}-gz-tools-vendor ros-${ROS_DISTRO}-gz-sim-vendor
79+
. /opt/ros/jazzy/setup.bash
80+
gz sim --help
81+
```
82+
83+
## Building packages using Gazebo vendor packages
84+
85+
### Declaring dependencies in `package.xml`
6686

6787
To use a Gazebo vendor package in your project, you'll need to add the
6888
appropriate package in your `package.xml`. For example, if you use the Gazebo
@@ -77,7 +97,7 @@ will be the following
7797
...
7898
```
7999

80-
## Using vendor packages in CMake
100+
### CMakeLists.txt for building with Gazebo vendor packages
81101

82102
To use a Gazebo library provided by a vendor package, you'll need to
83103
`find_package` the vendor package and the underlying Gazebo library. Calling
@@ -105,7 +125,16 @@ target_link_libraries(test_gz_vendor PUBLIC gz-math::gz-math gz-utils::gz-utils)
105125
**Note:** The vendor packages use underscores (`_`) while the Gazebo library
106126
names use dashes (`-`).
107127

108-
## Using vendor packages with binaries from packages.osrfoundation.org
128+
129+
## Expert use cases
130+
131+
The documentation provided above should cover the users that require to install
132+
and run the Gazebo simulator together with ROS and developing code that requires
133+
of Gazebo and ROS.
134+
135+
Below are listed more advanced topics for the expert users.
136+
137+
### Installing Non-Default Gazebo/ROS 2 Pairings with vendor packages
109138

110139
If you want to use a new release of Gazebo that is not officially paired with
111140
the release of ROS you are using (e.g. Gazebo Ionic with ROS 2 Jazzy), you can
@@ -130,7 +159,7 @@ follow the following steps:
130159
version number.
131160
1. Build the workspace
132161

133-
## Gazebo library development with vendor packages
162+
### Gazebo library development with vendor packages
134163

135164
Building the underlying packages from source might be needed when using a Gazebo
136165
release that is not officially paired with the ROS release you are using or when

0 commit comments

Comments
 (0)