====== Realsense2 + ROS ====== Minimal test setup in [[documentation:containers|ROS containers]]: To allow hardware to work within containers you have to use the option ''use-real'' which will map ''/dev'' inside (for USB communication) and run docker in ''%%--%%priviledged'' mode which will allow the container to have the same priviledges as outside the container for interacting with hardware. ==== Inside the container ==== # Install realsense drivers # Get distribution environment variables . /etc/lsb-release export repo="https://librealsense.intel.com/Debian/apt-repo" export repo_check="$repo $DISTRIB_CODENAME main" export repo_add="$repo main" if ! grep -q "^deb .*$repo_check" /etc/apt/sources.list /etc/apt/sources.list.d/*; then\ sudo apt-key adv --keyserver keys.gnupg.net --recv-key F6E65AC044F831AC80A06380C8B3A55A6F3EFCDE sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-key F6E65AC044F831AC80A06380C8B3A55A6F3EFCDE sudo add-apt-repository "$repo_add" -u else echo "Realsense repo exists already." fi sudo apt update sudo apt install -y librealsense2-dkms librealsense2-utils librealsense2-dev ros-noetic-realsense2-camera To get all Robotlab pieces for vision there is a config: workspace init minimal_vision.rosinstall cd ~/catkin_ws catkin build workspace shell roslaunch vision realsense_d435.launch # launches a node ==== Known issues ==== If you get an error similar to this: ''failed to open usb interface: 0, error: RS2_USB_STATUS_ACCESS'' This is known to be fixable by a firmware update of the Realsense D435 camera.