0
$\begingroup$

I am trying to use a web cam with the aruco_ros package to estimate the pose of an ArUco marker. The package I am using to get the camera images is the v4l2_camera package but I am having a problem, v4l2_camera_node is publishing /camera_info without the information like this:

header:
  stamp:
    sec: 1694104949
    nanosec: 776459841
  frame_id: ''
height: 480
width: 640
distortion_model: ''
d: []
k:
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
r:
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
p:
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
binning_x: 0
binning_y: 0
roi:
  x_offset: 0
  y_offset: 0
  height: 0
  width: 0
  do_rectify: false

I already calibrated my camera with the camera_calibration package and saved the results. When I run v4l2_camera_node I get a couple errors:

[INFO] [1694106573.030815912] [v4l2_camera]: Driver: uvcvideo
[INFO] [1694106573.031204681] [v4l2_camera]: Version: 393743
[INFO] [1694106573.031261676] [v4l2_camera]: Device: Integrated Camera: Integrated C
[INFO] [1694106573.031301723] [v4l2_camera]: Location: usb-0000:00:14.0-8
[INFO] [1694106573.031338402] [v4l2_camera]: Capabilities:
[INFO] [1694106573.031374606] [v4l2_camera]:   Read/write: NO
[INFO] [1694106573.031411856] [v4l2_camera]:   Streaming: YES
[INFO] [1694106573.031454594] [v4l2_camera]: Current pixel format: YUYV @ 640x480
[INFO] [1694106573.031619333] [v4l2_camera]: Available pixel formats: 
[INFO] [1694106573.031663159] [v4l2_camera]:   MJPG - Motion-JPEG
[INFO] [1694106573.031699589] [v4l2_camera]:   YUYV - YUYV 4:2:2
[INFO] [1694106573.031733434] [v4l2_camera]: Available controls: 
[INFO] [1694106573.031775698] [v4l2_camera]:   Brightness (1) = 128
[INFO] [1694106573.031820045] [v4l2_camera]:   Contrast (1) = 32
[INFO] [1694106573.031860894] [v4l2_camera]:   Saturation (1) = 64
[INFO] [1694106573.032499536] [v4l2_camera]:   Hue (1) = 0
[INFO] [1694106573.032556092] [v4l2_camera]:   White Balance, Automatic (2) = 1
[INFO] [1694106573.032598837] [v4l2_camera]:   Gamma (1) = 120
[INFO] [1694106573.032640281] [v4l2_camera]:   Power Line Frequency (3) = 1
[INFO] [1694106573.033182735] [v4l2_camera]:   White Balance Temperature (1) = 4600 [inactive]
[INFO] [1694106573.033259586] [v4l2_camera]:   Sharpness (1) = 0
[INFO] [1694106573.033303499] [v4l2_camera]:   Backlight Compensation (1) = 1
[ERROR] [1694106573.033357630] [v4l2_camera]: Failed getting value for control 10092545: Permission denied (13); returning 0!
[INFO] [1694106573.033395094] [v4l2_camera]:   Camera Controls (6) = 0
[INFO] [1694106573.033426300] [v4l2_camera]:   Auto Exposure (3) = 3
[INFO] [1694106573.033979184] [v4l2_camera]:   Exposure Time, Absolute (1) = 156 [inactive]
[INFO] [1694106573.034107672] [v4l2_camera]:   Exposure, Dynamic Framerate (2) = 0
[WARN] [1694106573.035972783] [v4l2_camera]: Control type not currently supported: 6, for control: Camera Controls
[INFO] [1694106573.037698539] [v4l2_camera]: Starting camera
[WARN] [1694106573.248302454] [v4l2_camera]: Image encoding not the same as requested output, performing possibly slow conversion: yuv422_yuy2 => rgb8
[INFO] [1694106573.254334950] [v4l2_camera]: using default calibration URL
[INFO] [1694106573.254442777] [v4l2_camera]: camera calibration URL: file:///home/automatebase/.ros/camera_info/integrated_camera:_integrated_c.yaml
[ERROR] [1694106573.254593077] [camera_calibration_parsers]: Unable to open camera calibration file [/home/automatebase/.ros/camera_info/integrated_camera:_integrated_c.yaml]
[WARN] [1694106573.254640735] [v4l2_camera]: Camera calibration file /home/automatebase/.ros/camera_info/integrated_camera:_integrated_c.yaml not found

