ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
For rclcpp, in #include <utilities.hpp>
you have the following two functions that return a std::vector<std::string> with the argv trimmed down of any ROS arguments:
std::vector<std::string>
init_and_remove_ros_arguments(
int argc,
char const * const * argv,
const InitOptions & init_options = InitOptions());
and:
std::vector<std::string>
remove_ros_arguments(int argc, char const * const * argv);
In python rclpy, you have args = rclpy.utilities.remove_ros_args(sys.argv)
which does the same thing.