From 86785d2117db9f3401e6c8027fa6c392994f85e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=98ystein=20Sture?= Date: Tue, 26 Nov 2024 12:50:08 +0100 Subject: [PATCH 1/2] Use both ROS package and message name for unique mappings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Øystein Sture --- ros_gz_bridge/ros_gz_bridge/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ros_gz_bridge/ros_gz_bridge/__init__.py b/ros_gz_bridge/ros_gz_bridge/__init__.py index f6ea05ee..c2496bc7 100644 --- a/ros_gz_bridge/ros_gz_bridge/__init__.py +++ b/ros_gz_bridge/ros_gz_bridge/__init__.py @@ -59,7 +59,7 @@ def gz_type(self): return f'gz::msgs::{self.gz_message_name}' def unique(self): - return f'{self.gz_message_name.lower()}_{self.ros2_message_name.lower()}' + return f'{self.gz_message_name.lower()}_{self.ros2_package_name}_{self.ros2_message_name.lower()}' def mappings(gz_msgs_ver): From a0f654dd45ba2782898fc4d418d00f59fb5379fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=98ystein=20Sture?= Date: Tue, 26 Nov 2024 13:40:28 +0100 Subject: [PATCH 2/2] Fix linter error (line width) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Øystein Sture --- ros_gz_bridge/ros_gz_bridge/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ros_gz_bridge/ros_gz_bridge/__init__.py b/ros_gz_bridge/ros_gz_bridge/__init__.py index c2496bc7..31640eaa 100644 --- a/ros_gz_bridge/ros_gz_bridge/__init__.py +++ b/ros_gz_bridge/ros_gz_bridge/__init__.py @@ -59,7 +59,8 @@ def gz_type(self): return f'gz::msgs::{self.gz_message_name}' def unique(self): - return f'{self.gz_message_name.lower()}_{self.ros2_package_name}_{self.ros2_message_name.lower()}' + return f'{self.gz_message_name.lower()}_' \ + f'{self.ros2_package_name}_{self.ros2_message_name.lower()}' def mappings(gz_msgs_ver):