From 67898df136dc699c432d10f9c7f8ab004dad1fbe Mon Sep 17 00:00:00 2001 From: Cyrille Berger Date: Thu, 21 Mar 2019 10:13:07 +0100 Subject: [PATCH 1/2] don't specify ros1 type (it fixes the bridge if ros1 and ros2 have different type name) Signed-off-by: Cyrille Berger --- src/parameter_bridge.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/parameter_bridge.cpp b/src/parameter_bridge.cpp index 77271643..96a224d1 100644 --- a/src/parameter_bridge.cpp +++ b/src/parameter_bridge.cpp @@ -73,7 +73,7 @@ int main(int argc, char * argv[]) try { ros1_bridge::BridgeHandles handles = ros1_bridge::create_bidirectional_bridge( - ros1_node, ros2_node, type_name, type_name, topic_name, queue_size); + ros1_node, ros2_node, "", type_name, topic_name, queue_size); all_handles.push_back(handles); } catch (std::runtime_error & e) { fprintf( From 683ae206296aa17b83d38b22f92964b81fb8483a Mon Sep 17 00:00:00 2001 From: Cyrille Berger Date: Fri, 29 Mar 2019 08:43:49 +0100 Subject: [PATCH 2/2] remove ROS1 type from messages, since that type is guessed from ROS2 type Signed-off-by: Cyrille Berger --- src/parameter_bridge.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/parameter_bridge.cpp b/src/parameter_bridge.cpp index 96a224d1..4e067625 100644 --- a/src/parameter_bridge.cpp +++ b/src/parameter_bridge.cpp @@ -68,8 +68,8 @@ int main(int argc, char * argv[]) } printf( "Trying to create bidirectional bridge for topic ''%s' " - "with ROS 1 type '%s' and ROS 2 type '%s'\n", - topic_name.c_str(), type_name.c_str(), type_name.c_str()); + "with ROS 2 type '%s'\n", + topic_name.c_str(), type_name.c_str()); try { ros1_bridge::BridgeHandles handles = ros1_bridge::create_bidirectional_bridge( @@ -79,8 +79,8 @@ int main(int argc, char * argv[]) fprintf( stderr, "failed to create bidirectional bridge for topic '%s' " - "with ROS 1 type '%s' and ROS 2 type '%s': %s\n", - topic_name.c_str(), type_name.c_str(), type_name.c_str(), e.what()); + "with ROS 2 type '%s': %s\n", + topic_name.c_str(), type_name.c_str(), e.what()); } } } else {