Usb_cam

Trying to run an external usb camera(Spedal 920 Pro usb web cam) usb cam package. I plugged out astra camera and plugged in Am I missing something here?
husarion@husarion:~$ roslaunch usb_cam usb_cam-test.launch … logging to /home/husarion/.ros/log/93006452-6230-11ea-a542-409f384f007f/roslaunch-husarion-22050.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://husarion:44375/

SUMMARY

PARAMETERS

  • /image_view/autosize: True
  • /rosdistro: kinetic
  • /rosversion: 1.12.14
  • /usb_cam/camera_frame_id: usb_cam
  • /usb_cam/image_height: 480
  • /usb_cam/image_width: 640
  • /usb_cam/io_method: mmap
  • /usb_cam/pixel_format: yuyv
  • /usb_cam/video_device: /dev/video0

NODES
/
image_view (image_view/image_view)
usb_cam (usb_cam/usb_cam_node)

ROS_MASTER_URI=http://master:11311

process[usb_cam-1]: started with pid [22067]
process[image_view-2]: started with pid [22068]
[ INFO] [1583788346.795073484]: Initializing nodelet with 4 worker threads.
[ INFO] [1583788346.863406839]: Using transport “raw”
libEGL warning: DRI2: failed to authenticate
[ INFO] [1583788346.989798390]: using default calibration URL
[ INFO] [1583788346.990553225]: camera calibration URL: file:///home/husarion/.ros/camera_info/head_camera.yaml
[ INFO] [1583788346.991528562]: Unable to open camera calibration file [/home/husarion/.ros/camera_info/head_camera.yaml]
[ WARN] [1583788346.996317453]: Camera calibration file /home/husarion/.ros/camera_info/head_camera.yaml not found.
[ INFO] [1583788346.996590454]: Starting ‘head_camera’ (/dev/video0) at 640x480 via mmap (yuyv) at 30 FPS
[ERROR] [1583788352.058700964]: Cannot open ‘/dev/video0’: 16, Device or resource busy
[usb_cam-1] process has died [pid 22067, exit code 1, cmd /home/husarion/ros_workspace/devel_isolated/usb_cam/lib/usb_cam/usb_cam_node __name:=usb_cam __log:=/home/husarion/.ros/log/93006452-6230-11ea-a542-409f384f007f/usb_cam-1.log].
log file: /home/husarion/.ros/log/93006452-6230-11ea-a542-409f384f007f/usb_cam-1*.log

Hello Thiaga,

First thing would be to check if camera is supported and detected by system.
What is the output of ls /dev/video* command? There should be at least one entry like /dev/video0.
Also you could try to preview camera image with another application like cheese. Install it with:

sudo apt install cheese

Then start application with

cheese

You should be able to see camera image.

Regards,
Łukasz

Hi Lukaz,
Thanks for the reply. ls /dev/video* ouputs /dev/video0 but cheese does not show camera image. Does it mean this camera isn’t supported?

husarion@husarion:~$ cheese

(cheese:2721): GStreamer-CRITICAL **: gst_element_message_full: assertion ‘GST_IS_ELEMENT (element)’ failed
** Message: cheese-application.vala:211: Error during camera setup: No device found

(cheese:2721): cheese-CRITICAL **: cheese_camera_device_get_name: assertion ‘CHEESE_IS_CAMERA_DEVICE (device)’ failed

(cheese:2721): GLib-CRITICAL **: g_variant_new_string: assertion ‘string != NULL’ failed

(cheese:2721): GLib-GIO-CRITICAL **: g_settings_schema_key_type_check: assertion ‘value != NULL’ failed

(cheese:2721): GLib-CRITICAL **: g_variant_get_type_string: assertion ‘value != NULL’ failed

(cheese:2721): GLib-GIO-CRITICAL **: g_settings_set_value: key ‘camera’ in ‘org.gnome.Cheese’ expects type ‘s’, but a GVariant of type ‘(null)’ was given

** (cheese:2721): CRITICAL **: cheese_preferences_dialog_setup_resolutions_for_device: assertion ‘device != NULL’ failed

Hi Thiaga,

Did you try the camera on any other computer with Ubuntu system, eg. a laptop?

Regards,
Łukasz

Hi Lukasz,
Yes I tried the camera on an ubuntu laptop and it worked. I was wondering if it is because of the system requirements of the camera – I found 4GHZ Intel Core2 Duo i3 processor or higher and 2GB memory or higher. Does the Tinkerboard qualify this requirement?

Best,
Thiaga