PCIe permission denied when using ROS and realsense camera

I got the following error when use PCIe and ROS on d435i camera:

14/02 10:00:38,567 ERROR [547035681152] (types.h:304) get_dev_capabilities: Cannot open '/dev/video5 Last Error: Permission denied
14/02 10:00:38,581 ERROR [547035681152] (types.h:304) get_dev_capabilities: Cannot open '/dev/video3 Last Error: Permission denied
14/02 10:00:38,605 ERROR [547035681152] (types.h:304) get_dev_capabilities: Cannot open '/dev/video8 Last Error: Permission denied
14/02 10:00:38,606 ERROR [547035681152] (types.h:304) get_dev_capabilities: Cannot open '/dev/video6 Last Error: Permission denied
14/02 10:00:38,607 ERROR [547035681152] (types.h:304) get_dev_capabilities: Cannot open '/dev/video4 Last Error: Permission denied
14/02 10:00:38,615 ERROR [547035681152] (types.h:304) get_dev_capabilities: Cannot open '/dev/video7 Last Error: Permission denied

The realsense camera can work under realsense-viewer app, but under ROS it shows such error. We believe the problem is not the hardware compatibility.

Any comment/suggestion is appreciate.

I have not used ROS, but those are not PCIe errors. What do you see from:

ls -l /dev/video*

Is your user a member of group “video”? Check via this (I am assuming your user name is “ubuntu”, but adjust for your login name):

grep ubuntu /etc/group

If that user is not a member of group “video”, then you could append that as a supplemental group like this (again, I am assuming login name “ubuntu”, but adjust for your case):

sudo usermod -a -G video

Thanks for the reply. I can confirm the problem is solved.