uvc_camera node on Ubuntu 18.04.3 on Oracle Virtual box delivers terrible image.

asked 2020-01-23 02:47:58 -0500

nakakachi gravatar image

some environment info:

rosdistro: melodic
rosversion: 1.14.3
Oracle VM: 6.1

The Ubuntu guvcview works fine, so there should be no problems with the uvc driver and my web cam.

For your reference to driver environment, I ran:

v4l2-ctl -d /dev/video0 –all
the result below:
Driver Info (not using libv4l2):
        Driver name   : uvcvideo
        Card type     : VirtualBox Webcam - USB Camera:
        Bus info      : usb-0000:00:06.0-1
        Driver version: 5.0.15
        Capabilities  : 0x84A00001
                Video Capture
                Metadata Capture
                Streaming
                Extended Pix Format
                Device Capabilities
        Device Caps   : 0x04200001
                Video Capture
                Streaming
                Extended Pix Format
Priority: 2
Video input : 0 (Camera 1: ok)
Format Video Capture:
        Width/Height      : 1920/1080
        Pixel Format      : 'MJPG'
        Field             : None
        Bytes per Line    : 0
        Size Image        : 1228800
        Colorspace        : sRGB
        Transfer Function : Default (maps to sRGB)
        YCbCr/HSV Encoding: Default (maps to ITU-R 601)
        Quantization      : Default (maps to Full Range)
        Flags             :
Crop Capability Video Capture:
        Bounds      : Left 0, Top 0, Width 1920, Height 1080
        Default     : Left 0, Top 0, Width 1920, Height 1080
        Pixel Aspect: 1/1
Selection: crop_default, Left 0, Top 0, Width 1920, Height 1080
Selection: crop_bounds, Left 0, Top 0, Width 1920, Height 1080
Streaming Parameters Video Capture:
        Capabilities     : timeperframe
        Frames per second: 25.000 (25/1)
        Read buffers     : 0
                     brightness 0x00980900 (int)    : min=0 max=100 step=1 default=50 value=50

I executed:

rosrun uvc_camera uvc_camera_node

But I did it without the launch file, because I have no idea on what to do, also because successful examples I refered to seemed not to use the launch file.

The output message below:

[ INFO] [1579760001.246181062]: using default calibration URL
[ INFO] [1579760001.247002639]: camera calibration URL: file:///home/comas/.ros/camera_info/camera.yaml
[ INFO] [1579760001.247141319]: Unable to open camera calibration file [/home/comas/.ros/camera_info/camera.yaml]
[ WARN] [1579760001.247232595]: Camera calibration file /home/comas/.ros/camera_info/camera.yaml not found.
opening /dev/video0
pixfmt 0 = 'MJPG' desc = 'Motion-JPEG'
  discrete: 1920x1080:   1/30 1/25 1/20 1/15 1/10 1/5 
  discrete: 800x600:   1/30 1/25 1/20 1/15 1/10 1/5 
  discrete: 1024x768:   1/30 1/25 1/20 1/15 1/10 1/5 
  discrete: 1280x720:   1/30 1/25 1/20 1/15 1/10 1/5 
  discrete: 1280x960:   1/30 1/25 1/20 1/15 1/10 1/5 
  discrete: 1600x900:   1/30 1/25 1/20 1/15 1/10 1/5 
  discrete: 1600x1200:   1/30 1/25 1/20 1/15 1/10 1/5 
  discrete: 640x480:   1/30 1/25 1/20 1/15 1/10 1/5 
  discrete: 2592x1944:   1/15 1/10 1/5 
  discrete: 3264x2448:   1/15 1/10 1/5 
  int (Brightness, 0, id = 980900): 0 to 100 (1)

Topic lists are:

/camera_info
/image_raw
/image_raw/compressed
/image_raw/compressed/parameter_descriptions
/image_raw/compressed/parameter_updates
/image_raw/compressedDepth
/image_raw/compressedDepth/parameter_descriptions
/image_raw/compressedDepth/parameter_updates
/image_raw/theora
/image_raw/theora/parameter_descriptions
/image_raw/theora/parameter_updates
/rosout
/rosout_agg

Then I tried to run image_view:

$rosrun image_view image_view image:=/image_raw

THe image is like 20 ... (more)

edit retag flag offensive close merge delete