Open kentoshima opened 7 months ago
@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
@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!
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?
[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 withroot
, no worked