IntelRealSense / realsense-ros

ROS Wrapper for Intel(R) RealSense(TM) Cameras
http://wiki.ros.org/RealSense
Apache License 2.0
2.6k stars 1.76k forks source link

Unable to compile realsense-ros on Ubuntu 22.04 running Docker #3233

Closed kushal2507 closed 1 month ago

kushal2507 commented 1 month ago

Required Info
Camera Model D435i
Firmware Version 5.16.0.1
Operating System & Version Ubuntu 22
Kernel Version (Linux Only) 6.8.0-47-generic
Platform PC
Librealsense SDK Version 2.56.2
ROS Distro Humble
RealSense ROS Wrapper Version 4.56.1

Issue Description

I am running docker with Ubuntu 22.04 having kernel 6.8.0.47-generic. The host PC on which the docker is running has the same properties. I followed the instructions mentioned here to clone and compile librealsense. In my ros2_ws I have cloned realsense-ros with tag 4.56.1. Upon running colcon build I get the following error and I am unable to compile it.

Screenshot from 2024-10-25 10-45-41

I am running my docker container with the following runArgs :

"runArgs": [ "--network=host", "--cap-add=SYS_PTRACE", "--security-opt=seccomp:unconfined", "--security-opt=apparmor:unconfined", "--ipc=host", "--pid=host", "--gpus=all", "--env=NVIDIA_DRIVER_CAPABILITIES=all", "--env=DISPLAY", "--privileged", "--volume=/dev:/dev", "--device-cgroup-rule=c 189:* rmw", "--volume=/tmp/.X11-unix:/tmp/.X11-unix", ]

MartyG-RealSense commented 1 month ago

Hi @kushal2507 There was a recent case of the Can't create temporary cache file /etc/ld.so.cache~: Permission denied error at https://github.com/IntelRealSense/realsense-ros/issues/3197#issuecomment-2330933365 and the apparent cause of the problem in that particular case was that the ROS wrapper was not the only data in the catkin workspace folder. The RealSense user in that case had installed librealsense into the catkin folder too.

Can you confirm if the ROS wrapper is the only data installed in your ros2_ws/src folder please?

kushal2507 commented 1 month ago

Indeed, I had the librealsense folder inside my src/ folder. After moving it out, I am able to compile it. I have however run into different issue snow for which I will open a new issue. Thank you for your help!

MartyG-RealSense commented 1 month ago

You are very welcome. I'm pleased to hear that moving librealsense's location worked for you. :)