![見出し画像](https://assets.st-note.com/production/uploads/images/68026540/rectangle_large_type_2_90d5efce3d8657c0262578db2540a1e5.png?width=1200)
ROS入門 (42) - rviz2でのURDFの表示
「rviz2」でのURDFの表示方法をまとめました。
・Galactic
前回
1. ROS2のURDFチュートリアルのインストール
ROS2のURDFチュートリアルをインストールします。rviz2でURDFを表示するlanchファイルが含まれています。
(1) ROS2のurdf_tutorialをクローンしてビルド。
$ cd ~/colcon_ws/src
$ git clone -b ros2 https://github.com/ros/urdf_tutorial.git src/urdf_tutorial
(2) ワークスペースのビルドとセットアップ。
$ cd ~/colcon_ws
$ colcon build --packages-select urdf_tutorial
$ source ~/colcon_ws/install/setup.bash
(3) 依存関係をインストール。
$ sudo apt update
$ sudo apt install ros-galactic-joint-state-publisher-gui
$ sudo apt install ros-galactic-joint-state-publisher
$ sudo apt install ros-galactic-xacro
2. rviz2でのURDFの表示
(1) URDFを準備。
今回は、以下の「toio_like.urdf」を使います。
(2) rviz2でのURDFの表示。
$ ros2 launch urdf_tutorial display.launch.py model:=toio_style.urdf
![](https://assets.st-note.com/img/1639835045032-3q7sT8et9h.png?width=1200)
次回
この記事が気に入ったらサポートをしてみませんか?