documentation:vision:realsense2-ros

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
documentation:vision:realsense2-ros [2023/01/17 15:02] – created marcuskdocumentation:vision:realsense2-ros [2023/01/19 10:06] (current) marcusk
Line 1: Line 1:
 ====== Realsense2 + ROS ====== ====== Realsense2 + ROS ======
  
-Minimal test setup in ROS containers:+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 ====
 <cli> <cli>
-sudo apt install ros-noetic-realsense2-camera +# Install realsense drivers 
-roslaunch realsense2_camera rs_camera.launch+# 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
 </cli> </cli>
  
-This should start ROS node and create suitable topics.+To get all Robotlab pieces for vision there is a config: 
 +<cli> 
 +workspace init minimal_vision.rosinstall 
 +cd ~/catkin_ws 
 +catkin build 
 +workspace shell 
 +roslaunch vision realsense_d435.launch   # launches a node 
 +</cli> 
 + 
 +==== 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.
  • documentation/vision/realsense2-ros.1673967721.txt.gz
  • Last modified: 2023/01/17 15:02
  • by marcusk