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

Forward port humble->iron #467

Merged
merged 18 commits into from
Dec 13, 2023
Merged
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
9 changes: 7 additions & 2 deletions .github/workflows/build-and-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,19 @@ export ROS_PYTHON_VERSION=3
apt update -qq
apt install -qq -y lsb-release wget curl build-essential

# Garden only has nightlies for now
if [ "$GZ_VERSION" == "garden" ]; then
echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable `lsb_release -cs` main" > /etc/apt/sources.list.d/gazebo-stable.list
echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-nightly `lsb_release -cs` main" > /etc/apt/sources.list.d/gazebo-nightly.list
wget https://packages.osrfoundation.org/gazebo.key -O - | apt-key add -

GZ_DEPS="libgz-sim7-dev"

ROSDEP_ARGS="--skip-keys='sdformat-urdf'"
elif [ "$GZ_VERSION" == "harmonic" ]; then
echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable `lsb_release -cs` main" > /etc/apt/sources.list.d/gazebo-stable.list
wget https://packages.osrfoundation.org/gazebo.key -O - | apt-key add -

GZ_DEPS="libgz-sim8-dev"

ROSDEP_ARGS="--skip-keys='sdformat-urdf'"
fi

Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/ros2-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ jobs:
- docker-image: "ubuntu:22.04"
gz-version: "garden"
ros-distro: "iron"
- docker-image: "ubuntu:22.04"
gz-version: "harmonic"
ros-distro: "iron"
container:
image: ${{ matrix.docker-image }}
steps:
Expand Down
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,17 @@ Foxy | Edifice | [foxy](https://github.com/gazebosim/ros_gz/tree/foxy) | only fr
Galactic | Edifice | [galactic](https://github.com/gazebosim/ros_gz/tree/galactic) | https://packages.ros.org
Galactic | Fortress | [galactic](https://github.com/gazebosim/ros_gz/tree/galactic) | only from source
Humble | Fortress | [humble](https://github.com/gazebosim/ros_gz/tree/humble) | https://packages.ros.org
Humble | Garden | [humble](https://github.com/gazebosim/ros_gz/tree/humble) | only from source
Humble | Garden | [humble](https://github.com/gazebosim/ros_gz/tree/humble) | [gazebo packages](https://gazebosim.org/docs/latest/ros_installation#gazebo-garden-with-ros-2-humble-iron-or-rolling-use-with-caution-)[^1]
Humble | Harmonic | [humble](https://github.com/gazebosim/ros_gz/tree/humble) | only from source
Iron | Fortress | [humble](https://github.com/gazebosim/ros_gz/tree/iron) | https://packages.ros.org
Iron | Garden | [humble](https://github.com/gazebosim/ros_gz/tree/iron) | only from source
Iron | Harmonic | [humble](https://github.com/gazebosim/ros_gz/tree/iron) | only from source
Rolling | Edifice | [ros2](https://github.com/gazebosim/ros_gz/tree/ros2) | only from source
Rolling | Fortress | [ros2](https://github.com/gazebosim/ros_gz/tree/ros2) | https://packages.ros.org
Rolling | Garden | [ros2](https://github.com/gazebosim/ros_gz/tree/ros2) | only from source
Rolling | Harmonic | [ros2](https://github.com/gazebosim/ros_gz/tree/ros2) | only from source

[^1]: Binaries for these pairings are provided from a the packages.osrfoundation.org repository. Refer to https://gazebosim.org/docs/latest/ros_installation for installation instructions.

For information on ROS 2 and Gazebo compatibility, refer to the [melodic branch README](https://github.com/gazebosim/ros_gz/tree/melodic)

Expand Down Expand Up @@ -85,7 +90,7 @@ Install either [Edifice, Fortress, or Garden](https://gazebosim.org/docs).
Set the `GZ_VERSION` environment variable to the Gazebo version you'd
like to compile against. For example:

export GZ_VERSION=edifice
export GZ_VERSION=edifice # IMPORTANT: Replace with correct version

> You only need to set this variable when compiling, not when running.

Expand All @@ -101,7 +106,7 @@ The following steps are for Linux and OSX.
cd ~/ws/src

# Download needed software
git clone https://github.com/gazebosim/ros_gz.git -b ros2
git clone https://github.com/gazebosim/ros_gz.git -b humble
```

1. Install dependencies (this may also install Gazebo):
Expand Down
9 changes: 9 additions & 0 deletions ros_gz_bridge/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,15 @@ elseif("$ENV{GZ_VERSION}" STREQUAL "garden")
set(GZ_TRANSPORT_VER ${gz-transport12_VERSION_MAJOR})

message(STATUS "Compiling against Gazebo Garden")
elseif("$ENV{GZ_VERSION}" STREQUAL "harmonic")
find_package(gz-transport13 REQUIRED)
find_package(gz-msgs10 REQUIRED)

set(GZ_TARGET_PREFIX gz)
set(GZ_MSGS_VER ${gz-msgs10_VERSION_MAJOR})
set(GZ_TRANSPORT_VER ${gz-transport13_VERSION_MAJOR})

message(STATUS "Compiling against Gazebo Harmonic")
# Default to Fortress
else()
find_package(ignition-transport11 REQUIRED)
Expand Down
6 changes: 3 additions & 3 deletions ros_gz_bridge/include/ros_gz_bridge/convert/actuator_msgs.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#define ROS_GZ_BRIDGE__CONVERT__ACTUATOR_MSGS_HPP_

// Gazebo Msgs
#include <ignition/msgs/actuators.pb.h>
#include <gz/msgs/actuators.pb.h>

// ROS 2 messages
#include <actuator_msgs/msg/actuators.hpp>
Expand All @@ -30,12 +30,12 @@ template<>
void
convert_ros_to_gz(
const actuator_msgs::msg::Actuators & ros_msg,
ignition::msgs::Actuators & gz_msg);
gz::msgs::Actuators & gz_msg);

template<>
void
convert_gz_to_ros(
const ignition::msgs::Actuators & gz_msg,
const gz::msgs::Actuators & gz_msg,
actuator_msgs::msg::Actuators & ros_msg);

} // namespace ros_gz_bridge
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#ifndef ROS_GZ_BRIDGE__CONVERT__BUILTIN_INTERFACES_HPP_
#define ROS_GZ_BRIDGE__CONVERT__BUILTIN_INTERFACES_HPP_

#include <ignition/msgs/time.pb.h>
#include <gz/msgs/time.pb.h>

#include <builtin_interfaces/msg/time.hpp>

Expand All @@ -28,12 +28,12 @@ template<>
void
convert_ros_to_gz(
const builtin_interfaces::msg::Time & ros_msg,
ignition::msgs::Time & gz_msg);
gz::msgs::Time & gz_msg);

template<>
void
convert_gz_to_ros(
const ignition::msgs::Time & gz_msg,
const gz::msgs::Time & gz_msg,
builtin_interfaces::msg::Time & ros_msg);

} // namespace ros_gz_bridge
Expand Down
68 changes: 34 additions & 34 deletions ros_gz_bridge/include/ros_gz_bridge/convert/geometry_msgs.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@
#define ROS_GZ_BRIDGE__CONVERT__GEOMETRY_MSGS_HPP_

// Gazebo Msgs
#include <ignition/msgs/quaternion.pb.h>
#include <ignition/msgs/vector3d.pb.h>
#include <ignition/msgs/pose.pb.h>
#include <ignition/msgs/pose_with_covariance.pb.h>
#include <ignition/msgs/pose_v.pb.h>
#include <ignition/msgs/twist.pb.h>
#include <ignition/msgs/twist_with_covariance.pb.h>
#include <ignition/msgs/wrench.pb.h>
#include <gz/msgs/quaternion.pb.h>
#include <gz/msgs/vector3d.pb.h>
#include <gz/msgs/pose.pb.h>
#include <gz/msgs/pose_with_covariance.pb.h>
#include <gz/msgs/pose_v.pb.h>
#include <gz/msgs/twist.pb.h>
#include <gz/msgs/twist_with_covariance.pb.h>
#include <gz/msgs/wrench.pb.h>

// ROS 2 messages
#include <geometry_msgs/msg/point.hpp>
Expand All @@ -48,156 +48,156 @@ template<>
void
convert_ros_to_gz(
const geometry_msgs::msg::Quaternion & ros_msg,
ignition::msgs::Quaternion & gz_msg);
gz::msgs::Quaternion & gz_msg);

template<>
void
convert_gz_to_ros(
const ignition::msgs::Quaternion & gz_msg,
const gz::msgs::Quaternion & gz_msg,
geometry_msgs::msg::Quaternion & ros_msg);

template<>
void
convert_ros_to_gz(
const geometry_msgs::msg::Vector3 & ros_msg,
ignition::msgs::Vector3d & gz_msg);
gz::msgs::Vector3d & gz_msg);

template<>
void
convert_gz_to_ros(
const ignition::msgs::Vector3d & gz_msg,
const gz::msgs::Vector3d & gz_msg,
geometry_msgs::msg::Vector3 & ros_msg);

template<>
void
convert_ros_to_gz(
const geometry_msgs::msg::Point & ros_msg,
ignition::msgs::Vector3d & gz_msg);
gz::msgs::Vector3d & gz_msg);

template<>
void
convert_gz_to_ros(
const ignition::msgs::Vector3d & gz_msg,
const gz::msgs::Vector3d & gz_msg,
geometry_msgs::msg::Point & ros_msg);

template<>
void
convert_ros_to_gz(
const geometry_msgs::msg::Pose & ros_msg,
ignition::msgs::Pose & gz_msg);
gz::msgs::Pose & gz_msg);

template<>
void
convert_gz_to_ros(
const ignition::msgs::Pose & gz_msg,
const gz::msgs::Pose & gz_msg,
geometry_msgs::msg::Pose & ros_msg);

template<>
void
convert_ros_to_gz(
const geometry_msgs::msg::PoseArray & ros_msg,
ignition::msgs::Pose_V & gz_msg);
gz::msgs::Pose_V & gz_msg);

template<>
void
convert_gz_to_ros(
const ignition::msgs::Pose_V & gz_msg,
const gz::msgs::Pose_V & gz_msg,
geometry_msgs::msg::PoseArray & ros_msg);

template<>
void
convert_ros_to_gz(
const geometry_msgs::msg::PoseWithCovariance & ros_msg,
ignition::msgs::PoseWithCovariance & gz_msg);
gz::msgs::PoseWithCovariance & gz_msg);

template<>
void
convert_gz_to_ros(
const ignition::msgs::PoseWithCovariance & gz_msg,
const gz::msgs::PoseWithCovariance & gz_msg,
geometry_msgs::msg::PoseWithCovariance & ros_msg);

template<>
void
convert_ros_to_gz(
const geometry_msgs::msg::PoseStamped & ros_msg,
ignition::msgs::Pose & gz_msg);
gz::msgs::Pose & gz_msg);

template<>
void
convert_gz_to_ros(
const ignition::msgs::Pose & gz_msg,
const gz::msgs::Pose & gz_msg,
geometry_msgs::msg::PoseStamped & ros_msg);

template<>
void
convert_ros_to_gz(
const geometry_msgs::msg::Transform & ros_msg,
ignition::msgs::Pose & gz_msg);
gz::msgs::Pose & gz_msg);

template<>
void
convert_gz_to_ros(
const ignition::msgs::Pose & gz_msg,
const gz::msgs::Pose & gz_msg,
geometry_msgs::msg::Transform & ros_msg);

template<>
void
convert_ros_to_gz(
const geometry_msgs::msg::TransformStamped & ros_msg,
ignition::msgs::Pose & gz_msg);
gz::msgs::Pose & gz_msg);

template<>
void
convert_gz_to_ros(
const ignition::msgs::Pose & gz_msg,
const gz::msgs::Pose & gz_msg,
geometry_msgs::msg::TransformStamped & ros_msg);

template<>
void
convert_ros_to_gz(
const geometry_msgs::msg::Twist & ros_msg,
ignition::msgs::Twist & gz_msg);
gz::msgs::Twist & gz_msg);

template<>
void
convert_gz_to_ros(
const ignition::msgs::Twist & gz_msg,
const gz::msgs::Twist & gz_msg,
geometry_msgs::msg::Twist & ros_msg);

template<>
void
convert_ros_to_gz(
const geometry_msgs::msg::TwistWithCovariance & ros_msg,
ignition::msgs::TwistWithCovariance & gz_msg);
gz::msgs::TwistWithCovariance & gz_msg);

template<>
void
convert_gz_to_ros(
const ignition::msgs::TwistWithCovariance & gz_msg,
const gz::msgs::TwistWithCovariance & gz_msg,
geometry_msgs::msg::TwistWithCovariance & ros_msg);

template<>
void
convert_ros_to_gz(
const geometry_msgs::msg::Wrench & ros_msg,
ignition::msgs::Wrench & gz_msg);
gz::msgs::Wrench & gz_msg);

template<>
void
convert_gz_to_ros(
const ignition::msgs::Wrench & gz_msg,
const gz::msgs::Wrench & gz_msg,
geometry_msgs::msg::Wrench & ros_msg);

template<>
void
convert_ros_to_gz(
const geometry_msgs::msg::WrenchStamped & ros_msg,
ignition::msgs::Wrench & gz_msg);
gz::msgs::Wrench & gz_msg);

template<>
void
convert_gz_to_ros(
const ignition::msgs::Wrench & gz_msg,
const gz::msgs::Wrench & gz_msg,
geometry_msgs::msg::WrenchStamped & ros_msg);

} // namespace ros_gz_bridge
Expand Down
12 changes: 6 additions & 6 deletions ros_gz_bridge/include/ros_gz_bridge/convert/nav_msgs.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
#define ROS_GZ_BRIDGE__CONVERT__NAV_MSGS_HPP_

// Gazebo Msgs
#include <ignition/msgs/odometry.pb.h>
#include <ignition/msgs/odometry_with_covariance.pb.h>
#include <gz/msgs/odometry.pb.h>
#include <gz/msgs/odometry_with_covariance.pb.h>

// ROS 2 messages
#include <nav_msgs/msg/odometry.hpp>
Expand All @@ -31,24 +31,24 @@ template<>
void
convert_ros_to_gz(
const nav_msgs::msg::Odometry & ros_msg,
ignition::msgs::Odometry & gz_msg);
gz::msgs::Odometry & gz_msg);

template<>
void
convert_gz_to_ros(
const ignition::msgs::Odometry & gz_msg,
const gz::msgs::Odometry & gz_msg,
nav_msgs::msg::Odometry & ros_msg);

template<>
void
convert_ros_to_gz(
const nav_msgs::msg::Odometry & ros_msg,
ignition::msgs::OdometryWithCovariance & gz_msg);
gz::msgs::OdometryWithCovariance & gz_msg);

template<>
void
convert_gz_to_ros(
const ignition::msgs::OdometryWithCovariance & gz_msg,
const gz::msgs::OdometryWithCovariance & gz_msg,
nav_msgs::msg::Odometry & ros_msg);

} // namespace ros_gz_bridge
Expand Down
Loading
Loading