ROS2: programmatic alternative to command line arguments for initialization

asked 2019-11-20 09:31:51 -0600

alsora gravatar image

Hi,

Usually, when we initialize a ROS 2 application, we call the init function as

rclcpp::init(argc, argv);

This will parse the command line arguments and generate options for initializing various components of ROS 2. I'm wondering if there's a way for doing something like

auto options = InitOptions().enableExternalLogger(true).enableRosoutLogger(false).setLoggerLevel(DEBUG);
rclcpp::init(options);

I noticed that an InitOptions class is already present, but it looks to me that it is not currently used for this purpose.

edit retag flag offensive close merge delete