Skip to content

Conversation

@Nobu19800
Copy link

Identify the Bug

Description of the Change

以下と同じ。

Verification

  • Did you succeed the build?
  • No warnings for the build?
  • Have you passed the unit tests?

@Nobu19800 Nobu19800 added the enhancement New feature or request label Mar 7, 2022
@Nobu19800 Nobu19800 requested a review from n-ando March 7, 2022 00:20
@Nobu19800 Nobu19800 self-assigned this Mar 7, 2022
@n-kawauchi n-kawauchi marked this pull request as ready for review November 26, 2025 06:06
@n-kawauchi
Copy link

@Nobu19800 下記手順で動作確認していますが、C++版PR1019で確認したパラメータがRTCのコンソール画面に出力されません。確認手順でおかしいところがあればご指摘お願いします。

  • PRソースを最新masterへマージし、debパッケージを生成、これを使ってインストール(Ubuntu24.04環境)
  • 下記を実行
    $ source /opt/ros/jazzy/setup.bash
    $ export PYTHONPATH=$PYTHONPATH:/usr/lib/python3/dist-packages
    $ export PATH=$PATH:/usr/lib/python3/dist-packages/
    
  • rtc.confに下記を記載してConsoleIn/COnsoleOutを実行・・・インターフェース型にfast-rtpsを指定
    manager.modules.load_path: /usr/lib/python3/dist-packages/OpenRTM_aist/ext/transport/ROS2Transport/
    manager.modules.preload: ROS2Transport.py
    manager.components.preconnect: ConsoleOut0.in?interface_type=fast-rtps&marshaling_type=ros2:std_msgs/Float32&fast-rtps.topic=chatter, ConsoleIn0.out?interface_type=fast-rtps&marshaling_type=ros2:std_msgs/Float32&fast-rtps.topic=chatter
    manager.components.preactivation: ConsoleOut0, ConsoleIn0
    
  • RTSE上でポート間を接続しても、RTCコンソール画面には下記しか出力されない
$ python3 ConsoleOut.py -f rtc.conf
------------------------------
Listener:        ON_CONNECT
Profile::name:   ConsoleOut0.in?interface_type=fast-rtps&marshaling_type=ros2:std_msgs/Float32&fast-rtps.topic=chatter
Profile::id:     59f91bad-ca8d-11f0-8c50-c8e265a26188
------------------------------
------------------------------
Listener:        ON_CONNECT
Profile::name:   ConsoleOut0.in_ConsoleIn0.out
Profile::id:     6ca614f2-ca8d-11f0-94f2-c8e265a26188
------------------------------
Factory.createObject return None id:  cdr
------------------------------
Listener:        ON_RECEIVED
Profile::name:   ConsoleOut0.in?interface_type=fast-rtps&marshaling_type=ros2:std_msgs/Float32&fast-rtps.topic=chatter
Profile::id:     59f91bad-ca8d-11f0-8c50-c8e265a26188
Data:            123
------------------------------
$ python3 ConsoleIn.py -f rtc.conf
------------------------------
Listener:        ON_CONNECT
Profile::name:   ConsoleIn0.out?interface_type=fast-rtps&marshaling_type=ros2:std_msgs/Float32&fast-rtps.topic=chatter
Profile::id:     5510a730-ca8d-11f0-ab24-c8e265a26188
------------------------------
Please input number: ------------------------------
Listener:        ON_CONNECT
Profile::name:   ConsoleOut0.in_ConsoleIn0.out
Profile::id:     6ca614f2-ca8d-11f0-94f2-c8e265a26188
------------------------------
Factory.createObject return None id:  cdr
123
Sending to subscriber:  123

@Nobu19800
Copy link
Author

@n-kawauchi
動作確認としてはRTSystemEditorのコネクタプロファイルの画面にパラメータが表示されるかの確認ですが、それ以前の問題としてコンソール画面にパラメータが表示されないという指摘ですか?
実装したのがかなり前なので動作をよく覚えていないのですが、コネクタプロファイルにパラメータを設定して接続しないとコンソール画面には表示されなかったような気がするのですが、C++版ではどういう動作でしたか?

@n-kawauchi
Copy link

@Nobu19800
C++版は、RTSEでのポート間接続時事にinterface_typeでfast-rtpsを選択してOKを押すと、
RTCコンソール画面にパラメータが表示されました。しかしPythonの場合は同じ手順でもコンソール画面に表示されません。

