
15. ์๋ก์ด ROS ํจํค์ง๋ฅผ ์ฌ์ฉํ๋ ๋ฒ - Intel realsense
๏ฟผ
๋ก๋ด์ ์๋ก์ด ์ผ์(depth camera)๋ฅผ ๋ฌ๊ณ ์ถ์ ์ํฉ, ๊ทธ๋ฐ๋ฐ ROS๋ฅผ ์ฌ์ฉํ๊ณ ์์ด ํธํ์ฑ์ ์ผ๋ํด์ผ ํ๋ค๋ฉด??

- ๋ค์ ํ์ด์ง๋ฅผ ํตํด ์ํ๋ ์ผ์ ์ค ROS๋ฅผ ์ง์ํ๋ ๊ฒ์ด ์๋์ง ์ดํด๋ด ๋๋ค.
- ์ฑ๋ฅ์ ๋น๊ตํ์ฌ ์ต์ข ๋ชจ๋ธ์ ์ ํํ๊ณ , ํ์ฌ ์ฌ์ฉ์ค์ธ ๊ฐ๋ฐํ๊ฒฝ์์ ์ฌ์ฉ ๊ฐ๋ฅํ์ง (ros version, ๊ธฐ์กด ์ฌ์ฉ์ค์ธ ํจํค์ง์์ ํธํ์ฑ ๋ฑ๋ฑ) github wiki, readme ๊ตฌ๊ธ๋ง์ ํตํด ๊ฒ์ํด๋ณด๊ณ ๊ตฌ๋งคํฉ๋๋ค. (๊ตฌ๋งค ์์ ๊ฐ๊ฒฉ ๋น๊ต๋ ๋ฌผ๋ก ํด์ผ๊ฒ ์ง์ ๐)
- ์ผ์๊ฐ ๋์ฐฉํ์ต๋๋ค!! ์ฐพ์๋์๋ ํํ ๋ฆฌ์ผ๋๋ก ์ค๋นํด๋ณด๊ณ , ์คํ ์์ผ๋ด ๋๋ค.
Intel realsense Depth Camera
Stereo Depth - Intelยฎ RealSenseโข Depth and Tracking Cameras
Intelยฎ RealSenseโข Stereo Depth Technology brings 3D to devices
and machines that only see 2D today. Check out our latest active stereo depth cameras.



