-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Installing ROS 2 and Gazebo side-by-side along with
ros_gz
(#65)
* Addded check for ros_gz Signed-off-by: Saurabh Kamat <[email protected]> * Changed command to use callback for stdout output Signed-off-by: Saurabh Kamat <[email protected]> * Added exec options for getting ros distros Signed-off-by: Saurabh Kamat <[email protected]> * Added apt install on ros distros Signed-off-by: Saurabh Kamat <[email protected]> * Updated ros_gz install to take multiple ROS 2 distro inputs Signed-off-by: Saurabh Kamat <[email protected]> * Implemented check on ros_gz installtion Signed-off-by: Saurabh Kamat <[email protected]> * Updated tests for ros_gz Signed-off-by: Saurabh Kamat <[email protected]> * Fixed typo in package name Signed-off-by: Saurabh Kamat <[email protected]> * Updated workflow test Signed-off-by: Saurabh Kamat <[email protected]> * Changed test to install iron and rolling Signed-off-by: Saurabh Kamat <[email protected]> * Changed env variable Signed-off-by: Saurabh Kamat <[email protected]> * Testing different env variable Signed-off-by: Saurabh Kamat <[email protected]> * Updated workflow test Signed-off-by: Saurabh Kamat <[email protected]> * Added pkg name generation test Signed-off-by: Saurabh Kamat <[email protected]> * Testing ros_gz installation in workflow Signed-off-by: Saurabh Kamat <[email protected]> * Added additional tests for ros_gz Signed-off-by: Saurabh Kamat <[email protected]> * Updated README with ros_gz installation instructions Signed-off-by: Saurabh Kamat <[email protected]> * Added env variable for ros_gz workflow Signed-off-by: Saurabh Kamat <[email protected]> * Updated README with env var in ros_gz usage Signed-off-by: Saurabh Kamat <[email protected]> * Removed rolling and jazzy from ros distro list Signed-off-by: Saurabh Kamat <[email protected]> * Updated workflow tests Signed-off-by: Saurabh Kamat <[email protected]> * Fixed test command in workflow Signed-off-by: Saurabh Kamat <[email protected]> * Updated README Signed-off-by: Saurabh Kamat <[email protected]> * Changed Ros to ROS in variables names Signed-off-by: Saurabh Kamat <[email protected]> * Updated README Signed-off-by: Saurabh Kamat <[email protected]> * Added additional information about ros_gz install Signed-off-by: Saurabh Kamat <[email protected]> --------- Signed-off-by: Saurabh Kamat <[email protected]>
- Loading branch information
Showing
7 changed files
with
325 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -256,3 +256,57 @@ jobs: | |
run: | | ||
conda activate | ||
gz sim --versions | ||
test_install_ros_gz_unofficial: | ||
name: 'Install Iron and Harmonic side-by-side' | ||
env: | ||
ROS_DISTROS: 'iron' | ||
runs-on: ubuntu-latest | ||
container: | ||
image: ubuntu:jammy | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/[email protected] | ||
with: | ||
node-version: '20.x' | ||
- name: 'Install ROS 2 Iron' | ||
uses: ros-tooling/[email protected] | ||
with: | ||
required-ros-distributions: ${{ env.ROS_DISTROS }} | ||
- name: 'Install Gazebo Harmonic with ros_gz' | ||
uses: ./ | ||
with: | ||
required-gazebo-distributions: 'harmonic' | ||
install-ros-gz: ${{ env.ROS_DISTROS }} | ||
- name: Test Iron ros_gz installation | ||
run: | | ||
source /opt/ros/iron/setup.bash | ||
ros2 pkg list | grep ros_gz | ||
gz sim --version | grep 'version 8.[0-9*].[0-9*]' | ||
test_install_ros_gz_official: | ||
name: 'Install Humble and Fortress side-by-side' | ||
env: | ||
ROS_DISTROS: 'humble' | ||
runs-on: ubuntu-latest | ||
container: | ||
image: ubuntu:jammy | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/[email protected] | ||
with: | ||
node-version: '20.x' | ||
- name: 'Install ROS 2 Humble' | ||
uses: ros-tooling/[email protected] | ||
with: | ||
required-ros-distributions: ${{ env.ROS_DISTROS }} | ||
- name: 'Install Gazebo with ros_gz' | ||
uses: ./ | ||
with: | ||
required-gazebo-distributions: 'fortress' | ||
install-ros-gz: ${{ env.ROS_DISTROS }} | ||
- name: Test Humble ros_gz installation | ||
run: | | ||
source /opt/ros/humble/setup.bash | ||
ros2 pkg list | grep ros_gz | ||
ign gazebo --version | grep 'version 6.*' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,7 @@ This action sets up a Gazebo environment. | |
1. [Setting up worker and installing a compatible Gazebo and Ubuntu combination](#Setting-up-worker-and-installing-a-compatible-Gazebo-and-Ubuntu-combination) | ||
1. [Iterating on all Gazebo and Ubuntu combinations](#Iterating-on-all-gazebo-ubuntu-combinations) | ||
1. [Using pre-release and/or nightly Gazebo binaries](#Using-pre-release-and/or-nightly-Gazebo-binaries) | ||
1. [Installing ROS 2 and Gazebo side-by-side along with `ros_gz`](#Installing-ROS-2-and-Gazebo-side-by-side-along-with-ros_gz) | ||
2. [macOS](#macOS) | ||
1. [Setting up worker to install Gazebo on macOS](#Setting-up-worker-to-install-Gazebo-on-macOS) | ||
3. [Windows](#Windows) | ||
|
@@ -25,6 +26,7 @@ The `setup-gazebo` GitHub Action sets up an environment to install a Gazebo rele | |
- `required-gazebo-distributions`: A **required** parameter that specifies the Gazebo distribution to be installed. | ||
- `use-gazebo-prerelease`: An **optional** parameter to install pre-release binaries from OSRF repository. | ||
- `use-gazebo-nightly`: An **optional** parameter to install nightly binaries from OSRF repository. | ||
- `install-ros-gz`: An **optional** parameter to install the ROS 2 Gazebo bridge (`ros_gz`). This will require a previous ROS installation which can be done using the [`setup-ros`](https://github.com/ros-tooling/setup-ros) GitHub action. Installation of the `ros_gz` bridge supports the ROS official and ROS non-official (from packages.osrfoundation.org) variants following the [Installing Gazebo with ROS](https://gazebosim.org/docs/ionic/ros_installation/#summary-of-compatible-ros-and-gazebo-combinations) documentation. | ||
|
||
## Supported platforms | ||
|
||
|
@@ -45,6 +47,7 @@ The `setup-gazebo` action performs the following tasks: | |
- Tapping into the [osrf/homebrew-simulation](https://github.com/osrf/homebrew-simulation) using Homebrew | ||
- On Windows: | ||
- Installing Gazebo using Conda from conda-forge | ||
|
||
## Usage | ||
|
||
See [action.yml](action.yml) | ||
|
@@ -239,6 +242,39 @@ This workflow shows how to use binaries from [pre-release] or [nightly] Gazebo r | |
run: 'gz sim --versions' | ||
``` | ||
|
||
#### Installing ROS 2 and Gazebo side-by-side along with `ros_gz` | ||
|
||
This workflow shows how to install ROS 2 using the GitHub action `ros-tooling/setup-ros` along with Gazebo installed using `setup-gazebo`. The `ros-gz` package can be installed by setting the input parameter `install-ros-gz` to the required ROS 2 distributions. | ||
|
||
```yaml | ||
jobs: | ||
test_gazebo: | ||
env: | ||
ROS_DISTROS: 'iron' | ||
runs-on: ubuntu-latest | ||
container: | ||
image: ubuntu:jammy | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/[email protected] | ||
with: | ||
node-version: '20.x' | ||
- name: 'Install ROS 2 Iron' | ||
uses: ros-tooling/[email protected] | ||
with: | ||
required-ros-distributions: ${{ env.ROS_DISTROS }} | ||
- name: 'Install Gazebo Harmonic with ros_gz' | ||
uses: gazebo-tooling/[email protected] | ||
with: | ||
required-gazebo-distributions: 'harmonic' | ||
install-ros-gz: ${{ env.ROS_DISTROS }} | ||
- name: Test Iron ros_gz installation | ||
run: | | ||
source /opt/ros/iron/setup.bash | ||
ros2 pkg list | grep ros_gz | ||
gz sim --version | grep 'version 8.[0-9*].[0-9*]' | ||
``` | ||
|
||
### macOS | ||
|
||
#### Setting up worker to install Gazebo on macOS | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.