Skip to content

IIOP通信以外でrtcname形式、rtcloc形式でRTCへアクセスできるようにする#257

Merged
n-ando merged 10 commits into
OpenRTM:masterfrom
Nobu19800:feature/supoorthttpssl
May 11, 2026
Merged

IIOP通信以外でrtcname形式、rtcloc形式でRTCへアクセスできるようにする#257
n-ando merged 10 commits into
OpenRTM:masterfrom
Nobu19800:feature/supoorthttpssl

Conversation

@Nobu19800

Copy link
Copy Markdown

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 Jan 23, 2022
@Nobu19800 Nobu19800 requested a review from n-ando January 23, 2022 22:14
@Nobu19800 Nobu19800 self-assigned this Jan 23, 2022
n-ando
n-ando previously approved these changes Jan 24, 2022
@n-kawauchi n-kawauchi marked this pull request as ready for review April 9, 2026 06:36

@n-kawauchi n-kawauchi left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

rtcname形式で、RTC間が接続されません。このPRソースを最新masterにマージしての確認です。

$ git log --oneline
fc93b6a (HEAD -> master) Merge branch 'feature/supoorthttpssl'
b28adeb (origin/master, origin/HEAD) Merge pull request #331 from Nobu19800/bugs/inscanoption
  • ネームサーバ起動
$ systemctl status omniorb-nameserver.service
$ sudo systemctl stop omniorb-nameserver.service
$ /usr/bin/openrtmNames -f /usr/etc/rtc.names.http.conf
  • ConsoleIn起動
$ mkdir pytest257
$ cd pytest257/
$ cp -r /usr/share/openrtm-2.1/components/python3/* .
$ cd SimpleIO/
$ python3 ConsoleIn.py -f /usr/lib/python3/dist-packages/OpenRTM_aist/ext/http/rtc.http.conf
  • ConsoleOut起動
$ python3 ConsoleOut.py -f /usr/lib/python3/dist-packages/OpenRTM_aist/ext/http/rtc.http.conf -o "manager.components.preconnect:ConsoleOut0.in?port=rtcname.http://localhost:2809/ConsoleIn0.out" 
出力なし

参考のためIIOP通信時のrtcname形式を確認しましたが、こちらは問題なく接続できています。

$ sudo systemctl start omniorb-nameserver.service
$ python3 ConsoleIn.py
$ python3 ConsoleOut.py -o "manager.components.preconnect:ConsoleOut0.in?port=rtcname://localhost:2809/ConsoleIn0.out"
------------------------------
Listener:        ON_CONNECT
Profile::name:   ConsoleOut0.in?port=rtcname://localhost:2809/ConsoleIn0.out
    :

@Nobu19800

Copy link
Copy Markdown
Author

OpenRTM/OpenRTM-aist#1015
このプルリクエストと同様の修正を追加しました。
動作確認をお願いします。

@n-kawauchi

@n-kawauchi

Copy link
Copy Markdown

@Nobu19800

httpのrtcname形式で接続を確認できません。ターミナルに「ON_CONNECT」と出力された後すぐに「ON_DISCONNECT」となってしまいます。manager.components.preconnectで渡す引数の指定が間違っているのでしょうか?
この時のRTCのログも参考までに添付します。Ubuntu24.04環境での確認です。

rtc5935.log.txt

下記手順で行いました

  • httpのrtcname形式確認・・・NG
    • 端末1
      $ sudo systemctl stop omniorb-nameserver.service
      $ /usr/bin/openrtmNames -f /usr/etc/rtc.names.http.conf
      
    • 端末2
      $ python3 ConsoleIn.py -f /usr/lib/python3/dist-packages/OpenRTM_aist/ext/http/rtc.http.conf
      
    • 端末3
      $ python3 ConsoleOut.py -f /usr/lib/python3/dist-packages/OpenRTM_aist/ext/http/rtc.http.conf -o "manager.components.preconnect:ConsoleOut0.in?port=rtcname.http://localhost:2809/call#`hostname`.host_cxt/ConsoleIn0.out"
         :
      ------------------------------
      Connector Listener: ON_CONNECT
      Profile::name:      ConsoleOut0.in?port=rtcname.http://localhost:2809/call#thinkpad-6.host_cxt/ConsoleIn0.out
      Profile::id:     7f912c23-395b-11f1-bf4e-a81e84b648f3
         :
      ------------------------------
      Listener:        ON_DISCONNECT
      Profile::name:   ConsoleOut0.in?port=rtcname.http://localhost:2809/call#thinkpad-6.host_cxt/ConsoleIn0.out
      Profile::id:     7f912c23-395b-11f1-bf4e-a81e84b648f3
      

@Nobu19800

Copy link
Copy Markdown
Author

念のため、/usr/lib/python3/dist-packages/OpenRTM_aist/ext/http/rtc.http.confの内容を見せてください。
@n-kawauchi

n-ando
n-ando previously approved these changes Apr 20, 2026
@n-kawauchi

Copy link
Copy Markdown

@Nobu19800

/usr/lib/python3/dist-packages/OpenRTM_aist/ext/http/rtc.http.confの内容です

logger.enable: YES
logger.log_level: DEBUG
#logger.file_name: stdout

manager.modules.load_path: /usr/lib/python3/dist-packages/OpenRTM_aist/ext/http
manager.preload.modules: HTTPTransport.py

corba.args:-ORBserverTransportRule "* http" -ORBclientTransportRule "* http" -ORBendPoint giop:http:http:///call
corba.nameservers: http://127.0.0.1:2809/call
corba.master_manager: giop:http:http://127.0.0.1:2810/call

@Nobu19800

Copy link
Copy Markdown
Author

原因は分かりませんが、更新したファイルと内容が違います。
どういう手順でインストールしましたか?

https://github.com/Nobu19800/OpenRTM-aist-Python/blob/c46f0531bf9673e380b9b07b7491b5e059e92022/OpenRTM_aist/ext/http/rtc.http.conf#L8-L10

@n-kawauchi

@n-kawauchi

Copy link
Copy Markdown

@Nobu19800

原因が分かりました。debパッケージ生成時に含めるconfファイルは下記で管理していてこれが更新されていなかったためです。
OpenRTM-aist-Python/packages/deb/conf/http/
OpenRTM-aist-Python/packages/deb/conf/ssl/

この構成にした理由は下記に記しています。
#254 (comment)

debパッケージ生成ビルドはdockerで行っていて、生成されたwhlをローカルへインストールし、
必要なファイルを集めています。

WORKDIR /root/OpenRTM-aist-Python
RUN python3 -m build \
 && cd dist \
 && python3 -m pip install --no-index --prefix=./ openrtm_aist_python-${VERSION}-py3-none-any.whl \

こうするとインストールされたrtc.http.confは以下の内容になってしまい、このままでは使えず
現状の設定にしました。しかし今回のような事故は起こりますよね。どのようにしたらよいでしょうか?

manager.modules.load_path: ./
manager.preload.modules: HTTPTransport.py

@Nobu19800

Copy link
Copy Markdown
Author

packages/deb/conf/のファイルはシンボリックリンクにすることはできないのですか?

@n-kawauchi

@n-kawauchi

Copy link
Copy Markdown

@Nobu19800

debパッケージに含めるconfファイルを更新の修正を加え、最新masterソースへマージして生成したdebパッケージをインストールして動作確認しました。(Ubuntu24.04)
確認の途中ですがエラーになるケースが2件ありましたので最後まで確認せずにお知らせします。
httpのrtcname形式確認・・・OK
httpのrtcloc形式確認・・・OK
httpsのrtcname形式確認・・・OK
httpsのrtcloc形式確認・・・NG
wsのrtcname形式確認・・・NG

動作確認手順の詳細は下記の通りです。NGだったケースはRTCのログを添付します。

  • httpのrtcname形式確認・・・OK

    • 端末1
      $ sudo systemctl stop omniorb-nameserver.service
      $ /usr/bin/openrtmNames -f /usr/etc/rtc.names.http.conf
      
    • 端末2
      $ python3 ConsoleIn.py -f /usr/lib/python3/dist-packages/OpenRTM_aist/ext/http/rtc.http.conf
      
    • 端末3
      $ python3 ConsoleOut.py -f /usr/lib/python3/dist-packages/OpenRTM_aist/ext/http/rtc.http.conf -o "manager.components.preconnect:ConsoleOut0.in?port=rtcname.http://localhost:2809/call#`hostname`.host_cxt/ConsoleIn0.out"
      ------------------------------
      Listener:        ON_CONNECT
      Profile::name:   ConsoleOut0.in?port=rtcname.http://localhost:2809/call#thinkpad-6.host_cxt/ConsoleIn0.out
      Profile::id:     1cb28c1a-3f9a-11f1-88ba-a81e84b648f3
      
      
  • httpのrtcloc形式確認・・・OK

    • 端末1 : openrtmNamesプロセス起動中
    • 端末2
      $ rtcd2_python -d -f /usr/lib/python3/dist-packages/OpenRTM_aist/ext/http/rtc.http.conf
      
    • 端末3
      $ python3 ConsoleIn.py -f /usr/lib/python3/dist-packages/OpenRTM_aist/ext/http/rtc.http.conf
      
    • 端末4
      $ python3 ConsoleOut.py -f /usr/lib/python3/dist-packages/OpenRTM_aist/ext/http/rtc.http.conf -o "manager.components.preconnect:ConsoleOut0.in?port=rtcloc.http://localhost:2810/call#example/ConsoleIn0.out" -o "naming.type:manager"
      ------------------------------
      Listener:        ON_CONNECT
      Profile::name:   ConsoleOut0.in?port=rtcloc.http://localhost:2810/call#example/ConsoleIn0.out
      Profile::id:     676f92fb-3f9d-11f1-b6ed-a81e84b648f3
      
      
  • httpsのrtcname形式確認・・・OK

    • 端末1
      $ /usr/bin/openrtmNames -f /usr/etc/rtc.names.https.conf
      
    • 端末2
      $ python3 ConsoleIn.py -f /usr/lib/python3/dist-packages/OpenRTM_aist/ext/http/rtc.https.conf
      
    • 端末3
      $ python3 ConsoleOut.py -f /usr/lib/python3/dist-packages/OpenRTM_aist/ext/http/rtc.https.conf -o "manager.components.preconnect:ConsoleOut0.in?port=rtcname.https://localhost:2809/call#`hostname`.host_cxt/ConsoleIn0.out"
      ------------------------------
      Listener:        ON_CONNECT
      Profile::name:   ConsoleOut0.in?port=rtcname.https://localhost:2809/call#thinkpad-6.host_cxt/ConsoleIn0.out
      Profile::id:     c6e4fbec-3f9e-11f1-b1c2-a81e84b648f3
      
      
  • httpsのrtcloc形式確認・・・NG

    • 端末1 : openrtmNamesプロセス起動中
    • 端末2
      $ rtcd2_python -d -f /usr/lib/python3/dist-packages/OpenRTM_aist/ext/http/rtc.https.conf
      
    • 端末3
      $ python3 ConsoleIn.py -f /usr/lib/python3/dist-packages/OpenRTM_aist/ext/http/rtc.https.conf
      
    • 端末4
      $ python3 ConsoleOut.py -f /usr/lib/python3/dist-packages/OpenRTM_aist/ext/http/rtc.https.conf -o "manager.components.preconnect:ConsoleOut0.in?port=rtcloc.http://localhost:2810/call#example/ConsoleIn0.out" -o "naming.type:manager"
      何も出力されない。RTCのログを見ると下記が出力されていた。
      2026-04-24 16:42:30,351 file.manager.namingonmanager INFO URI: rtcloc.http://localhost:2810/call#example/ConsoleIn0, Address: http://localhost:2810/call, Name: example/ConsoleIn0
      2026-04-24 16:42:30,355 file.manager.namingonmanager DEBUG Traceback (most recent call last):
        File "/usr/lib/python3/dist-packages/OpenRTM_aist/NamingManager.py", line 582, in getManager
          mgr = mobj._narrow(RTM.Manager)
                ^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/usr/lib/python3/dist-packages/omniORB/CORBA.py", line 584, in _narrow
          return self._obj.narrow(repoId, 1)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
      omniORB.CORBA._omni_sys_exc: CORBA.COMM_FAILURE(omniORB.COMM_FAILURE_WaitingForReply, CORBA.COMPLETED_MAYBE)
      
      2026-04-24 16:42:30,356 file.manager ERROR rtcloc.http://localhost:2810/call#example/ConsoleIn0 not found.
      
  • wsのrtcname形式確認・・・NG

    • 端末1
      $ /usr/bin/openrtmNames -f /usr/etc/rtc.names.ws.conf
      
    • 端末2
      $ python3 ConsoleIn.py -f /usr/lib/python3/dist-packages/OpenRTM_aist/ext/http/rtc.ws.conf
      
    • 端末3
      $ python3 ConsoleOut.py -f /usr/lib/python3/dist-packages/OpenRTM_aist/ext/http/rtc.ws.conf -o "manager.components.preconnect:ConsoleOut0.in?port=rtcname.http://localhost:2809/call#`hostname`.host_cxt/ConsoleIn0.out"
      2026-04-24 16:45:57,268 file.manager.namingmanager INFO NameServer connection succeeded: corba/ws://localhost:2809/ws
      2026-04-24 16:45:57,271 file.ManagerServant DEBUG corbaloc: ws://localhost:2810/ws#manager
      2026-04-24 16:45:57,275 file.ManagerServant DEBUG Traceback (most recent call last):
        File "/usr/lib/python3/dist-packages/OpenRTM_aist/ManagerServant.py", line 1186, in findManager
          mgr = mobj._narrow(RTM.Manager)
                ^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/usr/lib/python3/dist-packages/omniORB/CORBA.py", line 584, in _narrow
          return self._obj.narrow(repoId, 1)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
      omniORB.CORBA._omni_sys_exc: CORBA.TRANSIENT(omniORB.TRANSIENT_ConnectFailed, CORBA.COMPLETED_NO)
          :
      2026-04-24 16:45:57,288 file.manager.namingoncorba INFO URI: rtcname.http://localhost:2809/call#thinkpad-6.host_cxt/ConsoleIn0, Address: http://localhost:2809/call, Name: thinkpad-6.host_cxt/ConsoleIn0
      2026-04-24 16:45:57,290 file.manager.namingoncorba ERROR Traceback (most recent call last):
        File "/usr/lib/python3/dist-packages/OpenRTM_aist/NamingManager.py", line 340, in string_to_component
          cns = OpenRTM_aist.CorbaNaming(orb, rtcuri.getAddress())
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/usr/lib/python3/dist-packages/OpenRTM_aist/CorbaNaming.py", line 92, in __init__
          self._rootContext = obj._narrow(CosNaming.NamingContext)
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/usr/lib/python3/dist-packages/omniORB/CORBA.py", line 584, in _narrow
          return self._obj.narrow(repoId, 1)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
      omniORB.CORBA._omni_sys_exc: CORBA.COMM_FAILURE(omniORB.COMM_FAILURE_WaitingForReply, CORBA.COMPLETED_MAYBE)
      
      2026-04-24 15:10:06,318 file.manager ERROR rtcname.http://localhost:2809/call#thinkpad-6.host_cxt/ConsoleIn0 not found.
      

@n-kawauchi

Copy link
Copy Markdown

前回NGと報告したものはConsoleOut.py実行時のオプション指定ミスが原因でした。
残りの動作は全てOKを確認できました。

httpsのrtcloc形式確認・・・OK
wsのrtcname形式確認・・・OK
wsのrtcloc形式確認・・・OK
wssのrtcname形式確認・・・OK
wssのrtcloc形式確認・・・OK
ssliopのrtcname形式確認・・・OK
ssliopのrtcloc形式確認・・・OK

動作確認手順の詳細は下記の通りです。

  • httpsのrtcloc形式確認・・・OK
    • 端末1 : openrtmNamesプロセス起動中
    • 端末2
      $ rtcd2_python -d -f /usr/lib/python3/dist-packages/OpenRTM_aist/ext/http/rtc.https.conf
      
    • 端末3
      $ python3 ConsoleIn.py -f /usr/lib/python3/dist-packages/OpenRTM_aist/ext/http/rtc.https.conf
      
    • 端末4
      $ python3 ConsoleOut.py -f /usr/lib/python3/dist-packages/OpenRTM_aist/ext/http/rtc.https.conf -o "manager.components.preconnect:ConsoleOut0.in?port=rtcloc.https://localhost:2810/call#example/ConsoleIn0.out" -o "naming.type:manager" 
      ------------------------------
      Listener:        ON_CONNECT
      Profile::name:   ConsoleOut0.in?port=rtcloc.https://localhost:2810/call#example/ConsoleIn0.out
      Profile::id:     9871c29b-42c0-11f1-8203-a81e84b648f3
      
  • wsのrtcname形式確認・・・OK
    • 端末1
      $ /usr/bin/openrtmNames -f /usr/etc/rtc.names.ws.conf
      
    • 端末2
      $ python3 ConsoleIn.py -f /usr/lib/python3/dist-packages/OpenRTM_aist/ext/http/rtc.ws.conf
      
    • 端末3
      $ python3 ConsoleOut.py -f /usr/lib/python3/dist-packages/OpenRTM_aist/ext/http/rtc.ws.conf -o "manager.components.preconnect:ConsoleOut0.in?port=rtcname.ws://localhost:2809/ws#`hostname`.host_cxt/ConsoleIn0.out" 
      ------------------------------
      Listener:        ON_CONNECT
      Profile::name:   ConsoleOut0.in?port=rtcname.ws://localhost:2809/ws#thinkpad-6.host_cxt/ConsoleIn0.out
      Profile::id:     c4ce3ea6-42c1-11f1-a35a-a81e84b648f3
      
  • wsのrtcloc形式確認・・・OK
    • 端末1 : openrtmNamesプロセス起動中
    • 端末2
      $ rtcd2_python -d -f /usr/lib/python3/dist-packages/OpenRTM_aist/ext/http/rtc.ws.conf
      
    • 端末3
      $ python3 ConsoleIn.py -f /usr/lib/python3/dist-packages/OpenRTM_aist/ext/http/rtc.ws.conf
      
    • 端末4
      $ python3 ConsoleOut.py -f /usr/lib/python3/dist-packages/OpenRTM_aist/ext/http/rtc.ws.conf -o "manager.components.preconnect:ConsoleOut0.in?port=rtcloc.ws://localhost:2810/ws#example/ConsoleIn0.out" -o "naming.type:manager" 
      ------------------------------
      Listener:        ON_CONNECT
      Profile::name:   ConsoleOut0.in?port=rtcloc.ws://localhost:2810/ws#example/ConsoleIn0.out
      Profile::id:     a5f6c8d9-42c2-11f1-bbae-a81e84b648f3
      
  • wssのrtcname形式確認・・・OK
    • 端末1
      $ /usr/bin/openrtmNames -f /usr/etc/rtc.names.wss.conf
      
    • 端末2
      $ python3 ConsoleIn.py -f /usr/lib/python3/dist-packages/OpenRTM_aist/ext/http/rtc.wss.conf
      
    • 端末3
      $ python3 ConsoleOut.py -f /usr/lib/python3/dist-packages/OpenRTM_aist/ext/http/rtc.wss.conf -o "manager.components.preconnect:ConsoleOut0.in?port=rtcname.wss://localhost:2809/ws#`hostname`.host_cxt/ConsoleIn0.out" 
      ------------------------------
      Listener:        ON_CONNECT
      Profile::name:   ConsoleOut0.in?port=rtcname.wss://localhost:2809/ws#thinkpad-6.host_cxt/ConsoleIn0.out
      Profile::id:     c016dca8-42c4-11f1-b5ad-a81e84b648f3
      
  • wssのrtcloc形式確認・・・OK
    • 端末1 : openrtmNamesプロセス起動中
    • 端末2
      $ rtcd2_python -d -f /usr/lib/python3/dist-packages/OpenRTM_aist/ext/http/rtc.wss.conf
      
    • 端末3
      $ python3 ConsoleIn.py -f /usr/lib/python3/dist-packages/OpenRTM_aist/ext/http/rtc.wss.conf
      
    • 端末4
      $ python3 ConsoleOut.py -f /usr/lib/python3/dist-packages/OpenRTM_aist/ext/http/rtc.wss.conf -o "manager.components.preconnect:ConsoleOut0.in?port=rtcloc.wss://localhost:2810/ws#example/ConsoleIn0.out" -o "naming.type:manager" 
      ------------------------------
      Listener:        ON_CONNECT
      Profile::name:   ConsoleOut0.in?port=rtcloc.wss://localhost:2810/ws#example/ConsoleIn0.out
      Profile::id:     c4acb155-42c3-11f1-a65c-a81e84b648f3
      
  • ssliopのrtcname形式確認・・・OK
    • 端末1
      $ /usr/bin/openrtmNames -f /usr/etc/rtc.names.ssl.conf
      
    • 端末2
      $ python3 ConsoleIn.py -f /usr/lib/python3/dist-packages/OpenRTM_aist/ext/ssl/rtc.ssl.conf
      
    • 端末3
      $ python3 ConsoleOut.py -f /usr/lib/python3/dist-packages/OpenRTM_aist/ext/ssl/rtc.ssl.conf -o "manager.components.preconnect:ConsoleOut0.in?port=rtcname.ssliop://localhost:2809/`hostname`.host_cxt/ConsoleIn0.out" 
      ------------------------------
      Listener:        ON_CONNECT
      Profile::name:   ConsoleOut0.in?port=rtcname.ssliop://localhost:2809/thinkpad-6.host_cxt/ConsoleIn0.out
      Profile::id:     3bd4f958-42c6-11f1-ab85-a81e84b648f3
      
  • ssliopのrtcloc形式確認・・・OK
    • 端末1 : openrtmNamesプロセス起動中
    • 端末2
      $ rtcd2_python -d -f /usr/lib/python3/dist-packages/OpenRTM_aist/ext/ssl/rtc.ssl.conf
      
    • 端末3
      $ python3 ConsoleIn.py -f /usr/lib/python3/dist-packages/OpenRTM_aist/ext/ssl/rtc.ssl.conf
      
    • 端末4
      $ python3 ConsoleOut.py -f /usr/lib/python3/dist-packages/OpenRTM_aist/ext/ssl/rtc.ssl.conf -o "manager.components.preconnect:ConsoleOut0.in?port=rtcloc.ssliop://localhost:2810/example/ConsoleIn0.out" -o "naming.type:manager" 
      ------------------------------
      Listener:        ON_CONNECT
      Profile::name:   ConsoleOut0.in?port=rtcloc.ssliop://localhost:2810/example/ConsoleIn0.out
      Profile::id:     2fe53789-42c9-11f1-a394-a81e84b648f3
      

@n-ando n-ando merged commit 15601ea into OpenRTM:master May 11, 2026
5 checks passed
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