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

Merge iron ➡️ jazzy #569

Merged
merged 77 commits into from
Jun 25, 2024
Merged
Changes from 1 commit
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
591b8b5
Fix humble branch names in humble branch (#388)
mjcarroll May 5, 2023
846323f
Add actuator_msgs to humble bridge. (#394)
bperseghetti May 23, 2023
b64df31
0.244.11
mjcarroll May 23, 2023
18b3403
Backport: Add missing rosidl_cmake dep to ros_gz_bridge (#391) (#396)
mjcarroll May 23, 2023
8aa41ed
0.245.0
mjcarroll May 23, 2023
1893dec
Fix incorrect subscription on demo (#405)
arjo129 Jun 6, 2023
277a2f2
Fix incorrect subscription on demo (#405) (#407)
ahcorde Jun 8, 2023
bac02a3
Update README.md (#411)
topguns837 Jun 12, 2023
f0479c2
Update README.md (#411)
topguns837 Jun 12, 2023
1b330a5
Added more topic to the bridge (#422)
ahcorde Jun 16, 2023
942e5ae
Added more topic to the bridge (#422) (#423)
ahcorde Jun 20, 2023
f923bcf
Merge pull request #424 from gazebosim/ahcorde/humble/bp/422
ahcorde Jun 20, 2023
a3071cf
[backport Iron] Added Altimeter msg bridging (#413) (#414)
ahcorde Jun 21, 2023
0f8e223
Merge pull request #421 from gazebosim/ahcorde/humble/backport/411
ahcorde Jun 21, 2023
9b76826
Merge branch 'iron' into ahcorde/iron/backport/411
ahcorde Jun 21, 2023
e80ee5b
Merge pull request #420 from gazebosim/ahcorde/iron/backport/411
ahcorde Jun 21, 2023
bdfe874
[backport Iron] Added Altimeter msg bridging (#413) (#414) (#426)
ahcorde Jun 21, 2023
115aa6b
[backport iron] SensorNoise msg bridging (#417) (#425)
ahcorde Jun 21, 2023
6d12a72
[backport iron] SensorNoise msg bridging (#417) (#425)
ahcorde Jun 21, 2023
c09b704
Merge pull request #427 from gazebosim/ahcorde/humble/backport/417
ahcorde Jun 22, 2023
4a42e94
Add link to project template (#428)
azeey Jun 22, 2023
fc3d05f
Add link to project template (#428)
azeey Jun 22, 2023
3348a9c
Merge pull request #429 from gazebosim/ahcorde/iron/backport/428
ahcorde Jun 22, 2023
a587cfa
Merge pull request #430 from gazebosim/ahcorde/humble/backport/428
ahcorde Jun 22, 2023
d7b7235
Fixed install instructions (#435) (#436)
ahcorde Jul 17, 2023
eb63bce
Fixed install instructions (#435) (#437)
ahcorde Jul 17, 2023
4a5972b
Improved docs (#438)
ahcorde Jul 18, 2023
f5af9be
Improved Iron documentation (#439)
ahcorde Jul 18, 2023
0ed5e2c
Update README.md to fix humble from source instructions (#431)
djsamseng Aug 22, 2023
151d3d8
Fix double wait in ros_gz_bridge (#347) (#450)
ahcorde Sep 13, 2023
e93c35d
Fix double wait in ros_gz_bridge (#347) (#449)
ahcorde Sep 13, 2023
0585429
set on_exit_shutdown argument for gz-sim ExecuteProcess (#355) (#451)
mjcarroll Sep 21, 2023
bc4f777
set on_exit_shutdown argument for gz-sim ExecuteProcess (#355) (#452)
mjcarroll Sep 21, 2023
2733a3e
Changelog
ahcorde Nov 2, 2023
2e6b408
0.247.0
ahcorde Nov 2, 2023
55eebea
Added messages for 2D Bounding Boxes to ros_gz_bridge (#458)
wittenator Nov 9, 2023
4cf2da6
Added messages for 2D Bounding Boxes to ros_gz_bridge (#458) (#460)
wittenator Nov 13, 2023
514d53c
Add support for Harmonic/Humble pairing (#462)
azeey Nov 15, 2023
1205938
Merge humble into iron
azeey Dec 1, 2023
4b3ee9e
Backport: Add conversion for geometry_msgs/msg/TwistStamped <-> gz.ms…
azeey Dec 12, 2023
c22e289
Merge pull request #467 from gazebosim/azeey/fwd_humble
azeey Dec 13, 2023
ced7387
Backport: Add conversion for geometry_msgs/msg/TwistStamped <-> gz.ms…
azeey Dec 13, 2023
d598e13
Changelog
azeey Dec 13, 2023
78d3398
0.244.12
azeey Dec 13, 2023
bdf138e
Add tip about non-parallel builds to README (#477) (#479)
ahcorde Jan 3, 2024
f09a391
Add tip about non-parallel builds to README (#477) (#478)
ahcorde Jan 3, 2024
84d5d27
Additional tip for limiting number of cpus (#480) (#481)
ahcorde Jan 4, 2024
9e04831
Additional tip for limiting number of cpus (#480) (#482)
ahcorde Jan 4, 2024
6810c20
0.254.0 (#485)
azeey Jan 9, 2024
d36e371
populate imu covariances when converting (#488)
ejalaa12 Jan 23, 2024
3abc34f
backport pr 374 (#489)
ejalaa12 Jan 23, 2024
60ac078
Changelog
ahcorde Jan 23, 2024
6af4c0a
0.244.13
ahcorde Jan 23, 2024
b5dffde
Add option to change material color from ROS. (#486)
bperseghetti Feb 1, 2024
8233fbd
Add a virtual destructor to suppress compiler warning (#502) (#504)
ahcorde Feb 23, 2024
3a3d22a
Add a virtual destructor to suppress compiler warning (#502) (#505)
ahcorde Feb 23, 2024
0367d9a
Correctly export ros_gz_bridge for downstream targets (#503) (#507)
mjcarroll Feb 23, 2024
a6f58b6
Correctly export ros_gz_bridge for downstream targets (#503) (#506)
mjcarroll Feb 23, 2024
13e5592
Support `<gazebo_ros>` in `package.xml` exports (#492)
azeey Mar 11, 2024
0b7c5e9
Add ROS namespaces to GZ topics (#512)
Kotochleb Mar 20, 2024
b986388
[forward iron] Add ROS namespaces to GZ topics (#516)
ahcorde Mar 25, 2024
d37b806
Add option to change material color from ROS. (#520)
bperseghetti Mar 27, 2024
c91acf5
Added conversion for Detection3D and Detection3DArray (#523)
wittenator Apr 1, 2024
409a941
Added conversion for Detection3D and Detection3DArray (#523) (#526)
ahcorde Apr 2, 2024
c9a5a73
Clean humble Ci (#527)
ahcorde Apr 2, 2024
58b6cbf
Changelog
ahcorde Apr 8, 2024
2699e3f
0.244.14
ahcorde Apr 8, 2024
9e11a66
Changelog
ahcorde Apr 8, 2024
c3e7939
0.254.1
ahcorde Apr 8, 2024
d87d63d
[backport Iron] Create bridge for GPSFix msg (#316) (#537)
ahcorde Apr 16, 2024
a348c07
[backport Humble] Create bridge for GPSFix msg (#316) (#538)
ahcorde Apr 16, 2024
eb96258
update actions/checkoutv4 (#541)
ahcorde Apr 29, 2024
9377674
populate imu covariances when converting (#375) (#540)
wittenator Apr 30, 2024
6abafad
Merge humble -> iron
azeey Jun 21, 2024
02ea7f6
Merge pull request #564 from azeey/humble_to_iron
azeey Jun 24, 2024
8175530
Merge iron into jazzy
azeey Jun 25, 2024
13f238a
Merge remote-tracking branch 'origin/jazzy' into iron_to_jazzy
azeey Jun 25, 2024
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
Prev Previous commit
Next Next commit
Added messages for 2D Bounding Boxes to ros_gz_bridge (#458) (#460)
Signed-off-by: wittenator <[email protected]>
wittenator authored Nov 13, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 4cf2da6ee1fac81b010a87e8e5ad722e97dc26fb
2 changes: 2 additions & 0 deletions ros_gz_bridge/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -70,6 +70,7 @@ set(BRIDGE_MESSAGE_TYPES
std_msgs
tf2_msgs
trajectory_msgs
vision_msgs
)

set(generated_path "${CMAKE_BINARY_DIR}/generated")
@@ -247,6 +248,7 @@ if(BUILD_TESTING)
std_msgs
tf2_msgs
trajectory_msgs
vision_msgs
)

set(generated_path "${CMAKE_BINARY_DIR}/generated/test")
52 changes: 52 additions & 0 deletions ros_gz_bridge/include/ros_gz_bridge/convert/vision_msgs.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
// Copyright 2023 Open Source Robotics Foundation, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef ROS_GZ_BRIDGE__CONVERT__VISION_MSGS_HPP_
#define ROS_GZ_BRIDGE__CONVERT__VISION_MSGS_HPP_

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

// ROS 2 messages
#include "vision_msgs/msg/detection2_d_array.hpp"
#include <ros_gz_bridge/convert_decl.hpp>

namespace ros_gz_bridge
{
template<>
void
convert_ros_to_gz(
const vision_msgs::msg::Detection2D & ros_msg,
ignition::msgs::AnnotatedAxisAligned2DBox & gz_msg);

template<>
void
convert_gz_to_ros(
const ignition::msgs::AnnotatedAxisAligned2DBox & gz_msg,
vision_msgs::msg::Detection2D & ros_msg);

template<>
void
convert_ros_to_gz(
const vision_msgs::msg::Detection2DArray & ros_msg,
ignition::msgs::AnnotatedAxisAligned2DBox_V & gz_msg);

template<>
void
convert_gz_to_ros(
const ignition::msgs::AnnotatedAxisAligned2DBox_V & gz_msg,
vision_msgs::msg::Detection2DArray & ros_msg);
} // namespace ros_gz_bridge

#endif // ROS_GZ_BRIDGE__CONVERT__VISION_MSGS_HPP_
1 change: 1 addition & 0 deletions ros_gz_bridge/package.xml
Original file line number Diff line number Diff line change
@@ -26,6 +26,7 @@
<depend>tf2_msgs</depend>
<depend>trajectory_msgs</depend>
<depend>yaml_cpp_vendor</depend>
<depend>vision_msgs</depend>

<!-- Garden -->
<depend condition="$GZ_VERSION == garden or $IGNITION_VERSION == garden">gz-msgs9</depend>
4 changes: 4 additions & 0 deletions ros_gz_bridge/ros_gz_bridge/mappings.py
Original file line number Diff line number Diff line change
@@ -101,6 +101,10 @@
'trajectory_msgs': [
Mapping('JointTrajectory', 'JointTrajectory'),
],
'vision_msgs': [
Mapping('Detection2DArray', 'AnnotatedAxisAligned2DBox_V'),
Mapping('Detection2D', 'AnnotatedAxisAligned2DBox'),
],
}

MAPPINGS_8_4_0 = {
97 changes: 97 additions & 0 deletions ros_gz_bridge/src/convert/vision_msgs.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
// Copyright 2023 Open Source Robotics Foundation, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

#include <limits>

#include "convert/utils.hpp"
#include "ros_gz_bridge/convert/vision_msgs.hpp"

namespace ros_gz_bridge
{
template<>
void
convert_ros_to_gz(
const vision_msgs::msg::Detection2D & ros_msg,
ignition::msgs::AnnotatedAxisAligned2DBox & gz_msg)
{
convert_ros_to_gz(ros_msg.header, (*gz_msg.mutable_header()));

ignition::msgs::AxisAligned2DBox * box = new ignition::msgs::AxisAligned2DBox();
ignition::msgs::Vector2d * min_corner = new ignition::msgs::Vector2d();
ignition::msgs::Vector2d * max_corner = new ignition::msgs::Vector2d();

if (ros_msg.results.size() != 0) {
auto id = ros_msg.results.at(0).hypothesis.class_id;
gz_msg.set_label(std::stoi(id));
}

min_corner->set_x(ros_msg.bbox.center.position.x - ros_msg.bbox.size_x / 2);
min_corner->set_y(ros_msg.bbox.center.position.y - ros_msg.bbox.size_y / 2);
max_corner->set_x(ros_msg.bbox.center.position.x + ros_msg.bbox.size_x / 2);
max_corner->set_y(ros_msg.bbox.center.position.y + ros_msg.bbox.size_y / 2);
box->set_allocated_min_corner(min_corner);
box->set_allocated_max_corner(max_corner);
gz_msg.set_allocated_box(box);
}

template<>
void
convert_gz_to_ros(
const ignition::msgs::AnnotatedAxisAligned2DBox & gz_msg,
vision_msgs::msg::Detection2D & ros_msg)
{
convert_gz_to_ros(gz_msg.header(), ros_msg.header);

ros_msg.results.resize(1);
ros_msg.results.at(0).hypothesis.class_id = std::to_string(gz_msg.label());
ros_msg.results.at(0).hypothesis.score = 1.0;

ros_msg.bbox.center.position.x = (
gz_msg.box().min_corner().x() + gz_msg.box().max_corner().x()
) / 2;
ros_msg.bbox.center.position.y = (
gz_msg.box().min_corner().y() + gz_msg.box().max_corner().y()
) / 2;
ros_msg.bbox.size_x = gz_msg.box().max_corner().x() - gz_msg.box().min_corner().x();
ros_msg.bbox.size_y = gz_msg.box().max_corner().y() - gz_msg.box().min_corner().y();
}

template<>
void
convert_ros_to_gz(
const vision_msgs::msg::Detection2DArray & ros_msg,
ignition::msgs::AnnotatedAxisAligned2DBox_V & gz_msg)
{
convert_ros_to_gz(ros_msg.header, (*gz_msg.mutable_header()));
for (const auto & ros_box : ros_msg.detections) {
ignition::msgs::AnnotatedAxisAligned2DBox * gz_box = gz_msg.add_annotated_box();
convert_ros_to_gz(ros_box, *gz_box);
}
}

template<>
void
convert_gz_to_ros(
const ignition::msgs::AnnotatedAxisAligned2DBox_V & gz_msg,
vision_msgs::msg::Detection2DArray & ros_msg)
{
convert_gz_to_ros(gz_msg.header(), ros_msg.header);
for (const auto & gz_box : gz_msg.annotated_box()) {
vision_msgs::msg::Detection2D ros_box;
convert_gz_to_ros(gz_box, ros_box);
ros_msg.detections.push_back(ros_box);
}
}

} // namespace ros_gz_bridge
75 changes: 75 additions & 0 deletions ros_gz_bridge/test/utils/gz_test_msg.cpp
Original file line number Diff line number Diff line change
@@ -1461,5 +1461,80 @@ void compareTestMsg(const std::shared_ptr<ignition::msgs::VideoRecord> & _msg)
EXPECT_EQ(expected_msg.save_filename(), _msg->save_filename());
}

void createTestMsg(ignition::msgs::AnnotatedAxisAligned2DBox & _msg)
{
ignition::msgs::Header header_msg;

createTestMsg(header_msg);

_msg.mutable_header()->CopyFrom(header_msg);

_msg.set_label(1);

ignition::msgs::AxisAligned2DBox * box = new ignition::msgs::AxisAligned2DBox();
ignition::msgs::Vector2d * min_corner = new ignition::msgs::Vector2d();
ignition::msgs::Vector2d * max_corner = new ignition::msgs::Vector2d();

min_corner->set_x(2.0);
min_corner->set_y(2.0);
max_corner->set_x(4.0);
max_corner->set_y(6.0);
box->set_allocated_min_corner(min_corner);
box->set_allocated_max_corner(max_corner);
_msg.set_allocated_box(box);
}

void compareTestMsg(const std::shared_ptr<ignition::msgs::AnnotatedAxisAligned2DBox> & _msg)
{
ignition::msgs::AnnotatedAxisAligned2DBox expected_msg;
createTestMsg(expected_msg);

compareTestMsg(std::make_shared<ignition::msgs::Header>(_msg->header()));

EXPECT_EQ(expected_msg.label(), _msg->label());

ignition::msgs::AxisAligned2DBox expected_box = expected_msg.box();
ignition::msgs::Vector2d expected_min_corner = expected_box.min_corner();
ignition::msgs::Vector2d expected_max_corner = expected_box.max_corner();

ignition::msgs::AxisAligned2DBox box = _msg->box();
ignition::msgs::Vector2d min_corner = box.min_corner();
ignition::msgs::Vector2d max_corner = box.max_corner();

EXPECT_EQ(expected_min_corner.x(), min_corner.x());
EXPECT_EQ(expected_min_corner.y(), min_corner.y());
EXPECT_EQ(expected_max_corner.x(), max_corner.x());
EXPECT_EQ(expected_max_corner.y(), max_corner.y());
}

void createTestMsg(ignition::msgs::AnnotatedAxisAligned2DBox_V & _msg)
{
ignition::msgs::Header header_msg;

createTestMsg(header_msg);

_msg.mutable_header()->CopyFrom(header_msg);

for (size_t i = 0; i < 4; i++) {
ignition::msgs::AnnotatedAxisAligned2DBox * box = _msg.add_annotated_box();
createTestMsg(*box);
}
}

void compareTestMsg(const std::shared_ptr<ignition::msgs::AnnotatedAxisAligned2DBox_V> & _msg)
{
ignition::msgs::AnnotatedAxisAligned2DBox_V expected_msg;
createTestMsg(expected_msg);

compareTestMsg(std::make_shared<ignition::msgs::Header>(_msg->header()));

for (size_t i = 0; i < 4; i++) {
compareTestMsg(
std::make_shared<ignition::msgs::AnnotatedAxisAligned2DBox>(
_msg->annotated_box(
i)));
}
}

} // namespace testing
} // namespace ros_gz_bridge
17 changes: 17 additions & 0 deletions ros_gz_bridge/test/utils/gz_test_msg.hpp
Original file line number Diff line number Diff line change
@@ -64,6 +64,7 @@
#include <ignition/msgs/vector3d.pb.h>
#include <ignition/msgs/video_record.pb.h>
#include <ignition/msgs/wrench.pb.h>
#include <ignition/msgs/annotated_axis_aligned_2d_box_v.pb.h>

#include <memory>

@@ -494,6 +495,22 @@ void createTestMsg(ignition::msgs::VideoRecord & _msg);
/// \param[in] _msg The message to compare.
void compareTestMsg(const std::shared_ptr<ignition::msgs::VideoRecord> & _msg);

/// \brief Create a message used for testing.
/// \param[out] _msg The message populated.
void createTestMsg(ignition::msgs::AnnotatedAxisAligned2DBox & _msg);

/// \brief Compare a message with the populated for testing.
/// \param[in] _msg The message to compare.
void compareTestMsg(const std::shared_ptr<ignition::msgs::AnnotatedAxisAligned2DBox> & _msg);

/// \brief Create a message used for testing.
/// \param[out] _msg The message populated.
void createTestMsg(ignition::msgs::AnnotatedAxisAligned2DBox_V & _msg);

/// \brief Compare a message with the populated for testing.
/// \param[in] _msg The message to compare.
void compareTestMsg(const std::shared_ptr<ignition::msgs::AnnotatedAxisAligned2DBox_V> & _msg);

} // namespace testing
} // namespace ros_gz_bridge

59 changes: 59 additions & 0 deletions ros_gz_bridge/test/utils/ros_test_msg.cpp
Original file line number Diff line number Diff line change
@@ -1344,5 +1344,64 @@ void compareTestMsg(const std::shared_ptr<rcl_interfaces::msg::ParameterValue> &
EXPECT_EQ(expected_msg.string_value, _msg->string_value);
}

void createTestMsg(vision_msgs::msg::Detection2D & _msg)
{
std_msgs::msg::Header header_msg;
createTestMsg(header_msg);
_msg.header = header_msg;

vision_msgs::msg::ObjectHypothesisWithPose class_prob;
class_prob.hypothesis.class_id = "1";
class_prob.hypothesis.score = 1.0;
_msg.results.push_back(class_prob);

_msg.bbox.size_x = 2.0;
_msg.bbox.size_y = 4.0;
_msg.bbox.center.position.x = 3.0;
_msg.bbox.center.position.y = 4.0;
}

void compareTestMsg(const std::shared_ptr<vision_msgs::msg::Detection2D> & _msg)
{
vision_msgs::msg::Detection2D expected_msg;
createTestMsg(expected_msg);

compareTestMsg(_msg->header);
EXPECT_EQ(expected_msg.results.size(), _msg->results.size());
for (size_t i = 0; i < _msg->results.size(); i++) {
EXPECT_EQ(expected_msg.results[i].hypothesis.class_id, _msg->results[i].hypothesis.class_id);
EXPECT_EQ(expected_msg.results[i].hypothesis.score, _msg->results[i].hypothesis.score);
}
EXPECT_EQ(expected_msg.bbox.size_x, _msg->bbox.size_x);
EXPECT_EQ(expected_msg.bbox.size_y, _msg->bbox.size_y);
EXPECT_EQ(expected_msg.bbox.center.position.x, _msg->bbox.center.position.x);
EXPECT_EQ(expected_msg.bbox.center.position.y, _msg->bbox.center.position.y);
}

void createTestMsg(vision_msgs::msg::Detection2DArray & _msg)
{
std_msgs::msg::Header header_msg;
createTestMsg(header_msg);
_msg.header = header_msg;

for (size_t i = 0; i < 4; i++) {
vision_msgs::msg::Detection2D detection;
createTestMsg(detection);
_msg.detections.push_back(detection);
}
}

void compareTestMsg(const std::shared_ptr<vision_msgs::msg::Detection2DArray> & _msg)
{
vision_msgs::msg::Detection2DArray expected_msg;
createTestMsg(expected_msg);

compareTestMsg(_msg->header);
EXPECT_EQ(expected_msg.detections.size(), _msg->detections.size());
for (size_t i = 0; i < _msg->detections.size(); i++) {
compareTestMsg(std::make_shared<vision_msgs::msg::Detection2D>(_msg->detections[i]));
}
}

} // namespace testing
} // namespace ros_gz_bridge
17 changes: 17 additions & 0 deletions ros_gz_bridge/test/utils/ros_test_msg.hpp
Original file line number Diff line number Diff line change
@@ -76,6 +76,7 @@
#include <tf2_msgs/msg/tf_message.hpp>
#include <trajectory_msgs/msg/joint_trajectory.hpp>
#include <rcl_interfaces/msg/parameter_value.hpp>
#include "vision_msgs/msg/detection2_d_array.hpp"

namespace ros_gz_bridge
{
@@ -572,6 +573,22 @@ void createTestMsg(rcl_interfaces::msg::ParameterValue & _msg);
/// \param[in] _msg The message to compare.
void compareTestMsg(const std::shared_ptr<rcl_interfaces::msg::ParameterValue> & _msg);

/// \brief Create a message used for testing.
/// \param[out] _msg The message populated.
void createTestMsg(vision_msgs::msg::Detection2DArray & _msg);

/// \brief Compare a message with the populated for testing.
/// \param[in] _msg The message to compare.
void compareTestMsg(const std::shared_ptr<vision_msgs::msg::Detection2DArray> & _msg);

/// \brief Create a message used for testing.
/// \param[out] _msg The message populated.
void createTestMsg(vision_msgs::msg::Detection2D & _msg);

/// \brief Compare a message with the populated for testing.
/// \param[in] _msg The message to compare.
void compareTestMsg(const std::shared_ptr<vision_msgs::msg::Detection2D> & _msg);

} // namespace testing
} // namespace ros_gz_bridge