以下の内容はhttps://shuzo-kino.hateblo.jp/entry/2024/12/03/233227より取得しました。


あたらしいURDFファイルをrviz2で描画できるようにするまで

実際のところ

$ mkdir -p ~/ros2_ws/src
$ cd ~/ros2_ws/src

パッケージ類を作成

$ ros2 pkg create --build-type ament_cmake robot_description

# 必要なディレクトリを作成

$ cd robot_description
$ mkdir -p urdf meshes launch rviz config

必要なファイルを作成

$ cd robot_description
$ touch rviz/view_robot.rviz
$ touch launch/display.launch.py

package.xml、CMakeLists.txtはコマンドで生成済み

# ros2_wsディレクトリで
$ cd ~/ros2_ws

# rosdep更新
rosdep update

# 依存関係のインストール
rosdep install --from-paths src --ignore-src -r -y
# ワークスペースでビルド
colcon build --packages-select nyokkey4_description

# 環境の設定(.bashrcに書いていない場合)
source ~/dev_ws/install/setup.bash

参考もと




以上の内容はhttps://shuzo-kino.hateblo.jp/entry/2024/12/03/233227より取得しました。
このページはhttp://font.textar.tv/のウェブフォントを使用してます

不具合報告/要望等はこちらへお願いします。
モバイルやる夫Viewer Ver0.14