1
3

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 5 years have passed since last update.

roslaunchで引数を与える書き方メモ

Posted at

roslaunchで引数を与える場合にはlaunchファイルを以下のように書く必要がある。

(hoge.launch)
<launch>
<arg name="argParam" default="true" /> <!--ここに入力引数を記述-->
<node name="hoge_node_name" pkg="hoge_package_name" type="hoge_node_name" > <!--nodeのたちあげ-->
    <param name="argParam" value="$(arg argParam)"/> <!--nodeに入力引数をあたえる-->
</node>
</launch>

上記のように記述すると、デフォルトではargParamにtrueが与えられて、

=false

とすれば、falseが与えられる。
その他の書き方は
https://qiita.com/honeytrap15/items/550c757f2964b575883c
参照

1
3
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
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?