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

using usb_cam from remote computer. Cannot identify '/dev/video0': 2, No such file or directory

asked 2023-02-14 12:17:41 -0500

kozinovsky gravatar image

updated 2023-02-16 02:00:44 -0500

gvdhoorn gravatar image

Hello everyone!

My configuration is the following:

1) ROS-master computer: Nvidia TX2 with Ubuntu 18.04, ROS melodic and package usb_cam installed on it , and Logitech USB camera connected to it through the USB port

2) The computer which I try to start the command roslaunch usb_cam usb_cam-test.launch from: Ubuntu 18.04

I've found one similar question on this forum: #q284015.

But my problem is a little bit different because my configuration includes 2 computers.

Here is the situation:

I ssh on board computer (Nvidia TX2 with Ubuntu 18.04 and ROS melodic) and start roscore on it and after that start this command on my computer:

roslaunch usb_cam usb_cam-test.launch

So, ROS-Master is different computer from the one where I start the command. But I don't have any issues with connecting to ROS-master. And roslaunch usb_cam usb_cam-test.launch works perfectly fine, when I do it locally, on Nvidia TX2 which is ROS-master computer.

I have an error when I try to run it on my laptop which isn't ROS-master and after the following command:

roslaunch usb_cam usb_cam-test.launch

I have this error message:

[ERROR] [1676393342.653244327]: Cannot identify '/dev/video0': 2, No such file or directory
[usb_cam-1] process has died [pid 3741, exit code 1, cmd /opt/ros/melodic/lib/usb_cam/usb_cam_node __name:=usb_cam __log:=/....log

I can see /dev/video0 device on my ROS-master computer, so, the device totally exists and, as I mentioned above, I can run this command locally on the ROS-master computer, the problem is only with running the command from the remote computer.

Looks like some problem with the permission of the remote user, but I don't understand how to add permission for the remote user:

Try adding yourself to the user group

sudo usermod -a -G dialout $USER

Mean, this advice looks like something which can help me, but I don't understand how to apply it for the remote user/computer

Thanks in advance!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2023-02-15 13:19:41 -0500

gvdhoorn gravatar image

Are you trying to start a .launch file which requires a usb camera on a PC which doesn't have the camera connected?

If that's the case, the problem would not be permissions, but the fact the camera is connected to the other device/PC.

edit flag offensive delete link more

Comments

Ops, that is exactly what I am trying to do. Thank you, I didn't know that this launch file can be run only locally (on ROS-master PC). But then, how, using usb_cam package can I see a camera picture on the remote laptop which has access to the ROS-master PC with a connected USB camera to it?

kozinovsky gravatar image kozinovsky  ( 2023-02-15 13:51:41 -0500 )edit
1

Start image_view (or whatever you want to use to see the sensor_msgs/Image stream) on your laptop after starting the .launch file which starts usb_cam on the host with the camera?

ROS is networked/distributed by default. You just have to configure it correctly.

gvdhoorn gravatar image gvdhoorn  ( 2023-02-15 14:37:27 -0500 )edit

Thank you so much! That is what I was looking for. Just checked it on my setup - it works. Thanks again!

kozinovsky gravatar image kozinovsky  ( 2023-02-15 16:04:04 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2023-02-14 12:17:41 -0500

Seen: 324 times

Last updated: Feb 16 '23