image from : compare cameras
๋๋ฐ์ด์ค ๋งํธ ๊ตฌ๋งค ๋งํฌ
1. librealsense ๋ฆฌ๋ ์ค ๋ฐฐํฌํ ํจํค์ง ์ค์น
- Register the server's public key:
$ sudo apt-key adv --keyserver keys.gnupg.net --recv-key F6E65AC044F831AC80A06380C8B3A55A6F3EFCDE || sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-key F6E65AC044F831AC80A06380C8B3A55A6F3EFCDE
Executing: /tmp/apt-key-gpghome.QjWrP9b5UR/gpg.1.sh --keyserver keys.gnupg.net --recv-key F6E65AC044F831AC80A06380C8B3A55A6F3EFCDE
gpg: key C8B3A55A6F3EFCDE: ""CN = Intel(R) Intel(R) Realsense", O=Intel Corporation" not changed
gpg: Total number processed: 1
gpg: unchanged: 1
- Add the server to the list of repositories
$ sudo add-apt-repository "deb http://realsense-hw-public.s3.amazonaws.com/Debian/apt-repo bionic main" -u
Hit:1 https://dl.yarnpkg.com/debian stable InRelease
Hit:2 http://packages.microsoft.com/repos/vscode stable InRelease
Hit:3 http://dl.google.com/linux/chrome/deb stable InRelease
Hit:4 https://packages.microsoft.com/repos/ms-teams stable InRelease
Hit:5 http://packages.ros.org/ros/ubuntu bionic InRelease
Hit:6 http://security.ubuntu.com/ubuntu bionic-security InRelease
Hit:7 http://kr.archive.ubuntu.com/ubuntu bionic InRelease
Hit:8 http://realsense-hw-public.s3.amazonaws.com/Debian/apt-repo bionic InRelease
Hit:9 http://kr.archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:10 http://kr.archive.ubuntu.com/ubuntu bionic-backports InRelease
Reading package lists... Done
- Install the libraries (see section below if upgrading packages):
$ sudo apt-get install librealsense2-dkms -y
$ sudo apt-get install librealsense2-utils -y
$ sudo apt-get install librealsense2-utilssudo
$ sudo apt-get install librealsense2-devsudo
$ sudo apt-get install librealsense2-dbg
- Optionally install the developer and debug packages
$ sudo apt-get install librealsense2-dev -y
$ sudo apt-get install librealsense2-dbg -y
- ์ค์น ํ์ธ
$ realsense-viewer
With dev
package installed, you can compile
an application with librealsense using g++ -std=c++11 filename.cpp -lrealsense2
or an IDE of
your choice.
๐ก
๊ณต์ ์ค์น ๋ ํผ๋ฐ์ค ๋งํฌ๋ฅผ ๋จ๊น๋๋ค. ์ค๋ฅ ๋ฐ์ ์ ์ฐธ๊ณ ํ์ธ์!!
IntelRealSense/realsense-ros
These are packages for using Intel RealSense cameras (D400
series SR300 camera and T265 Tracking Module) with ROS. This version supports Kinetic,
Melodic and Noetic distributions. For running in ROS2-Eloquent environment please switch to
the eloquent branch. For running in ROS2-Foxy environment please switch to the foxy branch.
IntelRealSense/librealsense
Using pre-build packages Intelยฎ RealSenseโข SDK 2.0 provides
installation packages for Intel X86/AMD64-based Debian distributions in format for Ubuntu
16/18/20 LTS. The Realsense DKMS kernel drivers package ( librealsense2-dkms) supports
Ubuntu LTS kernels 4.4, 4.8, 4.10, 4.13, 4.15, 4.18*, 5.0*, 5.3* and 5.4. Please refer to
Ubuntu Kernel Release Schedule for further details.
2. Installing ddynamic_reconfigure
$ cd ~/gcamp_ws/src/
$ sudo apt-get install ros-melodic-dynamic-reconfigure
$ sudo apt-get install ros-melodic-ddynamic-reconfigure
pal-robotics/ddynamic_reconfigure
The ddynamic_reconfigure package is a C++ extension of
dynamic_reconfigure that allows modifying parameters of a ROS node using the
dynamic_reconfigure framework without having to write cfg files.
3. Installing Install RealSense ROS : ์ถ์ฒ
- repo clone ๋ฐ checkout
cd ~/catkin_ws/src/
git clone https://github.com/IntelRealSense/realsense-ros.git
cd realsense-ros/
git checkout `git tag | sort -V | grep -P "^2.\d+\.\d+" | tail -1`
cd ..
- catkin_make
cd ..
catkin_make clean
catkin_make -DCATKIN_ENABLE_TESTING=False -DCMAKE_BUILD_TYPE=Release
catkin_make install
Launch!!!
$ roslaunch realsense2_camera rs_camera.launch
# point cloud ํฌํจ ์คํ
$ roslaunch realsense2_camera rs_camera.launch filters:=pointcloud

์์ฉ ์ฌ๋ก - SLAM with D435i

IntelRealSense/realsense-ros
The RealSenseโข D435i is equipped with a built in IMU. Combined
with some powerful open source tools, it's possible to achieve the tasks of mapping and
localization. There are 4 main nodes to the process: realsense2_camera imu_filter_madgwick
rtabmap_ros robot_localization The first thing to do is to install the components:
realsense2_camera: Follow the installation guide in: https://github.com/intel-ros/realsense.
์ผ์ ๋ฟ๋ง ์๋๋ผ, ์๋ก์ด ํ๋์จ์ด๋ก์ ์ ๊ทธ๋ ์ด๋, ์คํ์์ค import ์์ ํญ์ ์์ ์ค๋ช ํ๋ ๋ด์ฉ๋ค์ ์ ๋ ํ์๊ธธ ๋ฐ๋๋๋ค.
ROS์ ๊ฐ๋ ฅํ ํจํค์ง integration์ ์ด์ฉํด์ ๋น ๋ฅด๊ฒ ๋ก๋ด์ ๊ตฌ์ถํด ๋ณด์ธ์ ๐