There is no /camera_info folder inside /.ros, shoud I just create that folder and paste the the YAML file from the calibration?

[EDIT] Using usb_cam package:

I also tried using the usb_cam package instead of the v4l2_camera package, however I have the same problem, the usb_camera_node gives me the error:

[ERROR] [1694444697.653173284] [usb_cam]: Invalid camera calibration URL: /home/automatebase/.ros/camera_info/camera_info.yaml

And the camera info is not published. This is the output from the calibration node in case that helps:

mono pinhole calibration...
D = [0.14880426526992593, -0.03236985997669252, -0.01781091717583487, 0.0236618003681507, 0.0]
K = [674.5058161190959, 0.0, 346.95961390137086, 0.0, 675.1512129728582, 198.31744172459904, 0.0, 0.0, 1.0]
R = [1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0]
P = [702.38525390625, 0.0, 355.45461080182577, 0.0, 0.0, 709.22509765625, 193.2878561560501, 0.0, 0.0, 0.0, 1.0, 0.0]
None
# oST version 5.0 parameters


[image]

width
640

height
480

[camera]

camera matrix
674.505816 0.000000 346.959614
0.000000 675.151213 198.317442
0.000000 0.000000 1.000000

distortion
0.148804 -0.032370 -0.017811 0.023662 0.000000

rectification
1.000000 0.000000 0.000000
0.000000 1.000000 0.000000
0.000000 0.000000 1.000000

projection
702.385254 0.000000 355.454611 0.000000
0.000000 709.225098 193.287856 0.000000
0.000000 0.000000 1.000000 0.000000

('Wrote calibration data to', '/tmp/calibrationdata.tar.gz')
D = [0.14880426526992593, -0.03236985997669252, -0.01781091717583487, 0.0236618003681507, 0.0]
K = [674.5058161190959, 0.0, 346.95961390137086, 0.0, 675.1512129728582, 198.31744172459904, 0.0, 0.0, 1.0]
R = [1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0]
P = [702.38525390625, 0.0, 355.45461080182577, 0.0, 0.0, 709.22509765625, 193.2878561560501, 0.0, 0.0, 0.0, 1.0, 0.0]
# oST version 5.0 parameters


[image]

width
640

height
480

[camera]

camera matrix
674.505816 0.000000 346.959614
0.000000 675.151213 198.317442
0.000000 0.000000 1.000000

distortion
0.148804 -0.032370 -0.017811 0.023662 0.000000

rectification
1.000000 0.000000 0.000000
0.000000 1.000000 0.000000
0.000000 0.000000 1.000000

projection
702.385254 0.000000 355.454611 0.000000
0.000000 709.225098 193.287856 0.000000
0.000000 0.000000 1.000000 0.000000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!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
```
$\endgroup$

1 Answer 1

0
$\begingroup$

Welcome to Robotics Stack Exchange!

Please pay attenton to the following log messages:

[ERROR] [1694106573.033357630] [v4l2_camera]: Failed getting value for control 10092545: Permission denied (13); returning 0!
...
[ERROR] [1694106573.254593077] [camera_calibration_parsers]: Unable to open camera calibration file [/home/automatebase/.ros/camera_info/integrated_camera:_integrated_c.yaml]
[WARN] [1694106573.254640735] [v4l2_camera]: Camera calibration file /home/automatebase/.ros/camera_info/integrated_camera:_integrated_c.yaml not found

For some reason, the calibration file can not be created.

  1. Please make sure that /home/automatebase/.ros/camera_info/ path exists. If note please create it as shown below:
    mkdir -p /home/automatebase/.ros/camera_info/
    
  2. Your file name is integrated_camera:_integrated_c.yaml which is ususal and not recommended. This could be the cause of your problem. Please fix it.
$\endgroup$
1
  • $\begingroup$ Sorry for the late response, created the folder and change the file name but didnt work so I tried using another package but it is still not working, I added the results to the original question. $\endgroup$ Sep 11 at 15:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.