1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

ROS2 FoxyでRealSenseの環境構築(ubuntu20.04)

Posted at

#パッケージインストール for Ubuntu 16/18/20 LTS

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-get install librealsense2-dkms
sudo apt-get install librealsense2-utils
sudo apt-get install librealsense2-dev
sudo apt-get install librealsense2-dbg
sudo apt-get update
sudo apt-get upgrade

#起動確認

realsense-viewer 

右上にFirmware Update Recommended!と表示された場合はinstallをクリック

image.png

###ROS2関連パッケージインストール

sudo apt-get install ros-foxy-cv-bridge ros-foxy-librealsense2 ros-foxy-message-filters ros-foxy-image-transport
sudo apt-get install -y libssl-dev libusb-1.0-0-dev pkg-config libgtk-3-dev
sudo apt-get install -y libglfw3-dev libgl1-mesa-dev libglu1-mesa-dev

mkdir -p ~/realsense_ws/src
cd ~/realsense_ws/src/
git clone https://github.com/IntelRealSense/realsense-ros.git -b foxy
git clone https://github.com/IntelRealSense/librealsense
cd librealsense/
git checkout  remotes/origin/ros2debian 

cd ~/realsense_ws/
colcon build 
source ~/realsense_ws/install/local_setup.bash

#起動確認(ターミナル1)

ros2 launch realsense2_camera rs_launch.py 

#起動確認(ターミナル2)

source ~/realsense_ws/install/local_setup.bash
ros2 run rqt_image_view rqt_image_view 

topicを切り替えて確認
image.png

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?