Bye Bye Moore

PoCソルジャーな零細事業主が作業メモを残すブログ

Ubuntu 22.04LTS on RasPi 4B な ROS2 humble環境にrealsense2-cameraをいれる

実際のところ

前提

ROS2 humbleの環境構築が済んでいる
shuzo-kino.hateblo.jp

作業

$ sudo apt install ros-humble-realsense2-*

作業スペースがdev_wsの場合

$ cd ~/dev_ws/src

$ git clone https://github.com/IntelRealSense/realsense-ros.git -b ros2-development
$ cd ~/dev_ws/
$ rosdep update
$ rosdep install -i --from-path src --rosdistro $ROS_DISTRO --skip-keys=librealsense2 -y

今回はRasPi4Bの上に組んでいてQtまわりが上手くいかないっぽいのでgazebo系を除外

$ colcon build --packages-skip realsense_gazebo_plugin xarm_gazebo xarm_planner

動作

とりあえずrunで

$ ros2 run realsense2_camera realsense2_camera_node
$ ros2 topic list
/camera/camera/color/camera_info
/camera/camera/color/image_raw
/camera/camera/color/metadata
/camera/camera/depth/camera_info
/camera/camera/depth/image_rect_raw
/camera/camera/depth/metadata
/camera/camera/extrinsics/depth_to_color
/camera/camera/extrinsics/depth_to_infra1
/camera/camera/extrinsics/depth_to_infra2
/camera/camera/infra1/camera_info
/camera/camera/infra1/image_rect_raw
/camera/camera/infra1/metadata
/camera/camera/infra2/camera_info
/camera/camera/infra2/image_rect_raw
/camera/camera/infra2/metadata
/parameter_events
/rosout
/tf_static