[openrtm-users 02378] rtprint でのフォーマッタの使い方について

3 posts / 0 new
Last post
Kei Okada
Offline
Last seen: Never ago
Joined: 2011-05-17 20:20
[openrtm-users 02378] rtprint でのフォーマッタの使い方について

岡田です.

いつもお世話になります.本年もよろしくお願いします.
早速ですが,
http://www.openrtm.org/pub/OpenRTM-aist/tools/rtshell/3.0/ja/rtprint.html
にある,

> $ rtprint /localhost/ConsoleIn0.rtc:out#printers.my_formatter
>
> ConsoleIn0.rtc の out ポートの最初の値を printers モジュールの my_formatter 関数に送って結果を表示します。

という便利な機能を見つけたので使おうとしたのですが,
$ rtprint localhost/SequencePlayer0.rtc:qRef
comp_args: rtprint_reader0?exec_cxt.periodic.type=PeriodicExecutionContext&exec_cxt.periodic.rate=100.0
[0.000000000] [7.673073771999763e-14, -3.1496517535800726e-06,
-3.149633230452652e-06, -1.7323215873923887e-05,
-5.17454292139448e-06, 8.998955333107988e-06, -1.6496828591857673e-06,
0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]

$ rtprint localhost/SequencePlayer0.rtc:qRef#printers.my_formatter
rtprint: global name 'rts_exceptions' is not defined

となっていしまします.
カレントディレクトリは以下のファイルがあります.
簡単なことだとは思うのですが,正しい利用方法を
ご教示いただけると幸いです.

$ cat printers.py
#!/usr/bin/env python

def my_formatter(a):
print a
_______________________________________________
openrtm-users mailing list
openrtm-users@openrtm.org
http://www.openrtm.org/mailman/listinfo/openrtm-users

Undefined
gbiggs
Offline
Last seen: 6 years 9 months ago
Joined: 2010-08-02 07:51
[openrtm-users 02379] rtprint でのフォーマッタの使い方について

岡田様

ジェフです。

On 05/01/12 22:31, Kei Okada wrote:
> 岡田です.
>
> いつもお世話になります.本年もよろしくお願いします.
> 早速ですが,
> http://www.openrtm.org/pub/OpenRTM-aist/tools/rtshell/3.0/ja/rtprint.html
> にある,
>
>> $ rtprint /localhost/ConsoleIn0.rtc:out#printers.my_formatter
>>
>> ConsoleIn0.rtc の out ポートの最初の値を printers モジュールの my_formatter 関数に送って結果を表示します。
>
> という便利な機能を見つけたので使おうとしたのですが,
> $ rtprint localhost/SequencePlayer0.rtc:qRef
> comp_args: rtprint_reader0?exec_cxt.periodic.type=PeriodicExecutionContext&exec_cxt.periodic.rate=100.0
> [0.000000000] [7.673073771999763e-14, -3.1496517535800726e-06,
> -3.149633230452652e-06, -1.7323215873923887e-05,
> -5.17454292139448e-06, 8.998955333107988e-06, -1.6496828591857673e-06,
> 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
> 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
> 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
>
> $ rtprint localhost/SequencePlayer0.rtc:qRef#printers.my_formatter
> rtprint: global name 'rts_exceptions' is not defined
>
> となっていしまします.
> カレントディレクトリは以下のファイルがあります.
> 簡単なことだとは思うのですが,正しい利用方法を
> ご教示いただけると幸いです.
>
> $ cat printers.py
> #!/usr/bin/env python
>
> def my_formatter(a):
> print a

申し訳ございません。それはバグです。向かしのリファクタリングからテスト不
足でした。ご報告、誠にありがとうございます。github版で直しましたので、試
して見ていただけませんでしょうか。

よろしくお願いいたします。
_______________________________________________
openrtm-users mailing list
openrtm-users@openrtm.org
http://www.openrtm.org/mailman/listinfo/openrtm-users

Kei Okada
Offline
Last seen: Never ago
Joined: 2011-05-17 20:20
[openrtm-users 02386] rtprint でのフォーマッタの使い方について

岡田です.

ありがとうございます.上手く動いていることを確認しました.

2012/1/6 Geoffrey Biggs :
> 岡田様
>
> ジェフです。
>
> On 05/01/12 22:31, Kei Okada wrote:
>> 岡田です.
>>
>> いつもお世話になります.本年もよろしくお願いします.
>> 早速ですが,
>> http://www.openrtm.org/pub/OpenRTM-aist/tools/rtshell/3.0/ja/rtprint.html
>> にある,
>>
>>> $ rtprint /localhost/ConsoleIn0.rtc:out#printers.my_formatter
>>>
>>> ConsoleIn0.rtc の out ポートの最初の値を printers モジュールの my_formatter 関数に送って結果を表示します。
>>
>> という便利な機能を見つけたので使おうとしたのですが,
>> $ rtprint localhost/SequencePlayer0.rtc:qRef
>> comp_args: rtprint_reader0?exec_cxt.periodic.type=PeriodicExecutionContext&exec_cxt.periodic.rate=100.0
>> [0.000000000] [7.673073771999763e-14, -3.1496517535800726e-06,
>> -3.149633230452652e-06, -1.7323215873923887e-05,
>> -5.17454292139448e-06, 8.998955333107988e-06, -1.6496828591857673e-06,
>> 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
>> 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
>> 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
>>
>> $ rtprint localhost/SequencePlayer0.rtc:qRef#printers.my_formatter
>> rtprint: global name 'rts_exceptions' is not defined
>>
>> となっていしまします.
>> カレントディレクトリは以下のファイルがあります.
>> 簡単なことだとは思うのですが,正しい利用方法を
>> ご教示いただけると幸いです.
>>
>> $ cat printers.py
>> #!/usr/bin/env python
>>
>> def my_formatter(a):
>> print a
>
> 申し訳ございません。それはバグです。向かしのリファクタリングからテスト不
> 足でした。ご報告、誠にありがとうございます。github版で直しましたので、試
> して見ていただけませんでしょうか。
>
> よろしくお願いいたします。
> _______________________________________________
> openrtm-users mailing list
> openrtm-users@openrtm.org
> http://www.openrtm.org/mailman/listinfo/openrtm-users
_______________________________________________
openrtm-users mailing list
openrtm-users@openrtm.org
http://www.openrtm.org/mailman/listinfo/openrtm-users

Log in or register to post comments

Download

latest Releases : 2.0.0-RELESE

2.0.0-RELESE Download page

Number of Projects

Choreonoid

Motion editor/Dynamics simulator

OpenHRP3

Dynamics simulator

OpenRTP

Integrated Development Platform

AIST RTC collection

RT-Components collection by AIST

TORK

Tokyo Opensource Robotics Association

DAQ-Middleware

Middleware for DAQ (Data Aquisition) by KEK