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 Jazzy support #61

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all 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
52 changes: 1 addition & 51 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,57 +19,7 @@ The project is adapted from the [`ros_gz_project_template`](https://github.com/g

## Prerequisites

- Install [ROS 2 Humble](https://docs.ros.org/en/humble/index.html)
- Install [Gazebo Harmonic (recommended)](https://gazebosim.org/docs/harmonic) or [Gazebo Garden](https://gazebosim.org/docs/garden)
- Follow the [`Installing Build Dependencies`](https://github.com/ArduPilot/ardupilot/tree/master/libraries/AP_DDS#installing-build-dependencies) section of `AP_DDS`'s README

## Install

#### 1. Create a workspace folder

```bash
mkdir -p ~/ros2_ws/src
```

#### 2. Get the project source

```bash
cd ~/ros2_ws
vcs import --input https://raw.githubusercontent.com/ArduPilot/ardupilot_gz/main/ros2_gz.repos --recursive src
```

#### 3. Set the Gazebo version to Harmonic or Garden:

It is recommended to put this in your `~/.bashrc` or equivalent file.

```bash
export GZ_VERSION=harmonic
```

#### 4. Update ROS dependencies

```bash
cd ~/ros2_ws
source /opt/ros/humble/setup.bash
sudo apt update
rosdep update
rosdep install --from-paths src --ignore-src -y
```

#### 5. Build

```bash
cd ~/ros2_ws
colcon build
```

#### 6. Test

```bash
source ./install/setup.bash
colcon test --packages-select ardupilot_sitl ardupilot_dds_tests ardupilot_gazebo ardupilot_gz_applications ardupilot_gz_description ardupilot_gz_gazebo ardupilot_gz_bringup
colcon test-result --all --verbose
```
Follow the installation instructions in the [ArduPilot Wiki](https://ardupilot.org/dev/docs/ros2-gazebo.html)
Ryanf55 marked this conversation as resolved.
Show resolved Hide resolved

## Usage

Expand Down
File renamed without changes.
File renamed without changes.
29 changes: 29 additions & 0 deletions jazzy_gz.repos
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
repositories:
ardupilot:
type: git
url: https://github.com/ArduPilot/ardupilot.git
version: master
ardupilot_gazebo:
type: git
url: https://github.com/ArduPilot/ardupilot_gazebo.git
version: ros2
ardupilot_gz:
type: git
url: https://github.com/ArduPilot/ardupilot_gz.git
version: main
ardupilot_sitl_models:
type: git
url: https://github.com/ArduPilot/SITL_Models.git
version: main
micro_ros_agent:
type: git
url: https://github.com/micro-ROS/micro-ROS-Agent.git
version: jazzy
ros_gz:
type: git
url: https://github.com/gazebosim/ros_gz.git
version: jazzy
sdformat_urdf:
type: git
url: https://github.com/ros/sdformat_urdf.git
version: jazzy
37 changes: 37 additions & 0 deletions jazzy_gz_macos.repos
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
repositories:
ardupilot:
type: git
url: https://github.com/ArduPilot/ardupilot.git
version: master
ardupilot_gazebo:
type: git
url: https://github.com/ArduPilot/ardupilot_gazebo.git
version: ros2
ardupilot_gz:
type: git
url: https://github.com/ArduPilot/ardupilot_gz.git
version: main
ardupilot_sitl_models:
type: git
url: https://github.com/ArduPilot/SITL_Models.git
version: main
gps_umd:
type: git
url: https://github.com/swri-robotics/gps_umd.git
version: ros2-devel
micro_ros_agent:
type: git
url: https://github.com/micro-ROS/micro-ROS-Agent
version: jazzy
Comment on lines +22 to +25
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The macOS humble version required a specific branch from your fork @srmainwaring. Can you check if that is still necessary on Jazzy ?

Copy link
Collaborator

@Ryanf55 Ryanf55 Nov 8, 2024

Choose a reason for hiding this comment

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

I created jazzy and humble branches here. Now, you can edit the ros2_gz.repos directly and backport changes as needed

micro_ros_msgs:
type: git
url: https://github.com/micro-ROS/micro_ros_msgs.git
version: jazzy
ros_gz:
type: git
url: https://github.com/gazebosim/ros_gz.git
version: jazzy
sdformat_urdf:
type: git
url: https://github.com/ros/sdformat_urdf.git
version: jazzy