Ask Your Question

ERROR: cannot launch node of type [usb_cam/usb_cam_node]: usb_cam

asked 2020-06-10 07:40:56 -0500

Tron gravatar image

I'm trying to launch start_robot.launch. However, I'm getting this error about node image description ERROR: cannot launch node of type [usb_cam/usb_cam_node]: usb_cam ROS path [0]=/opt/ros/kinetic/share/ros ROS path [1]=/home/tron/catkin_ws/src ROS path [2]=/opt/ros/kinetic/share

When I run v4l2-ctl --list-devices I'm getting this: PC Camera (usb-0000:00:14.0-4): /dev/video0

When I test webcam with cheese it's successfully working.

Here is the code for the node:

<launch> <arg name="sim" default="false"/>

<node pkg="usb_cam" type="usb_cam_node" name="top_front_camera" unless="$(arg sim)">
    <param name="camera_name" value="top_front_camera"/>
    <param name="camera_frame_id" value="top_front_camera_optical_frame"/>
    <param name="image_width" value="1920"/>
    <param name="image_height" value="1080"/>

<group ns="top_front_camera">
    <node pkg="nodelet" type="nodelet" name="camera_nodelet_manager" args="manager"/>

    <node pkg="image_transport" type="republish" name="decompress" args="compressed in:=image_raw raw out:=image_raw" if="$(arg sim)"/>

    <node pkg="nodelet" type="nodelet" name="rectify" args="load image_proc/rectify camera_nodelet_manager">
        <remap from="image_mono" to="image_raw"/>
        <remap from="camera_info" to="camera_info"/>
        <remap from="image_rect" to="image_rect"/>
        <param name="queue_size" value="5"/>
    <!-- qhd -->
    <node pkg="nodelet" type="nodelet" name="qhd_resize" args="load image_proc/resize camera_nodelet_manager">
        <remap from="image" to="image_raw"/>
        <remap from="camera_info" to="camera_info"/>
        <remap from="~image" to="qhd/image_raw"/>
        <remap from="~camera_info" to="qhd/camera_info"/>
        <param name="use_scale" value="1"/>
        <param name="scale_width" value="0.5"/>
        <param name="scale_height" value="0.5"/>
        <param name="queue_size" value="5"/>
    <node pkg="nodelet" type="nodelet" name="qhd_rectify" args="load image_proc/rectify camera_nodelet_manager">
        <remap from="image_mono" to="qhd/image_raw"/>
        <remap from="camera_info" to="qhd/camera_info"/>
        <remap from="image_rect" to="qhd/image_rect"/>
        <param name="queue_size" value="5"/>
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2020-11-24 13:28:22 -0500

tryan gravatar image

The error indicates that ROS can't find that resource (usb_cam_node), which usually happens when the package is not installed though there may be other reasons. You can check if it's installed with

rospack find usb_cam

This command will return the package path if it's installed.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2020-06-10 07:40:56 -0500

Seen: 665 times

Last updated: Nov 24 '20