ros2-launch-debug
Skill0 starsChanged 6 months agoApache-2.0View on GitHub
ROS2 launchファイルのデバッグ支援。パラメータ解析、ノード依存関係の追跡、QoS不一致検出、トピック接続の検証を実施する。「launchが動かない」「パラメータが反映されない」「ノードが起動しない」等の問題調査に使用。
In this repository33 other files it gives its agents.
- add-mesh-peerSkill
- adrSkill
- analyze-logsSkill
- codex-consultSkill
- codex-reviewSkill
- config-analyzerSkill
- cross-reviewSkill
- drawioSkill
- empirical-prompt-tuningSkill
- git-historySkill
- github-writingSkill
- hard-task-playbookSkill
- inherit-wipSkill
- interviewSkill
- ja-natural-reviewSkill
- mcp-smoke-via-claude-pSkill
- meeting-minutesSkill
- memoSkill
- nerfstudio-trainerSkill
- obsidian-work-loggerSkill
- plan-with-qaSkill
- poll-sonnet-workersSkill
- post-merge-cleanupSkill
- release-applySkill
- ros2-inspectorSkill
- ros-analyzeSkill
- safe-pathspec-commitSkill
- setup-claude-localSkill
- split-advisorSkill
- surveySkill
- work-logSkill
- write-specSkill
- zenn-interviewSkill
The file
Files
ROS2 Launch Debug
Overview
ROS2 launchファイルの構造解析・パラメータ検証・依存関係追跡を行い、起動時の問題を特定するスキル。
When to Use
- "launchが動かない" / "ノードが起動しない"
- "パラメータが反映されない"
- "launchファイルを調査して"
- "QoSが合わない"
- "ノードの依存関係を確認"
- launch.pyの構造理解や修正が必要な場面全般
How to Use
Step 1: Launch ファイルの特定と読込
ユーザーの指定するlaunchファイル、または作業ディレクトリ内のlaunchファイルを特定する。
find . -name "*.launch.py" -o -name "*.launch.xml" -o -name "*.launch.yaml" | head -20対象launchファイルを読み込み、以下を抽出する:
Node()/LifecycleNode()の定義一覧LaunchConfiguration/DeclareLaunchArgumentの一覧IncludeLaunchDescriptionによる子launch参照ComposableNodeContainer/LoadComposableNodeの使用GroupAction,OpaqueFunction等の動的構成remappingsの設定
Step 2: パラメータチェーン解析
パラメータの流れを追跡する:
- 宣言チェック:
DeclareLaunchArgumentのデフォルト値と型 - 参照チェック:
LaunchConfigurationが正しい名前を参照しているか - YAML読込チェック:
parameters=[yaml_file]のパスが存在するか - 型変換チェック: 数値パラメータに
PythonExpressionでの型変換が必要か - 上書きチェック: 同じパラメータが複数箇所で上書きされていないか
# よくあるミス例
Node(
parameters=[{
'robot_name': LaunchConfiguration('robot_name'), # str型で渡される
'max_speed': LaunchConfiguration('max_speed'), # これもstr → floatに変換必要
}]
)Step 3: ノード依存関係の解析
起動順序の問題を検出:
- TF依存:
robot_state_publisherより前にTFを要求するノードがないか - Service依存:
lifecycle_managerが管理するノードの起動順序 - Topic依存: サブスクライバがパブリッシャより先に起動してメッセージを受け取れない場合
- 名前空間衝突: 同じノード名やトピック名が競合していないか
Step 4: QoS互換性チェック
launchファイル内およびノードのソースコード(見つかれば)からQoS設定を確認:
| 設定 | 互換条件 |
| Reliability | Publisher=BestEffort, Subscriber=Reliable → NG |
| Durability | Publisher=Volatile, Subscriber=TransientLocal → NG |
| History | 深刻な問題になることは少ないが、Depth差に注意 |
Step 5: 実行時検証(ROS2システム稼働中の場合)
ROS2が動いている場合は追加で以下を実行:
# ノードの起動確認
ros2 node list
# 期待されるトピックが存在するか
ros2 topic list
# 特定ノードの状態確認
ros2 lifecycle get <node_name>
# パラメータの実際の値
ros2 param dump <node_name>Step 6: 報告
日本語で以下のフォーマットで報告:
## Launch解析結果
### 構成概要
- **Launchファイル**: path/to/file.launch.py
- **定義ノード数**: N
- **子Launch数**: N
- **LaunchArgument数**: N
### ノード一覧
| ノード名 | パッケージ | 実行ファイル | 名前空間 |
|----------|-----------|------------|---------|
| ... | ... | ... | ... |
### 検出された問題
#### 重大
1. **[問題の概要]**
- 該当箇所: `ファイル:行番号`
- 原因: ...
- 修正案: ...
#### 警告
1. **[警告の概要]**
- 影響: ...
- 推奨: ...
### パラメータフロー
LaunchArgument → Node Parameter の流れを可視化
### 推奨アクション
1. ...
2. ...Common Issues Checklist
FindPackageShareのパッケージがインストールされているか- YAML設定ファイルのパスが正しいか
PythonExpressionで数値型に変換しているかcondition=IfCondition()の条件が正しいかremappingsのトピック名にtypoがないかnamespaceの二重適用(GroupAction + Node)がないかuse_sim_timeが一貫して設定されているか- composable node の
target_containerが正しいコンテナを指しているか
ROS2 Launch Python API Quick Reference
| クラス | 用途 |
Node | 通常のノード起動 |
LifecycleNode | ライフサイクルノード起動 |
ComposableNodeContainer | コンポーネントコンテナ |
LoadComposableNode | コンポーネント動的ロード |
IncludeLaunchDescription | 子launch読込 |
GroupAction | 名前空間・条件付きグループ |
DeclareLaunchArgument | 引数宣言 |
LaunchConfiguration | 引数参照 |
OpaqueFunction | 動的構成(Python関数) |
SetEnvironmentVariable | 環境変数設定 |
ExecuteProcess | 任意プロセス実行 |
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

