Function rclcpp::remove_ros_arguments

Function Documentation

std::vector<std::string> rclcpp::remove_ros_arguments(int argc, char const *const *argv)

Remove ROS-specific arguments from argument vector.

Some arguments may not have been intended as ROS arguments. This function populates the arguments in a vector. Since the first argument is always assumed to be a process name, the vector will always contain the process name.

Parameters:
  • argc[in] Number of arguments.

  • argv[in] Argument vector.

Throws:
  • anything – throw_from_rcl_error can throw

  • rclcpp::exceptions::RCLError – if the parsing fails

Returns:

Members of the argument vector that are not ROS arguments.