From efd26cd87483e27f3df98e5e9e4d04d15304cf12 Mon Sep 17 00:00:00 2001 From: Arshad Mehmood Date: Mon, 3 Mar 2025 11:04:10 +0800 Subject: [PATCH 1/4] Refactor topic and service names to relative for namespace compatibility This commit updates topic and service names from absolute to relative paths across the repository by removing prefixed '/' from ros2 names This enables the correct appending of namespaces to nodes, topics, and services, enhancing flexibility and modularity of the system. - Modified topic and service paths in C++ source files and headers. - Updated corresponding Python scripts to reflect relative naming. - Adjusted unit tests to align with the new naming convention. Signed-off-by: Arshad Mehmood --- .../src/inputs/image_topic.cpp | 2 +- .../src/outputs/ros_topic_output.cpp | 24 +++++++++---------- .../src/outputs/rviz_output.cpp | 2 +- .../src/services/frame_processing_server.cpp | 2 +- .../services/pipeline_processing_server.cpp | 2 +- sample/launch/pipeline_image.launch.py | 19 ++++++++------- sample/param/pipeline_image.yaml | 2 +- sample/src/image_object_client.cpp | 2 +- sample/src/image_people_client.cpp | 2 +- script/viewer/service.py | 2 +- tests/src/service/unittest_objectService.cpp | 2 +- tests/src/service/unittest_peopleService.cpp | 2 +- .../src/topic/unittest_faceDetectionCheck.cpp | 8 +++---- .../topic/unittest_face_reidentification.cpp | 6 ++--- tests/src/topic/unittest_imageCheck.cpp | 8 +++---- .../topic/unittest_objectDetectionCheck.cpp | 2 +- tests/src/topic/unittest_reidentification.cpp | 2 +- .../src/topic/unittest_segmentationCheck.cpp | 2 +- .../topic/unittest_vehicleDetectionCheck.cpp | 2 +- 19 files changed, 47 insertions(+), 46 deletions(-) diff --git a/openvino_wrapper_lib/src/inputs/image_topic.cpp b/openvino_wrapper_lib/src/inputs/image_topic.cpp index 0fe6a6ed..4d133d4c 100644 --- a/openvino_wrapper_lib/src/inputs/image_topic.cpp +++ b/openvino_wrapper_lib/src/inputs/image_topic.cpp @@ -22,7 +22,7 @@ #include "openvino_wrapper_lib/inputs/image_topic.hpp" #include "openvino_wrapper_lib/slog.hpp" -#define INPUT_TOPIC "/openvino_toolkit/image_raw" +#define INPUT_TOPIC "openvino_toolkit/image_raw" Input::ImageTopic::ImageTopic(rclcpp::Node::SharedPtr node) : node_(node) { diff --git a/openvino_wrapper_lib/src/outputs/ros_topic_output.cpp b/openvino_wrapper_lib/src/outputs/ros_topic_output.cpp index 196bdaf5..4b071f3f 100644 --- a/openvino_wrapper_lib/src/outputs/ros_topic_output.cpp +++ b/openvino_wrapper_lib/src/outputs/ros_topic_output.cpp @@ -34,29 +34,29 @@ Outputs::RosTopicOutput::RosTopicOutput(std::string output_name, const rclcpp::N node_ = rclcpp::Node::make_shared(output_name + "_topic_publisher"); } pub_license_plate_ = node_->create_publisher( - "/openvino_toolkit/" + output_name_ + "/detected_license_plates", 16); + "openvino_toolkit/" + output_name_ + "/detected_license_plates", 16); pub_vehicle_attribs_ = node_->create_publisher( - "/openvino_toolkit/" + output_name_ + "/detected_vehicles_attribs", 16); + "openvino_toolkit/" + output_name_ + "/detected_vehicles_attribs", 16); pub_landmarks_ = node_->create_publisher( - "/openvino_toolkit/" + output_name_ + "/detected_landmarks", 16); + "openvino_toolkit/" + output_name_ + "/detected_landmarks", 16); pub_face_reid_ = node_->create_publisher( - "/openvino_toolkit/" + output_name_ + "/reidentified_faces", 16); + "openvino_toolkit/" + output_name_ + "/reidentified_faces", 16); pub_person_attribs_ = node_->create_publisher( - "/openvino_toolkit/" + output_name_ + "/person_attributes", 16); + "openvino_toolkit/" + output_name_ + "/person_attributes", 16); pub_person_reid_ = node_->create_publisher( - "/openvino_toolkit/" + output_name_ + "/reidentified_persons", 16); + "openvino_toolkit/" + output_name_ + "/reidentified_persons", 16); pub_segmented_object_ = node_->create_publisher( - "/openvino_toolkit/" + output_name_ + "/segmented_obejcts", 16); + "openvino_toolkit/" + output_name_ + "/segmented_obejcts", 16); pub_detected_object_ = node_->create_publisher( - "/openvino_toolkit/" + output_name_ + "/detected_objects", 16); + "openvino_toolkit/" + output_name_ + "/detected_objects", 16); pub_face_ = - node_->create_publisher("/openvino_toolkit/" + output_name_ + "/faces", 16); + node_->create_publisher("openvino_toolkit/" + output_name_ + "/faces", 16); pub_emotion_ = - node_->create_publisher("/openvino_toolkit/" + output_name_ + "/emotions", 16); + node_->create_publisher("openvino_toolkit/" + output_name_ + "/emotions", 16); pub_age_gender_ = node_->create_publisher( - "/openvino_toolkit/" + output_name_ + "/age_genders", 16); + "openvino_toolkit/" + output_name_ + "/age_genders", 16); pub_headpose_ = node_->create_publisher( - "/openvino_toolkit/" + output_name_ + "/headposes", 16); + "openvino_toolkit/" + output_name_ + "/headposes", 16); emotions_topic_ = nullptr; detected_objects_topic_ = nullptr; faces_topic_ = nullptr; diff --git a/openvino_wrapper_lib/src/outputs/rviz_output.cpp b/openvino_wrapper_lib/src/outputs/rviz_output.cpp index 6e6b7b8e..f91e8643 100644 --- a/openvino_wrapper_lib/src/outputs/rviz_output.cpp +++ b/openvino_wrapper_lib/src/outputs/rviz_output.cpp @@ -33,7 +33,7 @@ Outputs::RvizOutput::RvizOutput(std::string output_name, const rclcpp::Node::Sha node_ = rclcpp::Node::make_shared(output_name + "_image_publisher"); } image_topic_ = nullptr; - pub_image_ = node_->create_publisher("/openvino_toolkit/" + output_name_ + "/images", 16); + pub_image_ = node_->create_publisher("openvino_toolkit/" + output_name_ + "/images", 16); image_window_output_ = std::make_shared(output_name_, 950); } diff --git a/openvino_wrapper_lib/src/services/frame_processing_server.cpp b/openvino_wrapper_lib/src/services/frame_processing_server.cpp index 671c76e5..5794bb0d 100644 --- a/openvino_wrapper_lib/src/services/frame_processing_server.cpp +++ b/openvino_wrapper_lib/src/services/frame_processing_server.cpp @@ -55,7 +55,7 @@ void FrameProcessingServer::initService(const std::string& config_path) PipelineManager::getInstance().createPipeline(p); } - service_ = create_service("/openvino_toolkit/service", std::bind(&FrameProcessingServer::cbService, this, + service_ = create_service("openvino_toolkit/service", std::bind(&FrameProcessingServer::cbService, this, std::placeholders::_1, std::placeholders::_2)); } diff --git a/openvino_wrapper_lib/src/services/pipeline_processing_server.cpp b/openvino_wrapper_lib/src/services/pipeline_processing_server.cpp index 31b1bde9..756459b6 100644 --- a/openvino_wrapper_lib/src/services/pipeline_processing_server.cpp +++ b/openvino_wrapper_lib/src/services/pipeline_processing_server.cpp @@ -41,7 +41,7 @@ template void PipelineProcessingServer::initPipelineService() { service_ = - create_service("/openvino_toolkit/pipeline_service", std::bind(&PipelineProcessingServer::cbService, this, + create_service("openvino_toolkit/pipeline_service", std::bind(&PipelineProcessingServer::cbService, this, std::placeholders::_1, std::placeholders::_2)); } diff --git a/sample/launch/pipeline_image.launch.py b/sample/launch/pipeline_image.launch.py index 0ac9f013..af3c48ad 100644 --- a/sample/launch/pipeline_image.launch.py +++ b/sample/launch/pipeline_image.launch.py @@ -35,17 +35,18 @@ def generate_launch_description(): launch_ros.actions.Node( package='openvino_node', executable='pipeline_with_params', + #namespace="", arguments=['-config', LaunchConfiguration('yaml_path')], remappings=[ - ('/openvino_toolkit/people/faces', - '/ros2_openvino_toolkit/face_detection'), - ('/openvino_toolkit/people/emotions', - '/ros2_openvino_toolkit/emotions_recognition'), - ('/openvino_toolkit/people/headposes', - '/ros2_openvino_toolkit/headposes_estimation'), - ('/openvino_toolkit/people/age_genders', - '/ros2_openvino_toolkit/people/age_genders_Recognition'), - ('/openvino_toolkit/people/images', '/ros2_openvino_toolkit/image_rviz')], + ('openvino_toolkit/people/faces', + 'ros2_openvino_toolkit/face_detection'), + ('openvino_toolkit/people/emotions', + 'ros2_openvino_toolkit/emotions_recognition'), + ('openvino_toolkit/people/headposes', + 'ros2_openvino_toolkit/headposes_estimation'), + ('openvino_toolkit/people/age_genders', + 'ros2_openvino_toolkit/people/age_genders_Recognition'), + ('openvino_toolkit/people/images', 'ros2_openvino_toolkit/image_rviz')], output='screen'), # Rviz diff --git a/sample/param/pipeline_image.yaml b/sample/param/pipeline_image.yaml index f41c3dc2..a680fc1d 100644 --- a/sample/param/pipeline_image.yaml +++ b/sample/param/pipeline_image.yaml @@ -38,4 +38,4 @@ Pipelines: - left: HeadPoseEstimation right: [ImageWindow, RosTopic, RViz] -Common: +Common: \ No newline at end of file diff --git a/sample/src/image_object_client.cpp b/sample/src/image_object_client.cpp index bfb7e125..1bf1a53f 100644 --- a/sample/src/image_object_client.cpp +++ b/sample/src/image_object_client.cpp @@ -34,7 +34,7 @@ int main(int argc, char** argv) } std::string image_path = argv[1]; - auto client = node->create_client("/openvino_toolkit/service"); + auto client = node->create_client("openvino_toolkit/service"); auto request = std::make_shared(); request->image_path = image_path; diff --git a/sample/src/image_people_client.cpp b/sample/src/image_people_client.cpp index 39739d4c..b111a012 100644 --- a/sample/src/image_people_client.cpp +++ b/sample/src/image_people_client.cpp @@ -38,7 +38,7 @@ int main(int argc, char** argv) std::string image_path = argv[1]; - auto client = node->create_client("/openvino_toolkit/service"); + auto client = node->create_client("openvino_toolkit/service"); auto request = std::make_shared(); request->image_path = image_path; diff --git a/script/viewer/service.py b/script/viewer/service.py index 82d7d2e4..83e7e50c 100644 --- a/script/viewer/service.py +++ b/script/viewer/service.py @@ -47,7 +47,7 @@ def usage(): rclpy.init(args=None) node = rclpy.create_node('pipeline_client') -cli = node.create_client(PipelineSrv, '/openvino_toolkit/pipeline_service') +cli = node.create_client(PipelineSrv, 'openvino_toolkit/pipeline_service') if __name__ == "__main__": diff --git a/tests/src/service/unittest_objectService.cpp b/tests/src/service/unittest_objectService.cpp index 31f4fac8..dd32ee24 100644 --- a/tests/src/service/unittest_objectService.cpp +++ b/tests/src/service/unittest_objectService.cpp @@ -36,7 +36,7 @@ TEST(UnitTestObject, testObject) { auto node = rclcpp::Node::make_shared("openvino_object_service_test"); - auto client = node->create_client("/openvino_toolkit/service"); + auto client = node->create_client("openvino_toolkit/service"); ASSERT_TRUE(client->wait_for_service(std::chrono::seconds(20))); diff --git a/tests/src/service/unittest_peopleService.cpp b/tests/src/service/unittest_peopleService.cpp index 69ff2bb2..143529c2 100644 --- a/tests/src/service/unittest_peopleService.cpp +++ b/tests/src/service/unittest_peopleService.cpp @@ -38,7 +38,7 @@ TEST(UnitTestPeople, testPeople) { auto node = rclcpp::Node::make_shared("openvino_people_service_test"); - auto client = node->create_client("/openvino_toolkit/service"); + auto client = node->create_client("openvino_toolkit/service"); ASSERT_TRUE(client->wait_for_service(std::chrono::seconds(20))); diff --git a/tests/src/topic/unittest_faceDetectionCheck.cpp b/tests/src/topic/unittest_faceDetectionCheck.cpp index 4ff23634..fa187012 100644 --- a/tests/src/topic/unittest_faceDetectionCheck.cpp +++ b/tests/src/topic/unittest_faceDetectionCheck.cpp @@ -79,7 +79,7 @@ TEST(UnitTestFaceDetection, testFaceDetection) executor.add_node(node); { - auto sub1 = node->create_subscription("/ros2_openvino_toolkit/face_detection", + auto sub1 = node->create_subscription("ros2_openvino_toolkit/face_detection", qos, openvino_faceDetection_callback); executor.spin_once(std::chrono::seconds(0)); @@ -108,7 +108,7 @@ TEST(UnitTestFaceDetection, testEmotionDetection) { auto sub2 = node->create_subscription( - "/ros2_openvino_toolkit/emotions_recognition", qos, openvino_emotionRecognition_callback); + "ros2_openvino_toolkit/emotions_recognition", qos, openvino_emotionRecognition_callback); executor.spin_once(std::chrono::seconds(0)); @@ -135,7 +135,7 @@ TEST(UnitTestFaceDetection, testageGenderDetection) { auto sub3 = node->create_subscription( - "/ros2_openvino_toolkit/age_genders_Recognition", qos, openvino_ageGender_callback); + "ros2_openvino_toolkit/age_genders_Recognition", qos, openvino_ageGender_callback); executor.spin_once(std::chrono::seconds(0)); @@ -162,7 +162,7 @@ TEST(UnitTestFaceDetection, testheadPoseDetection) { auto sub4 = node->create_subscription( - "/ros2_openvino_toolkit/headposes_estimation", qos, openvino_headPose_callback); + "ros2_openvino_toolkit/headposes_estimation", qos, openvino_headPose_callback); executor.spin_once(std::chrono::seconds(0)); diff --git a/tests/src/topic/unittest_face_reidentification.cpp b/tests/src/topic/unittest_face_reidentification.cpp index 1e8fd402..e14f4751 100644 --- a/tests/src/topic/unittest_face_reidentification.cpp +++ b/tests/src/topic/unittest_face_reidentification.cpp @@ -79,7 +79,7 @@ TEST(UnitTestFaceReidentification, testFaceDetection) { auto sub1 = node->create_subscription( - "/ros2_openvino_toolkit/face_detection", rclcpp::QoS(1), openvino_face_detection_callback); + "ros2_openvino_toolkit/face_detection", rclcpp::QoS(1), openvino_face_detection_callback); executor.spin_once(std::chrono::seconds(0)); @@ -107,7 +107,7 @@ TEST(UnitTestFaceReidentification, testLandmarkDetection) { auto sub1 = node->create_subscription( - "/ros2_openvino_toolkit/detected_landmarks", qos, openvino_landmark_detection_callback); + "ros2_openvino_toolkit/detected_landmarks", qos, openvino_landmark_detection_callback); executor.spin_once(std::chrono::seconds(0)); @@ -135,7 +135,7 @@ TEST(UnitTestFaceReidentification, testReidentification) { auto sub1 = node->create_subscription( - "/ros2_openvino_toolkit/reidentified_faces", qos, openvino_face_reidentification_callback); + "ros2_openvino_toolkit/reidentified_faces", qos, openvino_face_reidentification_callback); executor.spin_once(std::chrono::seconds(0)); diff --git a/tests/src/topic/unittest_imageCheck.cpp b/tests/src/topic/unittest_imageCheck.cpp index 5ef8091f..a20a4e95 100644 --- a/tests/src/topic/unittest_imageCheck.cpp +++ b/tests/src/topic/unittest_imageCheck.cpp @@ -79,7 +79,7 @@ TEST(UnitTestFaceDetection, testFaceDetection) executor.add_node(node); { - auto sub1 = node->create_subscription("/ros2_openvino_toolkit/face_detection", + auto sub1 = node->create_subscription("ros2_openvino_toolkit/face_detection", qos, openvino_faceDetection_callback); executor.spin_once(std::chrono::seconds(0)); @@ -108,7 +108,7 @@ TEST(UnitTestFaceDetection, testEmotionDetection) { auto sub2 = node->create_subscription( - "/ros2_openvino_toolkit/emotions_recognition", qos, openvino_emotionRecognition_callback); + "ros2_openvino_toolkit/emotions_recognition", qos, openvino_emotionRecognition_callback); executor.spin_once(std::chrono::seconds(0)); @@ -135,7 +135,7 @@ TEST(UnitTestFaceDetection, testageGenderDetection) { auto sub3 = node->create_subscription( - "/ros2_openvino_toolkit/age_genders_Recognition", qos, openvino_ageGender_callback); + "ros2_openvino_toolkit/age_genders_Recognition", qos, openvino_ageGender_callback); executor.spin_once(std::chrono::seconds(0)); @@ -162,7 +162,7 @@ TEST(UnitTestFaceDetection, testheadPoseDetection) { auto sub4 = node->create_subscription( - "/ros2_openvino_toolkit/headposes_estimation", qos, openvino_headPose_callback); + "ros2_openvino_toolkit/headposes_estimation", qos, openvino_headPose_callback); executor.spin_once(std::chrono::seconds(0)); diff --git a/tests/src/topic/unittest_objectDetectionCheck.cpp b/tests/src/topic/unittest_objectDetectionCheck.cpp index 8307c9db..e954f586 100644 --- a/tests/src/topic/unittest_objectDetectionCheck.cpp +++ b/tests/src/topic/unittest_objectDetectionCheck.cpp @@ -71,7 +71,7 @@ TEST(UnitTestObjectDetection, testObjectDetection) executor.add_node(node); { - auto sub1 = node->create_subscription("/ros2_openvino_toolkit/detected_objects", + auto sub1 = node->create_subscription("ros2_openvino_toolkit/detected_objects", qos, openvino_faceDetection_callback); executor.spin_once(std::chrono::seconds(0)); diff --git a/tests/src/topic/unittest_reidentification.cpp b/tests/src/topic/unittest_reidentification.cpp index abf4857f..57d015bd 100644 --- a/tests/src/topic/unittest_reidentification.cpp +++ b/tests/src/topic/unittest_reidentification.cpp @@ -76,7 +76,7 @@ TEST(UnitTestPersonReidentification, testReidentification) { auto sub1 = node->create_subscription( - "/ros2_openvino_toolkit/reidentified_persons", qos, openvino_reidentification_callback); + "ros2_openvino_toolkit/reidentified_persons", qos, openvino_reidentification_callback); executor.spin_once(std::chrono::seconds(0)); diff --git a/tests/src/topic/unittest_segmentationCheck.cpp b/tests/src/topic/unittest_segmentationCheck.cpp index 68996709..08ed6f45 100644 --- a/tests/src/topic/unittest_segmentationCheck.cpp +++ b/tests/src/topic/unittest_segmentationCheck.cpp @@ -72,7 +72,7 @@ TEST(UnitTestObjectDetection, testObjectDetection) executor.add_node(node); { - auto sub1 = node->create_subscription("/ros2_openvino_toolkit/segmented_obejcts", + auto sub1 = node->create_subscription("ros2_openvino_toolkit/segmented_obejcts", qos, openvino_faceDetection_callback); executor.spin_once(std::chrono::seconds(0)); diff --git a/tests/src/topic/unittest_vehicleDetectionCheck.cpp b/tests/src/topic/unittest_vehicleDetectionCheck.cpp index cc37175a..2f75f4ce 100644 --- a/tests/src/topic/unittest_vehicleDetectionCheck.cpp +++ b/tests/src/topic/unittest_vehicleDetectionCheck.cpp @@ -77,7 +77,7 @@ TEST(UnitTestPersonReidentification, testReidentification) { auto sub1 = node->create_subscription( - "/ros2_openvino_toolkit/detected_license_plates", qos, openvino_vehicle_callback); + "ros2_openvino_toolkit/detected_license_plates", qos, openvino_vehicle_callback); executor.spin_once(std::chrono::seconds(0)); From 03a705b4408bca06e37257c07a5c58088e71fc1f Mon Sep 17 00:00:00 2001 From: "Sathiyamoorthi, Jayabalaji" Date: Mon, 21 Jul 2025 15:22:22 +0200 Subject: [PATCH 2/4] Fix review comments and replace /openvino_toolkit/image_raw with openvino_toolkit/image_raw in all the launch files --- sample/launch/pipeline_object_yolo_topic.launch.py | 2 +- sample/launch/pipeline_segmentation.launch.py | 2 +- sample/launch/pipeline_segmentation_ci_test.py | 2 +- sample/launch/pipeline_segmentation_image.launch.py | 2 +- sample/launch/pipeline_segmentation_image_ci_test.py | 2 +- sample/launch/pipeline_segmentation_instance.launch.py | 2 +- sample/launch/pipeline_segmentation_instance_ci_test.py | 2 +- sample/launch/pipeline_segmentation_maskrcnn.launch.py | 2 +- sample/launch/pipeline_segmentation_maskrcnn_ci_test.py | 2 +- sample/launch/ros2_openvino_oa.launch.py | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/sample/launch/pipeline_object_yolo_topic.launch.py b/sample/launch/pipeline_object_yolo_topic.launch.py index 451f4b95..d73659ce 100644 --- a/sample/launch/pipeline_object_yolo_topic.launch.py +++ b/sample/launch/pipeline_object_yolo_topic.launch.py @@ -41,7 +41,7 @@ def generate_launch_description(): executable='pipeline_with_params', arguments=['-config', LaunchConfiguration('yaml_path')], remappings=[ - ('/openvino_toolkit/image_raw', '/camera/color/image_raw'), + ('openvino_toolkit/image_raw', '/camera/color/image_raw'), ('/openvino_toolkit/object/detected_objects', '/ros2_openvino_toolkit/detected_objects'), ('/openvino_toolkit/object/images', '/ros2_openvino_toolkit/image_rviz')], diff --git a/sample/launch/pipeline_segmentation.launch.py b/sample/launch/pipeline_segmentation.launch.py index d5303ae4..c76267f3 100644 --- a/sample/launch/pipeline_segmentation.launch.py +++ b/sample/launch/pipeline_segmentation.launch.py @@ -41,7 +41,7 @@ def generate_launch_description(): executable='pipeline_with_params', arguments=['-config', LaunchConfiguration('yaml_path')], remappings=[ - ('/openvino_toolkit/image_raw', '/camera/color/image_raw'), + ('openvino_toolkit/image_raw', '/camera/color/image_raw'), ('/openvino_toolkit/segmentation/segmented_obejcts', '/ros2_openvino_toolkit/segmented_obejcts'), ('/openvino_toolkit/segmentation/images', '/ros2_openvino_toolkit/image_rviz')], diff --git a/sample/launch/pipeline_segmentation_ci_test.py b/sample/launch/pipeline_segmentation_ci_test.py index 7be59e6d..286b889c 100644 --- a/sample/launch/pipeline_segmentation_ci_test.py +++ b/sample/launch/pipeline_segmentation_ci_test.py @@ -41,7 +41,7 @@ def generate_launch_description(): executable='pipeline_with_params', arguments=['-config', LaunchConfiguration('yaml_path')], remappings=[ - ('/openvino_toolkit/image_raw', '/camera/color/image_raw'), + ('openvino_toolkit/image_raw', '/camera/color/image_raw'), ('/openvino_toolkit/segmentation/segmented_obejcts', '/ros2_openvino_toolkit/segmented_obejcts'), ('/openvino_toolkit/segmentation/images', '/ros2_openvino_toolkit/image_rviz')], diff --git a/sample/launch/pipeline_segmentation_image.launch.py b/sample/launch/pipeline_segmentation_image.launch.py index 584ddfc3..e5cbf39f 100644 --- a/sample/launch/pipeline_segmentation_image.launch.py +++ b/sample/launch/pipeline_segmentation_image.launch.py @@ -41,7 +41,7 @@ def generate_launch_description(): executable='pipeline_with_params', arguments=['-config', LaunchConfiguration('yaml_path')], remappings=[ - ('/openvino_toolkit/image_raw', '/camera/color/image_raw'), + ('openvino_toolkit/image_raw', '/camera/color/image_raw'), ('/openvino_toolkit/segmentation/segmented_obejcts', '/ros2_openvino_toolkit/segmented_obejcts'), ('/openvino_toolkit/segmentation/images', '/ros2_openvino_toolkit/image_rviz')], diff --git a/sample/launch/pipeline_segmentation_image_ci_test.py b/sample/launch/pipeline_segmentation_image_ci_test.py index ef831657..6944b3ee 100644 --- a/sample/launch/pipeline_segmentation_image_ci_test.py +++ b/sample/launch/pipeline_segmentation_image_ci_test.py @@ -41,7 +41,7 @@ def generate_launch_description(): executable='pipeline_with_params', arguments=['-config', LaunchConfiguration('yaml_path')], remappings=[ - ('/openvino_toolkit/image_raw', '/camera/color/image_raw'), + ('openvino_toolkit/image_raw', '/camera/color/image_raw'), ('/openvino_toolkit/segmentation/segmented_obejcts', '/ros2_openvino_toolkit/segmented_obejcts'), ('/openvino_toolkit/segmentation/images', '/ros2_openvino_toolkit/image_rviz')], diff --git a/sample/launch/pipeline_segmentation_instance.launch.py b/sample/launch/pipeline_segmentation_instance.launch.py index ec9da321..fc18f9ea 100644 --- a/sample/launch/pipeline_segmentation_instance.launch.py +++ b/sample/launch/pipeline_segmentation_instance.launch.py @@ -41,7 +41,7 @@ def generate_launch_description(): executable='pipeline_with_params', arguments=['-config', LaunchConfiguration('yaml_path')], remappings=[ - ('/openvino_toolkit/image_raw', '/camera/color/image_raw'), + ('openvino_toolkit/image_raw', '/camera/color/image_raw'), ('/openvino_toolkit/segmentation/segmented_obejcts', '/ros2_openvino_toolkit/segmented_obejcts'), ('/openvino_toolkit/segmentation/images', '/ros2_openvino_toolkit/image_rviz')], diff --git a/sample/launch/pipeline_segmentation_instance_ci_test.py b/sample/launch/pipeline_segmentation_instance_ci_test.py index 08f13803..51814df4 100644 --- a/sample/launch/pipeline_segmentation_instance_ci_test.py +++ b/sample/launch/pipeline_segmentation_instance_ci_test.py @@ -41,7 +41,7 @@ def generate_launch_description(): executable='pipeline_with_params', arguments=['-config', LaunchConfiguration('yaml_path')], remappings=[ - ('/openvino_toolkit/image_raw', '/camera/color/image_raw'), + ('openvino_toolkit/image_raw', '/camera/color/image_raw'), ('/openvino_toolkit/segmentation/segmented_obejcts', '/ros2_openvino_toolkit/segmented_obejcts'), ('/openvino_toolkit/segmentation/images', '/ros2_openvino_toolkit/image_rviz')], diff --git a/sample/launch/pipeline_segmentation_maskrcnn.launch.py b/sample/launch/pipeline_segmentation_maskrcnn.launch.py index e1901a3e..476ef919 100644 --- a/sample/launch/pipeline_segmentation_maskrcnn.launch.py +++ b/sample/launch/pipeline_segmentation_maskrcnn.launch.py @@ -41,7 +41,7 @@ def generate_launch_description(): executable='pipeline_with_params', arguments=['-config', LaunchConfiguration('yaml_path')], remappings=[ - ('/openvino_toolkit/image_raw', '/camera/color/image_raw'), + ('openvino_toolkit/image_raw', '/camera/color/image_raw'), ('/openvino_toolkit/segmentation/segmented_obejcts', '/ros2_openvino_toolkit/segmented_obejcts'), ('/openvino_toolkit/segmentation/images', '/ros2_openvino_toolkit/image_rviz')], diff --git a/sample/launch/pipeline_segmentation_maskrcnn_ci_test.py b/sample/launch/pipeline_segmentation_maskrcnn_ci_test.py index 98c71950..194fac81 100644 --- a/sample/launch/pipeline_segmentation_maskrcnn_ci_test.py +++ b/sample/launch/pipeline_segmentation_maskrcnn_ci_test.py @@ -41,7 +41,7 @@ def generate_launch_description(): executable='pipeline_with_params', arguments=['-config', LaunchConfiguration('yaml_path')], remappings=[ - ('/openvino_toolkit/image_raw', '/camera/color/image_raw'), + ('openvino_toolkit/image_raw', '/camera/color/image_raw'), ('/openvino_toolkit/segmentation/segmented_obejcts', '/ros2_openvino_toolkit/segmented_obejcts'), ('/openvino_toolkit/segmentation/images', '/ros2_openvino_toolkit/image_rviz')], diff --git a/sample/launch/ros2_openvino_oa.launch.py b/sample/launch/ros2_openvino_oa.launch.py index b759e165..13ea9b34 100644 --- a/sample/launch/ros2_openvino_oa.launch.py +++ b/sample/launch/ros2_openvino_oa.launch.py @@ -30,7 +30,7 @@ def generate_launch_description(): package='openvino_node', node_executable='pipeline_with_params', arguments=['-config', default_yaml], remappings=[ - ('/openvino_toolkit/image_raw', '/camera/color/image_raw'), + ('openvino_toolkit/image_raw', '/camera/color/image_raw'), ('/openvino_toolkit/object/detected_objects', '/ros2_openvino_toolkit/detected_objects'), ('/openvino_toolkit/object/images', '/ros2_openvino_toolkit/image_rviz')], From c4d4802aa8cd511c336388cbacb1fd93bd5b74a9 Mon Sep 17 00:00:00 2001 From: Jayabalaji Date: Mon, 21 Jul 2025 15:59:53 +0200 Subject: [PATCH 3/4] Update pipeline_segmentation.launch.py --- sample/launch/pipeline_segmentation.launch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sample/launch/pipeline_segmentation.launch.py b/sample/launch/pipeline_segmentation.launch.py index 4fb98463..40edff32 100644 --- a/sample/launch/pipeline_segmentation.launch.py +++ b/sample/launch/pipeline_segmentation.launch.py @@ -43,7 +43,7 @@ def generate_launch_description(): remappings=[ ('openvino_toolkit/image_raw', '/camera/color/image_raw'), ('/openvino_toolkit/segmentation/segmented_objects', - '/ros2_openvino_toolkit/segmented_obejcts'), + '/ros2_openvino_toolkit/segmented_objects'), ('/openvino_toolkit/segmentation/images', '/ros2_openvino_toolkit/image_rviz')], output='screen'), From d70c298f001fee26231eb3dbe6726b3c29580d39 Mon Sep 17 00:00:00 2001 From: Jayabalaji Date: Thu, 24 Jul 2025 10:16:38 +0200 Subject: [PATCH 4/4] Ros2 clean (#11) * Refactor topic and service names to relative for namespace compatibility This commit updates topic and service names from absolute to relative paths across the repository by removing prefixed '/' from ros2 names This enables the correct appending of namespaces to nodes, topics, and services, enhancing flexibility and modularity of the system. - Modified topic and service paths in C++ source files and headers. - Updated corresponding Python scripts to reflect relative naming. - Adjusted unit tests to align with the new naming convention. Signed-off-by: Arshad Mehmood * Fix review comments and replace /openvino_toolkit/image_raw with openvino_toolkit/image_raw in all the launch files * Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Signed-off-by: Arshad Mehmood Co-authored-by: Arshad Mehmood Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>