ROSでLidarを起動してみるまでのセットアップ手順
環境
・Ubuntu 20.04
・ROS noetic
ちなみに製品は「Intel RealSense LiDAR Camera L515」。
Note: Set up at 2022/01/13
realsense Lidar一覧表
目次
1 Intel Realsense SDK インストール
2. realsense-rosのセットアップ
3. ROSでRealsense Lidarを起動
4. Realsense Lidarのrostopic list
1 Intel Realsense SDK インストール
以下の公式インストール手順に従う。# 公開鍵を登録 $ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-key F6E65AC044F831AC80A06380C8B3A55A6F3EFCDE || sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-key F6E65AC044F831AC80A06380C8B3A55A6F3EFCDE # サーバーをレポジトリリストに登録 $ sudo add-apt-repository "deb https://librealsense.intel.com/Debian/apt-repo $(lsb_release -cs) main" -u # ライブラリをインストール $ sudo apt update $ sudo apt upgrade $ sudo apt-get install librealsense2-dkms $ sudo apt-get install librealsense2-utils # 開発者用ツール、デバッガツールをインストール $ sudo apt-get install librealsense2-dev $ sudo apt-get install librealsense2-dbg
試しに起動してみる
$ realsense-viewer
3Dでdepth画像まで写ってる。ハイスペック。
ROSのインストール
ROS(noetic)はinstall済み。
trafalbad.hatenadiary.jp
2. realsense-rosのセットアップ
$ cd ~/catkin_ws/src # ROS1用のレポジトリをgit clone $ git clone -b ros1-legacy https://github.com/IntelRealSense/realsense-ros.git $ cd realsense-ros/ #### Note:Switching to '2.3.2' #### HEAD is now at f400d68 2.3.2 # ddynamic_reconfigureのinstall $ sudo apt-get install ros-noetic-ddynamic-reconfigure # ROSでrealsense2_cameraをinstall $ sudo apt-get install ros-noetic-realsense2-camera
# catkin make $ cd ~/catkin_ws $ catkin_make clean >>> 〜〜〜 #### #### Running command: "make clean -j8 -l8" in "/home/hagi/catkin_ws/build" #### $ catkin_make -DCATKIN_ENABLE_TESTING=False -DCMAKE_BUILD_TYPE=Release >>> 〜〜〜 #### [100%] Linking CXX shared library /home/hagi/catkin_ws/devel/lib/librealsense2_camera.so #### [100%] Built target realsense2_camera $ catkin_make install >>> 〜〜〜〜 #### -- Installing: /home/hagi/catkin_ws/install/share/realsense2_camera/rviz/t265.rviz #### -- Installing: /home/hagi/catkin_ws/install/share/realsense2_camera/nodelet_plugins.xml
3. ROSでRealsense Lidarを起動
ROSでRealtimesense Lidarの起動
# 1つ目のターミナルで $ roslaunch realsense2_camera rs_camera.launch # 2つ目のターミナルで $ rosrun rqt_image_view rqt_image_view
別の方法で表示
# 1つ目のターミナルで $ roslaunch realsense2_camera rs_camera.launch # 2つ目のターミナルで (rosrun image_view image_view image:={ros topic path}) $ rosrun image_view image_view image:=/camera/color/image_raw
4. Realsense Lidarのrostopic list
rostopicコマンドで表示できるリスト一覧rosrun image_view image_view image:={ros topic path}
$ rostopic list >>> #### /camera/color/camera_info #### /camera/color/image_raw #### /camera/color/image_raw/compressed #### /camera/color/image_raw/compressed/parameter_descriptions #### /camera/color/image_raw/compressed/parameter_updates #### /camera/color/image_raw/compressedDepth #### /camera/color/image_raw/compressedDepth/parameter_descriptions #### /camera/color/image_raw/compressedDepth/parameter_updates #### /camera/color/image_raw/theora #### /camera/color/image_raw/theora/parameter_descriptions #### /camera/color/image_raw/theora/parameter_updates #### /camera/color/metadata #### /camera/depth/camera_info #### /camera/depth/image_rect_raw #### /camera/depth/image_rect_raw/compressed #### /camera/depth/image_rect_raw/compressed/parameter_descriptions #### /camera/depth/image_rect_raw/compressed/parameter_updates #### /camera/depth/image_rect_raw/compressedDepth #### /camera/depth/image_rect_raw/compressedDepth/parameter_descriptions #### /camera/depth/image_rect_raw/compressedDepth/parameter_updates #### /camera/depth/image_rect_raw/theora #### /camera/depth/image_rect_raw/theora/parameter_descriptions #### /camera/depth/image_rect_raw/theora/parameter_updates #### /camera/depth/metadata #### /camera/extrinsics/depth_to_color #### /camera/l500_depth_sensor/parameter_descriptions #### /camera/l500_depth_sensor/parameter_updates #### /camera/motion_module/parameter_descriptions #### /camera/motion_module/parameter_updates #### /camera/realsense2_camera_manager/bond #### /camera/rgb_camera/parameter_descriptions #### /camera/rgb_camera/parameter_updates #### /diagnostics #### /rosout #### /rosout_agg #### /tf #### /tf_static
参考
・ubuntu20.04とROS NoeticでRealSenseを使う手順・realsense-ros(GitHub)
・librealsense(Github)
・RealSense D435をROSで使う