1
0

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 1 year has passed since last update.

ROS2 Eloquent でのQoS調整時の備忘録

Last updated at Posted at 2023-05-26

背景

ROS2業務の最後に、QoS設定を調整して通信状態を安定化させようとした際の備忘録

環境

ROS2 Eloquent

DDS変更

基本は以下

単純に、install して、export したら変更可能だった

  1. install

    sudo apt install ros-eloquent-rmw-cyclonedds-cpp
    
  2. export

    export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp
    

エラー発生時の対処法

  • Defaultで入っていると思って export だけしてみると、インストールされてねーよ

    • install するのみ
  • KeepAllは、プロセス間通信では使えない。以下のようなエラーが出る

    Interprocess communication is not allowed with keep all history qos policy

  • Type がサポートされていない?

    [ERROR] [node]: could not create publisher: type support handle implementation 'rosidl_typesupport_cpp' (0x7f539f74a0) does not match valid type supports ('rosidl_typesupport_opensplice_cpp' (0x7f1c0ab118), 'rosidl_typesupport_opensplice_c' (0x7f863506d0)), at /tmp/binarydeb/ros-eloquent-rmw-opensplice-cpp-0.8.1/src/rmw_publisher.cpp:101, at /tmp/binarydeb/ros-eloquent-rcl-0.8.5/src/rcl/publisher.c:173

    こんな感じのが出るときは、ビルドからやり直すと上手くいくっぽい

切り替えが簡単に出来るものは、apt-installですぐわかる。

apt install で補完かけると以下のように出る。shared はfastrtps の共通部分っぽい
ros-eloquent-rmw
ros-eloquent-rmw-connext-cpp
ros-eloquent-rmw-connext-shared-cpp
ros-eloquent-rmw-cyclonedds-cpp
ros-eloquent-rmw-cyclonedds-cpp-dbgsym
ros-eloquent-rmw-dbgsym
ros-eloquent-rmw-fastrtps-cpp
ros-eloquent-rmw-fastrtps-cpp-dbgsym
ros-eloquent-rmw-fastrtps-dynamic-cpp
ros-eloquent-rmw-fastrtps-dynamic-cpp-d
ros-eloquent-rmw-fastrtps-shared-cpp
ros-eloquent-rmw-fastrtps-shared-cpp-db
ros-eloquent-rmw-implementation
ros-eloquent-rmw-implementation-cmake
ros-eloquent-rmw-implementation-dbgsym
ros-eloquent-rmw-opensplice-cpp
ros-eloquent-rmw-opensplice-cpp-dbgsym

Dynamic Binding

DDS を通信単位で変えることは現状できないけれど、研究してるっぽい。Eloquentじゃ古すぎて恩恵受けられないけど

QoS 設定

設定例は、以下

QoS Class は以下

Default設定やEnum値は以下を確認
/opt/ros/eloquent/include/rmw/types.h

/opt/ros/eloquent/include/rmw/qos_profiles.h

所感

QoS/DDS 調整する為にも、ノード単位の処理時間、通信遅延(Callback の開始時刻で代用?)、通信漏れ確認用Serial等を Performance 測定用に突っ込んでおいた方がいいですね。
でもって、現状は DDS はシステム全体で共通なので、全体、もしくは重要な通信品質に注目して調整が必要

あとがき

ROS2 に関わって、Jetson もなかなかに面白いなぁと思ったけど
Jetson 以外の選択肢も拡充されていて、開発環境的に Jetson って使いやすいんだろうか?という疑問があった
Visual Studio のような開発環境もなんかあったのかもしれないけれど・・結局デバッグが超苦痛だった・・

さて、次は Azure へ旅立とう :laughing:

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?