RTSEでinterface_typeでfast-rtpsを選択してOKボタンを押す前にインターフェースオプションタブを開いた時、
C++はsubscriber、publisherのパラメータが見えますが、Pythonの場合はreader_qos、writer_qosのパラメータになっています。
この違いが影響しているのでしょうか? キャプチャ画像を貼り付けます。
なお、interface_typeでfast-rtpsを選択する以外の設定はデフォルトのままOKボタンを押しています。

  • C++
RTSE-ConnectorProfile-C++
  • Python
RTSE-ConnectorProfile-Python

@Nobu19800
Copy link
Author

@n-kawauchi
コンソール画面に表示されないのはPython版のConsoleIn、ConsoleOutコンポーネントがC++版と動作が違うためです。
以下のプルリクエストをマージして試してください。

Copy link

@n-kawauchi n-kawauchi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR325をマージしたところ、RTCのコンソール画面にパラメータが表示されることを確認できました。

  • 修正ソースから作成したdebパッケージでインストールした環境のConsoleIn/ConsoleOutの接続で確認時、rtc.confに下記を追記
manager.modules.load_path: /usr/lib/python3/dist-packages/OpenRTM_aist/ext/transport/ROS2Transport/
manager.modules.preload: ROS2Transport.py
manager.components.preconnect: ConsoleOut0.in?interface_type=fast-rtps&marshaling_type=ros2:std_msgs/Float32&fast-rtps.topic=chatter, ConsoleIn0.out?interface_type=fast-rtps&marshaling_type=ros2:std_msgs/Float32&fast-rtps.topic=chatter
manager.components.preactivation: ConsoleOut0, ConsoleIn0
  • RTC実行ターミナルで事前に下記を実行
$ source /opt/ros/jazzy/setup.bash
$ export PYTHONPATH=$PYTHONPATH:/usr/lib/python3/dist-packages
$ export PATH=$PATH:/usr/lib/python3/dist-packages/
  • ポートのinterface_typeでfast-rtpsを選択して接続すると下記が出力された
$ python3 ./ConsoleOut.py -f rtc.conf
   :
Listener:        ON_CONNECT
Profile::name:   ConsoleOut0.in_ConsoleIn0.out
Profile::id:     76fe73a4-cbfa-11f0-a2bd-c8e265a26188
Profile::properties:
- data_type: IDL:RTC/TimedLong:1.0
- interface_type: fast-rtps
- dataflow_type: push
- subscription_type: flush
- publisher
  - push_policy: all
- outport
  - buffer
    - length: 8
    - write
      - full_policy: overwrite
      - timeout: 1.0
    - read
      - empty_policy: readback
      - timeout: 1.0
  - topic: chatter, chatter
  - writer_qos
    - avoid_ros_namespace_conventions: YES, YES
    - deadline
      - period
        - nanosec: 0, 0
        - sec: 0, 0
    - history
      - depth: 1, 1
      - kind: KEEP_LAST_HISTORY_QOS, KEEP_LAST_HISTORY_QOS
    - lifespan
      - duration
        - nanosec: 0, 0
        - sec: 0, 0
    - liveliness
      - kind: AUTOMATIC_LIVELINESS_QOS, AUTOMATIC_LIVELINESS_QOS
      - lease_duration
        - nanosec: 0, 0
        - sec: 0, 0
    - reliability
      - kind: RELIABLE_RELIABILITY_QOS, RELIABLE_RELIABILITY_QOS
- inport
  - buffer
    - length: 8
    - write
      - full_policy: overwrite
      - timeout: 1.0
    - read
      - empty_policy: readback
      - timeout: 1.0
  - reader_qos
    - avoid_ros_namespace_conventions: YES, YES
    - deadline
      - period
        - nanosec: 0, 0
        - sec: 0, 0
    - history
      - depth: 1, 1
      - kind: KEEP_LAST_HISTORY_QOS, KEEP_LAST_HISTORY_QOS
    - lifespan
      - duration
        - nanosec: 0, 0
        - sec: 0, 0
    - liveliness
      - kind: AUTOMATIC_LIVELINESS_QOS, AUTOMATIC_LIVELINESS_QOS
      - lease_duration
        - nanosec: 0, 0
        - sec: 0, 0
    - reliability
      - kind: RELIABLE_RELIABILITY_QOS, RELIABLE_RELIABILITY_QOS
  - topic: chatter, chatter
  - data_type: IDL:RTC/TimedLong:1.0
  :

@n-ando n-ando merged commit 220e187 into OpenRTM:master Dec 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants