From 3dbf70fb91f5f3b6bd14826b1bdbe444ac7a9b2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Hern=C3=A1ndez=20Cordero?= Date: Tue, 23 Jan 2024 21:52:09 +0100 Subject: [PATCH] Imported upstream version '0.244.13' of 'upstream' --- .github/workflows/ros2-ci.yml | 15 ++- README.md | 27 ++-- ros_gz/CHANGELOG.rst | 11 +- ros_gz/package.xml | 2 +- ros_gz_bridge/CHANGELOG.rst | 39 +++--- ros_gz_bridge/README.md | 115 +++++++++--------- .../ros_gz_bridge/convert/geometry_msgs.hpp | 13 ++ ros_gz_bridge/package.xml | 3 +- ros_gz_bridge/ros_gz_bridge/__init__.py | 2 +- ros_gz_bridge/ros_gz_bridge/mappings.py | 1 + ros_gz_bridge/src/convert/geometry_msgs.cpp | 20 +++ ros_gz_bridge/src/convert/sensor_msgs.cpp | 42 ++++++- ros_gz_bridge/test/utils/gz_test_msg.cpp | 21 ++++ ros_gz_bridge/test/utils/ros_test_msg.cpp | 31 +++++ ros_gz_bridge/test/utils/ros_test_msg.hpp | 9 ++ ros_gz_image/CHANGELOG.rst | 19 ++- ros_gz_image/package.xml | 2 +- ros_gz_interfaces/CHANGELOG.rst | 18 +-- ros_gz_interfaces/package.xml | 2 +- ros_gz_sim/CHANGELOG.rst | 19 ++- ros_gz_sim/package.xml | 2 +- ros_gz_sim_demos/CHANGELOG.rst | 20 ++- ros_gz_sim_demos/package.xml | 2 +- ros_ign/CHANGELOG.rst | 11 +- ros_ign/package.xml | 2 +- ros_ign_bridge/CHANGELOG.rst | 11 +- ros_ign_bridge/package.xml | 2 +- ros_ign_gazebo/CHANGELOG.rst | 15 +-- ros_ign_gazebo/package.xml | 2 +- ros_ign_gazebo_demos/CHANGELOG.rst | 11 +- ros_ign_gazebo_demos/package.xml | 2 +- ros_ign_image/CHANGELOG.rst | 11 +- ros_ign_image/package.xml | 2 +- ros_ign_interfaces/CHANGELOG.rst | 11 +- ros_ign_interfaces/package.xml | 2 +- 35 files changed, 312 insertions(+), 205 deletions(-) diff --git a/.github/workflows/ros2-ci.yml b/.github/workflows/ros2-ci.yml index a97e228cc..fb806edbf 100644 --- a/.github/workflows/ros2-ci.yml +++ b/.github/workflows/ros2-ci.yml @@ -12,13 +12,22 @@ jobs: include: - docker-image: "ubuntu:22.04" gz-version: "fortress" - ros-distro: "iron" + ros-distro: "humble" - docker-image: "ubuntu:22.04" gz-version: "garden" - ros-distro: "iron" + ros-distro: "humble" - docker-image: "ubuntu:22.04" gz-version: "harmonic" - ros-distro: "iron" + ros-distro: "humble" + - docker-image: "ubuntu:22.04" + gz-version: "fortress" + ros-distro: "rolling" + - docker-image: "ubuntu:22.04" + gz-version: "garden" + ros-distro: "rolling" + - docker-image: "ubuntu:22.04" + gz-version: "harmonic" + ros-distro: "rolling" container: image: ${{ matrix.docker-image }} steps: diff --git a/README.md b/README.md index 8dba75c23..53755a5d4 100644 --- a/README.md +++ b/README.md @@ -9,9 +9,6 @@ Galactic | Fortress | [galactic](https://github.com/gazebosim/ros_gz/tree/galact 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) | [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 @@ -58,11 +55,11 @@ This repository holds packages that provide integration between ## Install -This branch supports ROS Iron. See above for other ROS versions. +This branch supports ROS Humble. See above for other ROS versions. ### Binaries -Iron binaries are available for Fortress. +Humble binaries are available for Fortress. They are hosted at https://packages.ros.org. 1. Add https://packages.ros.org @@ -73,14 +70,14 @@ They are hosted at https://packages.ros.org. 1. Install `ros_gz` - sudo apt install ros-iron-ros-gz + sudo apt install ros-humble-ros-gz ### From source #### ROS Be sure you've installed -[ROS Iron](https://docs.ros.org/en/iron/Installation.html) +[ROS Humble](https://docs.ros.org/en/humble/Installation.html) (at least ROS-Base). More ROS dependencies will be installed below. #### Gazebo @@ -133,6 +130,22 @@ The following steps are for Linux and OSX. > try building with `colcon build --parallel-workers=1 --executor sequential`. You might also have to set `export MAKEFLAGS="-j 1"` before running `colcon build` to limit > the number of processors used to build a single package. + If `colcon build` fails with [this issue](https://github.com/gazebosim/ros_gz/issues/401) + + ``` + CMake Error at CMakeLists.txt:81 (find_package): + By not providing "Findactuator_msgs.cmake" in CMAKE_MODULE_PATH this + project has asked CMake to find a package configuration file provided by + "actuator_msgs", but CMake did not find one. + ``` + + ```bash + cd src + git clone git@github.com:rudislabs/actuator_msgs.git + cd ../ + colcon build + ``` + ## ROSCon 2022 [![](img/video_img.png)](https://vimeo.com/showcase/9954564/video/767127300) diff --git a/ros_gz/CHANGELOG.rst b/ros_gz/CHANGELOG.rst index 061e77c49..b305581d3 100644 --- a/ros_gz/CHANGELOG.rst +++ b/ros_gz/CHANGELOG.rst @@ -2,14 +2,11 @@ Changelog for package ros_gz ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -0.254.0 (2024-01-08) --------------------- - -0.247.0 (2023-11-02) --------------------- +0.244.13 (2024-01-23) +--------------------- -0.245.0 (2023-05-23) --------------------- +0.244.12 (2023-12-13) +--------------------- 0.244.11 (2023-05-23) --------------------- diff --git a/ros_gz/package.xml b/ros_gz/package.xml index 6f51c722f..1d2a50afc 100644 --- a/ros_gz/package.xml +++ b/ros_gz/package.xml @@ -4,7 +4,7 @@ ros_gz - 0.254.0 + 0.244.13 Meta-package containing interfaces for using ROS 2 with Gazebo simulation. Louise Poubel Apache 2.0 diff --git a/ros_gz_bridge/CHANGELOG.rst b/ros_gz_bridge/CHANGELOG.rst index ff693698b..afd5bb04a 100644 --- a/ros_gz_bridge/CHANGELOG.rst +++ b/ros_gz_bridge/CHANGELOG.rst @@ -2,32 +2,23 @@ Changelog for package ros_gz_bridge ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -0.254.0 (2024-01-08) --------------------- -* Backport: Add conversion for geometry_msgs/msg/TwistStamped <-> gz.msgs.Twist (`#468 `_) (`#471 `_) -* Forward Port: Add support for Harmonic/Humble pairing (`#462 `_) -* Added messages for 2D Bounding Boxes to ros_gz_bridge (`#458 `_) -* Contributors: Addisu Z. Taddese, Alejandro Hernández Cordero, Arjun K Haridas, wittenator +0.244.13 (2024-01-23) +--------------------- +* backport pr 374 (`#489 `_) +* populate imu covariances when converting (`#488 `_) +* Contributors: El Jawad Alaa -0.247.0 (2023-11-02) --------------------- -* Fix double wait in ros_gz_bridge (`#347 `_) (`#449 `_) - Co-authored-by: ymd-stella <7959916+ymd-stella@users.noreply.github.com> -* [backport iron] SensorNoise msg bridging (`#417 `_) (`#425 `_) - Co-authored-by: Aditya Pande -* Merge pull request `#420 `_ from gazebosim/ahcorde/iron/backport/411 - [backport iron] Update README.md (`#411 `_) -* Merge branch 'iron' into ahcorde/iron/backport/411 -* [backport Iron] Added Altimeter msg bridging (`#413 `_) (`#414 `_) - Co-authored-by: Aditya Pande -* Update README.md (`#411 `_) +0.244.12 (2023-12-13) +--------------------- +* Backport: Add conversion for geometry_msgs/msg/TwistStamped <-> gz.msgs.Twist (`#468 `_) (`#470 `_) +* Add support for Harmonic/Humble pairing (`#462 `_) +* Added messages for 2D Bounding Boxes to ros_gz_bridge (`#458 `_) +* Fix double wait in ros_gz_bridge (`#347 `_) (`#450 `_) +* [backport humble] SensorNoise msg bridging (`#417 `_) +* [backport humble] Added Altimeter msg bridging (`#413 `_) (`#414 `_) (`#426 `_) +* [backport humble] Update README.md (`#411 `_) The ROS type for gz.msgs.NavSat messages should be **sensor_msgs/msg/NavSatFix** instead of **sensor_msgs/msg/NavSatFixed** -* Contributors: Alejandro Hernández Cordero, Arjun K Haridas - -0.245.0 (2023-05-23) --------------------- -* Backport: Add missing rosidl_cmake dep to ros_gz_bridge (`#391 `_) (`#396 `_) -* Contributors: Michael Carroll, Yadu, Chris Lalancette +* Contributors: Addisu Z. Taddese, Alejandro Hernández Cordero, Arjun K Haridas, wittenator 0.244.11 (2023-05-23) --------------------- diff --git a/ros_gz_bridge/README.md b/ros_gz_bridge/README.md index e9a062ce3..aff3b3797 100644 --- a/ros_gz_bridge/README.md +++ b/ros_gz_bridge/README.md @@ -5,63 +5,64 @@ between ROS and Gazebo Transport. The following message types can be bridged for topics: -| ROS type | Gazebo type | -|--------------------------------------|:--------------------------------------:| -| builtin_interfaces/msg/Time | ignition::msgs::Time | -| std_msgs/msg/Bool | ignition::msgs::Boolean | -| std_msgs/msg/ColorRGBA | ignition::msgs::Color | -| std_msgs/msg/Empty | ignition::msgs::Empty | -| std_msgs/msg/Float32 | ignition::msgs::Float | -| std_msgs/msg/Float64 | ignition::msgs::Double | -| std_msgs/msg/Header | ignition::msgs::Header | -| std_msgs/msg/Int32 | ignition::msgs::Int32 | -| std_msgs/msg/UInt32 | ignition::msgs::UInt32 | -| std_msgs/msg/String | ignition::msgs::StringMsg | -| geometry_msgs/msg/Wrench | ignition::msgs::Wrench | -| geometry_msgs/msg/WrenchStamped | ignition::msgs::Wrench | -| geometry_msgs/msg/Quaternion | ignition::msgs::Quaternion | -| geometry_msgs/msg/Vector3 | ignition::msgs::Vector3d | -| geometry_msgs/msg/Point | ignition::msgs::Vector3d | -| geometry_msgs/msg/Pose | ignition::msgs::Pose | -| geometry_msgs/msg/PoseArray | ignition::msgs::Pose_V | -| geometry_msgs/msg/PoseWithCovariance | ignition::msgs::PoseWithCovariance | -| geometry_msgs/msg/PoseStamped | ignition::msgs::Pose | -| geometry_msgs/msg/Transform | ignition::msgs::Pose | -| geometry_msgs/msg/TransformStamped | ignition::msgs::Pose | -| geometry_msgs/msg/Twist | ignition::msgs::Twist | -| geometry_msgs/msg/TwistStamped | ignition::msgs::Twist | -| geometry_msgs/msg/TwistWithCovariance| ignition::msgs::TwistWithCovariance | -| nav_msgs/msg/Odometry | ignition::msgs::Odometry | -| nav_msgs/msg/Odometry | ignition::msgs::OdometryWithCovariance | -| rcl_interfaces/msg/ParameterValue | ignition::msgs::Any | -| ros_gz_interfaces/msg/Altimeter | ignition::msgs::Altimeter | -| ros_gz_interfaces/msg/Contact | ignition::msgs::Contact | -| ros_gz_interfaces/msg/Contacts | ignition::msgs::Contacts | -| ros_gz_interfaces/msg/Dataframe | ignition::msgs::Dataframe | -| ros_gz_interfaces/msg/Entity | ignition::msgs::Entity | -| ros_gz_interfaces/msg/Float32Array | ignition::msgs::Float_V | -| ros_gz_interfaces/msg/GuiCamera | ignition::msgs::GUICamera | -| ros_gz_interfaces/msg/JointWrench | ignition::msgs::JointWrench | -| ros_gz_interfaces/msg/Light | ignition::msgs::Light | -| ros_gz_interfaces/msg/SensorNoise | ignition::msgs::SensorNoise | -| ros_gz_interfaces/msg/StringVec | ignition::msgs::StringMsg_V | -| ros_gz_interfaces/msg/TrackVisual | ignition::msgs::TrackVisual | -| ros_gz_interfaces/msg/VideoRecord | ignition::msgs::VideoRecord | -| ros_gz_interfaces/msg/WorldControl | ignition::msgs::WorldControl | -| rosgraph_msgs/msg/Clock | ignition::msgs::Clock | -| sensor_msgs/msg/BatteryState | ignition::msgs::BatteryState | -| sensor_msgs/msg/CameraInfo | ignition::msgs::CameraInfo | -| sensor_msgs/msg/FluidPressure | ignition::msgs::FluidPressure | -| sensor_msgs/msg/Imu | ignition::msgs::IMU | -| sensor_msgs/msg/Image | ignition::msgs::Image | -| sensor_msgs/msg/JointState | ignition::msgs::Model | -| sensor_msgs/msg/Joy | ignition::msgs::Joy | -| sensor_msgs/msg/LaserScan | ignition::msgs::LaserScan | -| sensor_msgs/msg/MagneticField | ignition::msgs::Magnetometer | -| sensor_msgs/msg/NavSatFix | ignition::msgs::NavSat | -| sensor_msgs/msg/PointCloud2 | ignition::msgs::PointCloudPacked | -| tf2_msgs/msg/TFMessage | ignition::msgs::Pose_V | -| trajectory_msgs/msg/JointTrajectory | ignition::msgs::JointTrajectory | +| ROS type | Gazebo type | +|---------------------------------------------|:--------------------------------------:| +| builtin_interfaces/msg/Time | ignition::msgs::Time | +| std_msgs/msg/Bool | ignition::msgs::Boolean | +| std_msgs/msg/ColorRGBA | ignition::msgs::Color | +| std_msgs/msg/Empty | ignition::msgs::Empty | +| std_msgs/msg/Float32 | ignition::msgs::Float | +| std_msgs/msg/Float64 | ignition::msgs::Double | +| std_msgs/msg/Header | ignition::msgs::Header | +| std_msgs/msg/Int32 | ignition::msgs::Int32 | +| std_msgs/msg/UInt32 | ignition::msgs::UInt32 | +| std_msgs/msg/String | ignition::msgs::StringMsg | +| geometry_msgs/msg/Wrench | ignition::msgs::Wrench | +| geometry_msgs/msg/WrenchStamped | ignition::msgs::Wrench | +| geometry_msgs/msg/Quaternion | ignition::msgs::Quaternion | +| geometry_msgs/msg/Vector3 | ignition::msgs::Vector3d | +| geometry_msgs/msg/Point | ignition::msgs::Vector3d | +| geometry_msgs/msg/Pose | ignition::msgs::Pose | +| geometry_msgs/msg/PoseArray | ignition::msgs::Pose_V | +| geometry_msgs/msg/PoseWithCovariance | ignition::msgs::PoseWithCovariance | +| geometry_msgs/msg/PoseStamped | ignition::msgs::Pose | +| geometry_msgs/msg/Transform | ignition::msgs::Pose | +| geometry_msgs/msg/TransformStamped | ignition::msgs::Pose | +| geometry_msgs/msg/Twist | ignition::msgs::Twist | +| geometry_msgs/msg/TwistStamped | ignition::msgs::Twist | +| geometry_msgs/msg/TwistWithCovariance | ignition::msgs::TwistWithCovariance | +| geometry_msgs/msg/TwistWithCovarianceStamped| ignition::msgs::TwistWithCovariance | +| nav_msgs/msg/Odometry | ignition::msgs::Odometry | +| nav_msgs/msg/Odometry | ignition::msgs::OdometryWithCovariance | +| rcl_interfaces/msg/ParameterValue | ignition::msgs::Any | +| ros_gz_interfaces/msg/Altimeter | ignition::msgs::Altimeter | +| ros_gz_interfaces/msg/Contact | ignition::msgs::Contact | +| ros_gz_interfaces/msg/Contacts | ignition::msgs::Contacts | +| ros_gz_interfaces/msg/Dataframe | ignition::msgs::Dataframe | +| ros_gz_interfaces/msg/Entity | ignition::msgs::Entity | +| ros_gz_interfaces/msg/Float32Array | ignition::msgs::Float_V | +| ros_gz_interfaces/msg/GuiCamera | ignition::msgs::GUICamera | +| ros_gz_interfaces/msg/JointWrench | ignition::msgs::JointWrench | +| ros_gz_interfaces/msg/Light | ignition::msgs::Light | +| ros_gz_interfaces/msg/SensorNoise | ignition::msgs::SensorNoise | +| ros_gz_interfaces/msg/StringVec | ignition::msgs::StringMsg_V | +| ros_gz_interfaces/msg/TrackVisual | ignition::msgs::TrackVisual | +| ros_gz_interfaces/msg/VideoRecord | ignition::msgs::VideoRecord | +| ros_gz_interfaces/msg/WorldControl | ignition::msgs::WorldControl | +| rosgraph_msgs/msg/Clock | ignition::msgs::Clock | +| sensor_msgs/msg/BatteryState | ignition::msgs::BatteryState | +| sensor_msgs/msg/CameraInfo | ignition::msgs::CameraInfo | +| sensor_msgs/msg/FluidPressure | ignition::msgs::FluidPressure | +| sensor_msgs/msg/Imu | ignition::msgs::IMU | +| sensor_msgs/msg/Image | ignition::msgs::Image | +| sensor_msgs/msg/JointState | ignition::msgs::Model | +| sensor_msgs/msg/Joy | ignition::msgs::Joy | +| sensor_msgs/msg/LaserScan | ignition::msgs::LaserScan | +| sensor_msgs/msg/MagneticField | ignition::msgs::Magnetometer | +| sensor_msgs/msg/NavSatFix | ignition::msgs::NavSat | +| sensor_msgs/msg/PointCloud2 | ignition::msgs::PointCloudPacked | +| tf2_msgs/msg/TFMessage | ignition::msgs::Pose_V | +| trajectory_msgs/msg/JointTrajectory | ignition::msgs::JointTrajectory | And the following for services: diff --git a/ros_gz_bridge/include/ros_gz_bridge/convert/geometry_msgs.hpp b/ros_gz_bridge/include/ros_gz_bridge/convert/geometry_msgs.hpp index 43860e69f..70537def2 100644 --- a/ros_gz_bridge/include/ros_gz_bridge/convert/geometry_msgs.hpp +++ b/ros_gz_bridge/include/ros_gz_bridge/convert/geometry_msgs.hpp @@ -36,6 +36,7 @@ #include #include #include +#include #include #include @@ -189,6 +190,18 @@ convert_gz_to_ros( const gz::msgs::TwistWithCovariance & gz_msg, geometry_msgs::msg::TwistWithCovariance & ros_msg); +template<> +void +convert_ros_to_gz( + const geometry_msgs::msg::TwistWithCovarianceStamped & ros_msg, + gz::msgs::TwistWithCovariance & gz_msg); + +template<> +void +convert_gz_to_ros( + const gz::msgs::TwistWithCovariance & gz_msg, + geometry_msgs::msg::TwistWithCovarianceStamped & ros_msg); + template<> void convert_ros_to_gz( diff --git a/ros_gz_bridge/package.xml b/ros_gz_bridge/package.xml index 7271180c4..704b7fd4d 100644 --- a/ros_gz_bridge/package.xml +++ b/ros_gz_bridge/package.xml @@ -2,7 +2,7 @@ ros_gz_bridge - 0.254.0 + 0.244.13 Bridge communication between ROS and Gazebo Transport Louise Poubel @@ -12,7 +12,6 @@ ament_cmake pkg-config - rosidl_pycommon actuator_msgs geometry_msgs diff --git a/ros_gz_bridge/ros_gz_bridge/__init__.py b/ros_gz_bridge/ros_gz_bridge/__init__.py index c0aaa4847..b92918405 100644 --- a/ros_gz_bridge/ros_gz_bridge/__init__.py +++ b/ros_gz_bridge/ros_gz_bridge/__init__.py @@ -18,7 +18,7 @@ from ros_gz_bridge.mappings import MAPPINGS, MAPPINGS_8_4_0 -from rosidl_pycommon import expand_template +from rosidl_cmake import expand_template @dataclass diff --git a/ros_gz_bridge/ros_gz_bridge/mappings.py b/ros_gz_bridge/ros_gz_bridge/mappings.py index c8788c894..649fd6e34 100644 --- a/ros_gz_bridge/ros_gz_bridge/mappings.py +++ b/ros_gz_bridge/ros_gz_bridge/mappings.py @@ -42,6 +42,7 @@ Mapping('Twist', 'Twist'), Mapping('TwistStamped', 'Twist'), Mapping('TwistWithCovariance', 'TwistWithCovariance'), + Mapping('TwistWithCovarianceStamped', 'TwistWithCovariance'), Mapping('Wrench', 'Wrench'), Mapping('WrenchStamped', 'Wrench'), Mapping('Vector3', 'Vector3d'), diff --git a/ros_gz_bridge/src/convert/geometry_msgs.cpp b/ros_gz_bridge/src/convert/geometry_msgs.cpp index 60ae14136..ad83ba6dc 100644 --- a/ros_gz_bridge/src/convert/geometry_msgs.cpp +++ b/ros_gz_bridge/src/convert/geometry_msgs.cpp @@ -306,6 +306,26 @@ convert_gz_to_ros( } } +template<> +void +convert_ros_to_gz( + const geometry_msgs::msg::TwistWithCovarianceStamped & ros_msg, + gz::msgs::TwistWithCovariance & gz_msg) +{ + convert_ros_to_gz(ros_msg.header, (*gz_msg.mutable_twist()->mutable_header())); + convert_ros_to_gz(ros_msg.twist, gz_msg); +} + +template<> +void +convert_gz_to_ros( + const gz::msgs::TwistWithCovariance & gz_msg, + geometry_msgs::msg::TwistWithCovarianceStamped & ros_msg) +{ + convert_gz_to_ros(gz_msg.twist().header(), ros_msg.header); + convert_gz_to_ros(gz_msg, ros_msg.twist); +} + template<> void convert_ros_to_gz( diff --git a/ros_gz_bridge/src/convert/sensor_msgs.cpp b/ros_gz_bridge/src/convert/sensor_msgs.cpp index cddc4f004..887f16d0f 100644 --- a/ros_gz_bridge/src/convert/sensor_msgs.cpp +++ b/ros_gz_bridge/src/convert/sensor_msgs.cpp @@ -17,6 +17,12 @@ #include "convert/utils.hpp" #include "ros_gz_bridge/convert/sensor_msgs.hpp" +#include "gz/msgs/config.hh" + +#if GZ_MSGS_MAJOR_VERSION >= 10 +#define GZ_MSGS_IMU_HAS_COVARIANCE +#endif + namespace ros_gz_bridge { @@ -274,6 +280,18 @@ convert_ros_to_gz( convert_ros_to_gz(ros_msg.orientation, (*gz_msg.mutable_orientation())); convert_ros_to_gz(ros_msg.angular_velocity, (*gz_msg.mutable_angular_velocity())); convert_ros_to_gz(ros_msg.linear_acceleration, (*gz_msg.mutable_linear_acceleration())); + +#ifdef GZ_MSGS_IMU_HAS_COVARIANCE + for (const auto & elem : ros_msg.linear_acceleration_covariance) { + gz_msg.mutable_linear_acceleration_covariance()->add_data(elem); + } + for (const auto & elem : ros_msg.orientation_covariance) { + gz_msg.mutable_orientation_covariance()->add_data(elem); + } + for (const auto & elem : ros_msg.angular_velocity_covariance) { + gz_msg.mutable_angular_velocity_covariance()->add_data(elem); + } +#endif } template<> @@ -287,7 +305,29 @@ convert_gz_to_ros( convert_gz_to_ros(gz_msg.angular_velocity(), ros_msg.angular_velocity); convert_gz_to_ros(gz_msg.linear_acceleration(), ros_msg.linear_acceleration); - // Covariances not supported in gz::msgs::IMU +#ifdef GZ_MSGS_IMU_HAS_COVARIANCE + int data_size = gz_msg.linear_acceleration_covariance().data_size(); + if (data_size == 9) { + for (int i = 0; i < data_size; ++i) { + auto data = gz_msg.linear_acceleration_covariance().data()[i]; + ros_msg.linear_acceleration_covariance[i] = data; + } + } + data_size = gz_msg.angular_velocity_covariance().data_size(); + if (data_size == 9) { + for (int i = 0; i < data_size; ++i) { + auto data = gz_msg.angular_velocity_covariance().data()[i]; + ros_msg.angular_velocity_covariance[i] = data; + } + } + data_size = gz_msg.orientation_covariance().data_size(); + if (data_size == 9) { + for (int i = 0; i < data_size; ++i) { + auto data = gz_msg.orientation_covariance().data()[i]; + ros_msg.orientation_covariance[i] = data; + } + } +#endif } template<> diff --git a/ros_gz_bridge/test/utils/gz_test_msg.cpp b/ros_gz_bridge/test/utils/gz_test_msg.cpp index 505ed9228..0bfdea1db 100644 --- a/ros_gz_bridge/test/utils/gz_test_msg.cpp +++ b/ros_gz_bridge/test/utils/gz_test_msg.cpp @@ -19,6 +19,10 @@ #include #include +#if GZ_MSGS_MAJOR_VERSION >= 10 +#define GZ_MSGS_IMU_HAS_COVARIANCE +#endif + namespace ros_gz_bridge { namespace testing @@ -428,12 +432,15 @@ void createTestMsg(gz::msgs::TwistWithCovariance & _msg) { gz::msgs::Vector3d linear_msg; gz::msgs::Vector3d angular_msg; + gz::msgs::Header header_msg; createTestMsg(linear_msg); createTestMsg(angular_msg); + createTestMsg(header_msg); _msg.mutable_twist()->mutable_linear()->CopyFrom(linear_msg); _msg.mutable_twist()->mutable_angular()->CopyFrom(angular_msg); + _msg.mutable_twist()->mutable_header()->CopyFrom(header_msg); for (int i = 0; i < 36; i++) { _msg.mutable_covariance()->add_data(i); } @@ -810,6 +817,13 @@ void createTestMsg(gz::msgs::IMU & _msg) _msg.mutable_orientation()->CopyFrom(quaternion_msg); _msg.mutable_angular_velocity()->CopyFrom(vector3_msg); _msg.mutable_linear_acceleration()->CopyFrom(vector3_msg); +#ifdef GZ_MSGS_IMU_HAS_COVARIANCE + for (int i = 0; i < 9; i++) { + _msg.mutable_orientation_covariance()->add_data(i + 1); + _msg.mutable_angular_velocity_covariance()->add_data(i + 1); + _msg.mutable_linear_acceleration_covariance()->add_data(i + 1); + } +#endif } void compareTestMsg(const std::shared_ptr & _msg) @@ -818,6 +832,13 @@ void compareTestMsg(const std::shared_ptr & _msg) compareTestMsg(std::make_shared(_msg->orientation())); compareTestMsg(std::make_shared(_msg->angular_velocity())); compareTestMsg(std::make_shared(_msg->linear_acceleration())); +#ifdef GZ_MSGS_IMU_HAS_COVARIANCE + for (int i = 0; i < 9; i++) { + EXPECT_EQ(_msg->orientation_covariance().data(i), i + 1); + EXPECT_EQ(_msg->angular_velocity_covariance().data(i), i + 1); + EXPECT_EQ(_msg->linear_acceleration_covariance().data(i), i + 1); + } +#endif } void createTestMsg(gz::msgs::Axis & _msg) diff --git a/ros_gz_bridge/test/utils/ros_test_msg.cpp b/ros_gz_bridge/test/utils/ros_test_msg.cpp index 6c30e98bb..efca25eaa 100644 --- a/ros_gz_bridge/test/utils/ros_test_msg.cpp +++ b/ros_gz_bridge/test/utils/ros_test_msg.cpp @@ -19,6 +19,12 @@ #include #include +#include "gz/msgs/config.hh" + +#if GZ_MSGS_MAJOR_VERSION >= 10 +#define GZ_MSGS_IMU_HAS_COVARIANCE +#endif + namespace ros_gz_bridge { namespace testing @@ -477,6 +483,18 @@ void compareTestMsg(const std::shared_ptr & _msg) +{ + compareTestMsg(std::make_shared(_msg->twist)); + compareTestMsg(std::make_shared(_msg->header)); +} + void createTestMsg(geometry_msgs::msg::Wrench & _msg) { createTestMsg(_msg.force); @@ -1022,6 +1040,11 @@ void createTestMsg(sensor_msgs::msg::Imu & _msg) _msg.orientation = quaternion_msg; _msg.angular_velocity = vector3_msg; _msg.linear_acceleration = vector3_msg; +#ifdef GZ_MSGS_IMU_HAS_COVARIANCE + _msg.orientation_covariance = {1, 2, 3, 4, 5, 6, 7, 8, 9}; + _msg.angular_velocity_covariance = {1, 2, 3, 4, 5, 6, 7, 8, 9}; + _msg.linear_acceleration_covariance = {1, 2, 3, 4, 5, 6, 7, 8, 9}; +#endif } void compareTestMsg(const std::shared_ptr & _msg) @@ -1030,6 +1053,14 @@ void compareTestMsg(const std::shared_ptr & _msg) compareTestMsg(_msg->orientation); compareTestMsg(std::make_shared(_msg->angular_velocity)); compareTestMsg(std::make_shared(_msg->linear_acceleration)); + +#ifdef GZ_MSGS_IMU_HAS_COVARIANCE + for (int i = 0; i < 9; ++i) { + EXPECT_EQ(_msg->orientation_covariance[i], i + 1); + EXPECT_EQ(_msg->angular_velocity_covariance[i], i + 1); + EXPECT_EQ(_msg->linear_acceleration_covariance[i], i + 1); + } +#endif } void createTestMsg(sensor_msgs::msg::JointState & _msg) diff --git a/ros_gz_bridge/test/utils/ros_test_msg.hpp b/ros_gz_bridge/test/utils/ros_test_msg.hpp index d1e6caf24..589f4de19 100644 --- a/ros_gz_bridge/test/utils/ros_test_msg.hpp +++ b/ros_gz_bridge/test/utils/ros_test_msg.hpp @@ -40,6 +40,7 @@ #include #include #include +#include #include #include #include @@ -314,6 +315,14 @@ void createTestMsg(geometry_msgs::msg::TwistWithCovariance & _msg); /// \param[in] _msg The message to compare. void compareTestMsg(const std::shared_ptr & _msg); +/// \brief Create a message used for testing. +/// \param[out] _msg The message populated. +void createTestMsg(geometry_msgs::msg::TwistWithCovarianceStamped & _msg); + +/// \brief Compare a message with the populated for testing. +/// \param[in] _msg The message to compare +void compareTestMsg(const std::shared_ptr & _msg); + /// \brief Create a message used for testing. /// \param[out] _msg The message populated. void createTestMsg(geometry_msgs::msg::Wrench & _msg); diff --git a/ros_gz_image/CHANGELOG.rst b/ros_gz_image/CHANGELOG.rst index 641167b2a..328917c9e 100644 --- a/ros_gz_image/CHANGELOG.rst +++ b/ros_gz_image/CHANGELOG.rst @@ -2,19 +2,14 @@ Changelog for package ros1_ign_image ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -0.254.0 (2024-01-08) --------------------- -* Forward port: Add support for Harmonic/Humble pairing (`#462 `_) -* Contributors: Addisu Z. Taddese, Alejandro Hernández Cordero - -0.247.0 (2023-11-02) --------------------- -* Fix double wait in ros_gz_bridge (`#347 `_) (`#449 `_) - Co-authored-by: ymd-stella <7959916+ymd-stella@users.noreply.github.com> -* Contributors: Alejandro Hernández Cordero +0.244.13 (2024-01-23) +--------------------- -0.245.0 (2023-05-23) --------------------- +0.244.12 (2023-12-13) +--------------------- +* Add support for Harmonic/Humble pairing (`#462 `_) +* Fix double wait in ros_gz_bridge (`#347 `_) (`#450 `_) +* Contributors: Addisu Z. Taddese, Alejandro Hernández Cordero 0.244.11 (2023-05-23) --------------------- diff --git a/ros_gz_image/package.xml b/ros_gz_image/package.xml index 02bfdc37e..e524cafdb 100644 --- a/ros_gz_image/package.xml +++ b/ros_gz_image/package.xml @@ -1,6 +1,6 @@ ros_gz_image - 0.254.0 + 0.244.13 Image utilities for Gazebo simulation with ROS. Apache 2.0 Louise Poubel diff --git a/ros_gz_interfaces/CHANGELOG.rst b/ros_gz_interfaces/CHANGELOG.rst index bcbbe5065..abe9c879d 100644 --- a/ros_gz_interfaces/CHANGELOG.rst +++ b/ros_gz_interfaces/CHANGELOG.rst @@ -2,21 +2,15 @@ Changelog for package ros_gz_interfaces ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -0.254.0 (2024-01-08) --------------------- +0.244.13 (2024-01-23) +--------------------- -0.247.0 (2023-11-02) --------------------- -* [backport iron] SensorNoise msg bridging (`#417 `_) (`#425 `_) - Co-authored-by: Aditya Pande -* Merge branch 'iron' into ahcorde/iron/backport/411 -* [backport Iron] Added Altimeter msg bridging (`#413 `_) (`#414 `_) - Co-authored-by: Aditya Pande +0.244.12 (2023-12-13) +--------------------- +* [backport humble] SensorNoise msg bridging (`#417 `_) +* [backport humble] Added Altimeter msg bridging (`#413 `_) (`#414 `_) (`#426 `_) * Contributors: Alejandro Hernández Cordero -0.245.0 (2023-05-23) --------------------- - 0.244.11 (2023-05-23) --------------------- diff --git a/ros_gz_interfaces/package.xml b/ros_gz_interfaces/package.xml index 37d0ac70a..c6cdb2a5b 100644 --- a/ros_gz_interfaces/package.xml +++ b/ros_gz_interfaces/package.xml @@ -1,6 +1,6 @@ ros_gz_interfaces - 0.254.0 + 0.244.13 Message and service data structures for interacting with Gazebo from ROS2. Apache 2.0 Louise Poubel diff --git a/ros_gz_sim/CHANGELOG.rst b/ros_gz_sim/CHANGELOG.rst index 0cf0bb660..4a13427ef 100644 --- a/ros_gz_sim/CHANGELOG.rst +++ b/ros_gz_sim/CHANGELOG.rst @@ -2,19 +2,14 @@ Changelog for package ros_gz_sim ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -0.254.0 (2024-01-08) --------------------- -* Forward port: Add support for Harmonic/Humble pairing (`#462 `_) -* Contributors: Addisu Z. Taddese, Michael Carroll - -0.247.0 (2023-11-02) --------------------- -* set on_exit_shutdown argument for gz-sim ExecuteProcess (`#355 `_) (`#452 `_) - Co-authored-by: andermi -* Contributors: Michael Carroll +0.244.13 (2024-01-23) +--------------------- -0.245.0 (2023-05-23) --------------------- +0.244.12 (2023-12-13) +--------------------- +* Add support for Harmonic/Humble pairing (`#462 `_) +* Set on_exit_shutdown argument for gz-sim ExecuteProcess (`#355 `_) (`#451 `_) +* Contributors: Addisu Z. Taddese, Michael Carroll 0.244.11 (2023-05-23) --------------------- diff --git a/ros_gz_sim/package.xml b/ros_gz_sim/package.xml index 963034c51..181c31997 100644 --- a/ros_gz_sim/package.xml +++ b/ros_gz_sim/package.xml @@ -2,7 +2,7 @@ ros_gz_sim - 0.254.0 + 0.244.13 Tools for using Gazebo Sim simulation with ROS. Alejandro Hernandez diff --git a/ros_gz_sim_demos/CHANGELOG.rst b/ros_gz_sim_demos/CHANGELOG.rst index 33101edda..377c19d58 100644 --- a/ros_gz_sim_demos/CHANGELOG.rst +++ b/ros_gz_sim_demos/CHANGELOG.rst @@ -2,19 +2,15 @@ Changelog for package ros1_gz_sim_demos ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -0.254.0 (2024-01-08) --------------------- - -0.247.0 (2023-11-02) --------------------- -* Merge branch 'iron' into ahcorde/iron/backport/411 -* Added more topic to the bridge (`#422 `_) (`#423 `_) -* Fix incorrect subscription on demo (`#405 `_) (`#407 `_) - Co-authored-by: Arjo Chakravarty -* Contributors: Alejandro Hernández Cordero +0.244.13 (2024-01-23) +--------------------- -0.245.0 (2023-05-23) --------------------- +0.244.12 (2023-12-13) +--------------------- +* [backport Humble] Added more topic to the bridge (`#422 `_) +* Added more topic to the bridge (`#422 `_) +* Fix incorrect subscription on demo (`#405 `_) +* Contributors: Alejandro Hernández Cordero, Arjo Chakravarty 0.244.11 (2023-05-23) --------------------- diff --git a/ros_gz_sim_demos/package.xml b/ros_gz_sim_demos/package.xml index 1b7da7363..15bf28dc1 100644 --- a/ros_gz_sim_demos/package.xml +++ b/ros_gz_sim_demos/package.xml @@ -1,6 +1,6 @@ ros_gz_sim_demos - 0.254.0 + 0.244.13 Demos using Gazebo Sim simulation with ROS. Apache 2.0 Louise Poubel diff --git a/ros_ign/CHANGELOG.rst b/ros_ign/CHANGELOG.rst index 2cb8cc53e..ce4c46463 100644 --- a/ros_ign/CHANGELOG.rst +++ b/ros_ign/CHANGELOG.rst @@ -2,14 +2,11 @@ Changelog for package ros_ign ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -0.254.0 (2024-01-08) --------------------- - -0.247.0 (2023-11-02) --------------------- +0.244.13 (2024-01-23) +--------------------- -0.245.0 (2023-05-23) --------------------- +0.244.12 (2023-12-13) +--------------------- 0.244.11 (2023-05-23) --------------------- diff --git a/ros_ign/package.xml b/ros_ign/package.xml index 74a3b46f6..2e2933896 100644 --- a/ros_ign/package.xml +++ b/ros_ign/package.xml @@ -2,7 +2,7 @@ ros_ign - 0.254.0 + 0.244.13 Shim meta-package to redirect to ros_gz. Brandon Ong Apache 2.0 diff --git a/ros_ign_bridge/CHANGELOG.rst b/ros_ign_bridge/CHANGELOG.rst index a54fdedec..17b74fd3b 100644 --- a/ros_ign_bridge/CHANGELOG.rst +++ b/ros_ign_bridge/CHANGELOG.rst @@ -2,14 +2,11 @@ Changelog for package ros_ign_bridge ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -0.254.0 (2024-01-08) --------------------- - -0.247.0 (2023-11-02) --------------------- +0.244.13 (2024-01-23) +--------------------- -0.245.0 (2023-05-23) --------------------- +0.244.12 (2023-12-13) +--------------------- 0.244.11 (2023-05-23) --------------------- diff --git a/ros_ign_bridge/package.xml b/ros_ign_bridge/package.xml index eb89a1c17..ccf61c4d6 100644 --- a/ros_ign_bridge/package.xml +++ b/ros_ign_bridge/package.xml @@ -2,7 +2,7 @@ ros_ign_bridge - 0.254.0 + 0.244.13 Shim package to redirect to ros_gz_bridge. Brandon Ong diff --git a/ros_ign_gazebo/CHANGELOG.rst b/ros_ign_gazebo/CHANGELOG.rst index 9866326f0..2f10998c3 100644 --- a/ros_ign_gazebo/CHANGELOG.rst +++ b/ros_ign_gazebo/CHANGELOG.rst @@ -2,16 +2,13 @@ Changelog for package ros_ign_gazebo ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -0.254.0 (2024-01-08) --------------------- -* Forward Port: Add support for Harmonic/Humble pairing (`#462 `_) -* Contributors: Addisu Z. Taddese - -0.247.0 (2023-11-02) --------------------- +0.244.13 (2024-01-23) +--------------------- -0.245.0 (2023-05-23) --------------------- +0.244.12 (2023-12-13) +--------------------- +* Add support for Harmonic/Humble pairing (`#462 `_) +* Contributors: Addisu Z. Taddese 0.244.11 (2023-05-23) --------------------- diff --git a/ros_ign_gazebo/package.xml b/ros_ign_gazebo/package.xml index 34b00f1f7..9568dec53 100644 --- a/ros_ign_gazebo/package.xml +++ b/ros_ign_gazebo/package.xml @@ -2,7 +2,7 @@ ros_ign_gazebo - 0.254.0 + 0.244.13 Shim package to redirect to ros_gz_sim. Brandon Ong diff --git a/ros_ign_gazebo_demos/CHANGELOG.rst b/ros_ign_gazebo_demos/CHANGELOG.rst index 2ee302bfc..7edbe3359 100644 --- a/ros_ign_gazebo_demos/CHANGELOG.rst +++ b/ros_ign_gazebo_demos/CHANGELOG.rst @@ -2,14 +2,11 @@ Changelog for package ros_ign_gazebo_demos ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -0.254.0 (2024-01-08) --------------------- - -0.247.0 (2023-11-02) --------------------- +0.244.13 (2024-01-23) +--------------------- -0.245.0 (2023-05-23) --------------------- +0.244.12 (2023-12-13) +--------------------- 0.244.11 (2023-05-23) --------------------- diff --git a/ros_ign_gazebo_demos/package.xml b/ros_ign_gazebo_demos/package.xml index 5328cb4be..77bb5ad71 100644 --- a/ros_ign_gazebo_demos/package.xml +++ b/ros_ign_gazebo_demos/package.xml @@ -1,6 +1,6 @@ ros_ign_gazebo_demos - 0.254.0 + 0.244.13 Shim package to redirect to ros_gz_sim_demos. Apache 2.0 Brandon Ong diff --git a/ros_ign_image/CHANGELOG.rst b/ros_ign_image/CHANGELOG.rst index 1bd270824..ebc65c75e 100644 --- a/ros_ign_image/CHANGELOG.rst +++ b/ros_ign_image/CHANGELOG.rst @@ -2,14 +2,11 @@ Changelog for package ros_ign_image ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -0.254.0 (2024-01-08) --------------------- - -0.247.0 (2023-11-02) --------------------- +0.244.13 (2024-01-23) +--------------------- -0.245.0 (2023-05-23) --------------------- +0.244.12 (2023-12-13) +--------------------- 0.244.11 (2023-05-23) --------------------- diff --git a/ros_ign_image/package.xml b/ros_ign_image/package.xml index 8f4c69f9f..2b69c8d57 100644 --- a/ros_ign_image/package.xml +++ b/ros_ign_image/package.xml @@ -2,7 +2,7 @@ ros_ign_image - 0.254.0 + 0.244.13 Shim package to redirect to ros_gz_image. Brandon Ong diff --git a/ros_ign_interfaces/CHANGELOG.rst b/ros_ign_interfaces/CHANGELOG.rst index 6b403b9ec..4a008fd4b 100644 --- a/ros_ign_interfaces/CHANGELOG.rst +++ b/ros_ign_interfaces/CHANGELOG.rst @@ -2,14 +2,11 @@ Changelog for package ros_ign_interfaces ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -0.254.0 (2024-01-08) --------------------- - -0.247.0 (2023-11-02) --------------------- +0.244.13 (2024-01-23) +--------------------- -0.245.0 (2023-05-23) --------------------- +0.244.12 (2023-12-13) +--------------------- 0.244.11 (2023-05-23) --------------------- diff --git a/ros_ign_interfaces/package.xml b/ros_ign_interfaces/package.xml index a7bb8aabf..61d040a1d 100644 --- a/ros_ign_interfaces/package.xml +++ b/ros_ign_interfaces/package.xml @@ -1,6 +1,6 @@ ros_ign_interfaces - 0.254.0 + 0.244.13 Shim package to redirect to ros_gz_interfaces. Apache 2.0 Brandon Ong