LoginSignup
2
0

More than 3 years have passed since last update.

【ROS2】xml形式のlaunchでremapとparameterを記述する方法

Last updated at Posted at 2020-02-24

はじめに

ROS2でもlaunchファイルをxml形式で書けるようになりました.そこで本記事では,xml形式のremapとparameterについて記述方法を説明します.

テスト環境

  • Ubuntu 18.04
  • ROS Eloquent

remapとparameterの記述方法

<launch>
    <node pkg="demo_parameters_cpp" exec="string_talker" >
        <remap from="string_topic" to="/talker" />
        <param name="string_param" value="launch defalt" />
    </node>
</launch>

remap

ROS1と同じです.

parameter

こちらも記述方法はROS1と同じです.yamlファイルで読み込みたい場合は
<param from="$(find-pkg-share パッケージ名)/yout/parameter/file/path" />
のように書くとyamlファイルからparameterを設定できます.

参考

ROS2 Launch XML Format

関連記事

2
0
2

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
2
0