How to disable rosout on ROS2

asked 2022-01-07 16:06:51 -0500

variable gravatar image

updated 2022-01-07 17:04:17 -0500

How do I disable the /rosout topic on ROS2?

I am on eloquent, I see foxy can use the NodeOptions.enable_rosout(false) in the constructor. I'm hoping to set this at runtime not fixed at compile time, though.

The documentation show solution for ROS1, such as ros::init_options::NoRosout and ROSCPP_NO_ROSOUT

But the ros namespace is ROS1. How is this done in ROS2?

In addition, how is this done in a yaml launch file?

edit retag flag offensive close merge delete

Comments

I have found that using ros2 run mypkg myexec --ros-args --disable-rosout-logs prevents /rosout publications. How do I pass --ros-args --disable-rosout-logs as a yaml launch file parameter?

variable gravatar image variable  ( 2022-01-07 17:20:59 -0500 )edit