Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Permission denied when getting or setting value for camera control #17

Open
kentoshima opened this issue Apr 12, 2024 · 3 comments
Open

Comments

@kentoshima
Copy link

[ERROR] [1712895934.763410546] [v4l2_camera]: Failed setting value for control Exposure Time, Absolute to 157: Permission denied (13)

when running the test node, I'm sure that I have the permission to modify the device(through sudo chmod 666 /dev/video0 command), but still failed to run the node, also I tested running with root, no worked

@manato
Copy link
Collaborator

manato commented Apr 26, 2024

@kentoshima
Some cameras don't support setting exposure time via the v4l2 interface, which may cause the error. I would appreciate if you could check the support of your camera

@lhmwtum
Copy link

lhmwtum commented Aug 20, 2024

@kentoshima @manato
I am experiencing the same issue. My setup consists of a TierIV C1 camera and a Nvidia Jetson Orin board. The camera is connected via GMSL2 and I have the tier4 automotive hdr camera driver (see https://github.com/tier4/tier4_automotive_hdr_camera/tree/main) already running. The raw camera stream looks pretty good (visualized via gstreamer). The only thing that does not work is launching this ros2 node properly and publishing the camera stream a as ros2 camera image message.

Did you find a solution for the permission denied errors during node launch? How did you manage to overcome this issue?
Thanks a lot!

@lhmwtum
Copy link

lhmwtum commented Aug 29, 2024

We have the ros2 camera node running now and can publish a smooth ros2 camera image stream. The "trick" was to launch our docker container with the "--privileged" flag. Apparently, the GMSL camera device needs some more permissions than the one coming from the TierIV USB converter box we did try before.

Our current docker launch command looks similar to this:

docker run \
--network host \
--device=/dev/video0 \
--runtime nvidia \
--privileged \
-it interface:camera

Obviously, it's not a very satisfying solution to just launch the docker container with full system access. Thus, we would like to learn a bit more on how the ros2 driver accesses the video device and which system permissions are necessary (in addition to the ones already granted by mounting the video device into the docker container). What's the difference between the mounted camera device when using GMSL or the TierIV USB converter box?

Docker mentions the default kernel capabilities granted when using the --device flag and the additional ones, which must be explicitly granted, here: https://docs.docker.com/engine/containers/run/#runtime-privilege-and-linux-capabilities

Which additional kernel capabilities do we have to add in order to be able to drop the --privileged flag?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants