ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

How to disable the output of one node

asked 2020-10-16 10:09:49 -0500

Hey everybody,

I'm using the usb_cam-package and this is sending a lot of error/info massages I don't want to see. The massages are not produced with ROS_ERROR but come from some included package (probably std::cout). The video stream is working regardless the error and I don't have the time to resolve the issue. I tried "Setting Verbosity Levels" from but it didn't work.

My question therefor is if it is possible to "mute" this node so that the node-output is not flooding my console? I still want to see the output of the other nodes.

Thank you


edit retag flag offensive close merge delete


Some years later, experiencing the very same issue with usb_cam. Did you managed to find a solution?

bluegiraffe-sc gravatar image bluegiraffe-sc  ( 2023-02-27 11:47:14 -0500 )edit

As I can remember I didn't. Sorry.

RobertZickler gravatar image RobertZickler  ( 2023-02-27 13:25:24 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted

answered 2023-02-27 15:40:15 -0500

bluegiraffe-sc gravatar image

More than two years later, I came into the same issue with the usb_cam package. Below I propose two solutions, a general one, and a package-specific one.

General solution to mute rosrun output

A possible solution when launching a node from the command line, is to redirect the output (find a brief introduction to the topic and a useful cheat-sheet here) of the node by using

rosrun package_name node_name 2>&-

With this, one can run the node and see the [INFO] messages, while muting the unwanted warnings/errors.

Avoid usb_cam_node errors passing the right params at launch

Inspecting the usb_cam-test.launch file, I have noticed the following parameters being passed to the usb_cam_node at launch:

<node pkg="usb_cam" name="usb_cam_node" type="usb_cam_node">
        <param name="video_device" value="/dev/video0" />
        <param name="image_width" value="640" />
        <param name="image_height" value="480" />
        <param name="pixel_format" value="yuyv" />
        <param name="color_format" value="yuv422p" />
        <param name="camera_frame_id" value="usb_cam" />
        <param name="io_method" value="mmap"/>

In my case, this set of params solved the warning messages.

Any explanation of the meaning of the parameters (and possibly of those to be held accountable for the warnings) is very welcome! I will do my best to update the answer with more insights if I have the occasion to dig a little bit more into this topic.

edit flag offensive delete link more

answered 2020-10-16 10:57:56 -0500

Roberto Z. gravatar image

updated 2020-10-16 10:59:53 -0500

Have you tried including output="log" inside the corresponding <node> tag in your launch file?

For instance

  <node name="usb_cam" pkg="usb_cam" type="usb_cam_node" output="log"/>

From the documentation at

If 'screen', stdout/stderr from the node will be sent to the screen. If 'log', the stdout/stderr output will be sent to a log file in $ROS_HOME/log, and stderr will continue to be sent to screen. The default is 'log'.

edit flag offensive delete link more


Hey Roberto,

thank you. I've seen and tried that but I still get the error messages. How can I silent those too? "stderr will continue to be sent to screen"

RobertZickler gravatar image RobertZickler  ( 2020-11-02 04:28:08 -0500 )edit

Question Tools

1 follower


Asked: 2020-10-16 10:09:49 -0500

Seen: 3,123 times

Last updated: Feb 27 '23