From 6255c1c2437c12b97b19b1b7f2e7ac4c96cbf129 Mon Sep 17 00:00:00 2001 From: LucasHaug Date: Wed, 8 Feb 2023 09:16:00 +0000 Subject: [PATCH] Fix ROS2 args when no ROS1 args --- src/command_parser_utils.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/command_parser_utils.cpp b/src/command_parser_utils.cpp index 963d9bb8..b5b6c22b 100644 --- a/src/command_parser_utils.cpp +++ b/src/command_parser_utils.cpp @@ -81,11 +81,12 @@ void split_ros1_ros2_args( if (it != args.end()) { ros1_args = std::vector(args.begin(), it); ros2_args = std::vector(it, args.end()); - ros2_args.insert(ros2_args.begin(), args.at(0)); } else { ros1_args = args; - ros2_args = args; + ros2_args = {}; } + + ros2_args.insert(ros2_args.begin(), args.at(0)); } } // namespace ros1_bridge