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"/>
</node>
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.
Some years later, experiencing the very same issue with
usb_cam
. Did you managed to find a solution?As I can remember I didn't. Sorry.