スライド 1

Similar documents
スライド 1

PowerPoint Presentation

PowerPoint Presentation

スライド 1

スライド 1

Raspberry Pi で WEB カメラを使用 会津大学 RT ミドルウェア講習会 2017 The University of Aizu

PowerPoint Presentation

PowerPoint Presentation

スライド 1

PowerPoint プレゼンテーション

Python Speed Learning

PowerPoint Presentation

rndc BIND

NEDO次世代ロボット知能化技術開発プロジェクト

piyo0704a.rtfd

Geant4を使ってみよう

スライド 1

スライド 1

Si 知識情報処理

二次元連続動的計画法による知的画像処理システム ImageFileSelector RTC 機能仕様書 ImageFileSelectorRTC Ver.1.0 ( 株 ) 東日本計算センター 1 / 11

0_テキストマイニング環境構築_mac

Microsoft PowerPoint Java基本技術PrintOut.ppt [互換モード]

ProScan for Mailserverバージョン6

Maple 12 Windows版シングルユーザ/ネットワークライセンス

PowerPoint Presentation

num2.dvi

スライド 1

ご利用のコンピュータを設定する方法 このラボの作業を行うには 事前設定された dcloud ラボを使用するか 自身のコンピュータをセットアップします 詳細については イベントの事前準備 [ 英語 ] とラボの設定 [ 英語 ] の両方のモジュールを参照してください Python を使用した Spar

Microsoft Word - USB60F_Raspi_ doc

はじめに このドキュメントではftServerに関する障害調査を行う際に 必要となるログ データの取得方法を説明しています ログ データの取得には 初期解析用のデータの取得方法と 詳細な調査を行うときのデータ取得方法があります 特別な理由でOS 側のログが必要となった場合には RHELログの取得につ

1 P2 P P3P4 P5P8 P9P10 P11 P12

スライド 1

印刷アプリケーションマニュアル

機能仕様書 ロボット Raspberry Pi カメラ RTC Ver 発行日 2017 年 12 月 27 日公立大学法人会津大学株式会社東日本計算センター

NEDO次世代ロボット知能化技術開発プロジェクト

スライド 1

スクールCOBOL2002

スライド 1

(Microsoft Word - RS002_PA10\216\346\210\265\220\340\226\276\217\221_05.doc)

<4D F736F F D E6312E3094C5817A4D D E302E B838B8EE88F878F915F836C F815B834E A C52E646F63>

MMC Unity講座

1. パソコンに接続しているプロテクトキー (HASP) を外します 2.Microsoft Edge などのブラウザから のアドレスのホームページを起動します 3. 最新のプロテク

RTC-scilab クイックスタートガイド 第 1 版 2010 年 12 月 7 日 内容 1. 概要 RTC-scilab の概要 RTC-scilab の準備 ダウンロード & 展開 ビルド

実験 5 CGI プログラミング 1 目的 動的にWebページを作成する手法の一つであるCGIについてプログラミングを通じて基本的な仕組みを学ぶ 2 実験 実験 1 Webサーバの設定確認と起動 (1)/etc/httpd/conf にある httpd.conf ファイルの cgi-bin に関する

appli_HPhi_install

HMD を用いた PT カメラのインターネット遠隔操作芝浦工業大学知能機械システム研究室 HMD(Head Mounted Display) を用いた PT(Pan-Tilt) カメラのインターネット遠隔操作 ユーザマニュアル (ver1.0) 2014 年 10 月 23 日 芝浦工業大学知能機械

Microsoft PowerPoint _2.プログラミングの基礎_final.pptx

EV3 の初期設定

EnSight 10.1の新機能

PowerPoint プレゼンテーション

株式会社セックにおける ロボティクス分野への取り込み

Microsoft PowerPoint _3.RTMによるプログラミング_final.pptx

Microsoft Word - tutorial3-dbreverse.docx

Blue Asterisk template

Jupyter Notebook を活用したプログラムライブラリ構築の検討 吹谷芳博 1, 藤澤正樹 1 ( 1 あすか製薬株式会社 ) Examination of the program library construction using Jupyter Notebook ASKA Pharm

XAMPP で CMS のお手軽 テスト環境を手に入れよう 2011/5/21 上村崇 1

任意の間隔での FTP 画像送信イベントの設定方法 はじめに 本ドキュメントでは AXIS ネットワークカメラ / ビデオエンコーダにおいて任意の間隔で画像を FTP サー バーへ送信するイベントの設定手順を説明します 設定手順手順 1:AXIS ネットワークカメラ / ビデオエンコーダの設定ページ

Express5800/ シリーズ Windows Server 2008 の利用について 作成日 2008/11/29 初版 - 1 -

MF mypresto インストールガイド 目次 新規インストールの手順 (Windows 版 )... 2 MF mypresto の起動 (Windows 版 )... 7 新規インストールの手順 (Mac 版 )... 8 MF mypresto の起動 (Mac 版 ) 新規イン

SVF Ver 環境設定 パッチについて

CLUSTERPRO MC StorageSaver istorage M シリーズ使用時の設定手順 (HP-UX 版 Linux 版 Windows 版 ) 2013(Sep) NEC Corporation istorage M シリーズを使用する場合の StorageSaver 設定手順 (H

intra-mart Accel Platform — OData for SAP HANA セットアップガイド   初版  

ユーザーズマニュアル 2DCDP システム 発行日 2016 年 3 月 30 日

PowerPoint プレゼンテーション

rndc BIND DNS 設定 仕組み

P.3 P.4 P.9 P.11

Merging と AES67 ディバイスの設定

arduino プログラミング課題集 ( Ver /06/01 ) arduino と各種ボードを組み合わせ 制御するためのプログラミングを学 ぼう! 1 入出力ポートの設定と利用方法 (1) 制御( コントロール ) する とは 外部装置( ペリフェラル ) が必要とする信号をマイ

1.SqlCtl クラスリファレンス SqlCtl クラスのリファレンスを以下に示します メソッドの実行中にエラーが発生した場合は標準エラー出力にメッセージを出力します (1)Connect() メソッド データベースへ connect 要求を行います boolean Connect(String

スライド 1

Graph Interface インストール手順及び操作手順

動作環境と操作の概要 A スマホのテザリングを使う方法と B WiFi ルーターを使う方法があります A スマホのテザリングを使う場合 図のように 1 台のスマホのテザリングを有効にして パソコンや他のスマホ タブレットを テザリング機器に WiFi 接続し ます 1スマホのテザリングを有効にします

改版履歴 Ver 改版日内容 /02/07 新規作成 2 / 18

(Microsoft Word - RS003_PA10\216\346\210\265\220\340\226\276\217\221_10.doc)

VPN 接続の設定

Microsoft PowerPoint _2.プログラミングの基礎_final

ChoreonoidとOpenHRIを用いたシステム構築事例

Eclipse 操作方法 (Servlet/JSP 入門補助テキスト)

Windows 7ファイル送信方法 SMB編

Oracle SALTを使用してTuxedoサービスをSOAP Webサービスとして公開する方法

intra-mart e-Builder ver 5

DIGNO® ケータイ ユーザーガイド

ServerView Resource Orchestrator V3.0 ネットワーク構成情報ファイルツール(Excel形式)の利用方法

再起動した状態になり パスワードを入力すると 図 2 のように DEXCS2011 のアイコ ンがデスクトップ上に表示される 2 端末を準備する メニューバーにある端末の形を左クリック 図 2 デスクトップ メニューバーに端末の形がない場合 図 3 メニューバー アプリケーション アクセサリー 端末

スライド 1

更新履歴 No 更新箇所版数日付 1 第一版作成 /12/28 2 一部画像差し替え 誤字修正 /02/09 2

CLUSTERPRO MC StorageSaver istorage M シリーズ使用時の設定手順 (HP-UX 版 Linux 版 Windows 版 ) 2013(Apr) NEC Corporation istorage M シリーズを使用する場合の StorageSaver 設定手順 (H

(1) プログラムの開始場所はいつでも main( ) メソッドから始まる 順番に実行され add( a,b) が実行される これは メソッドを呼び出す ともいう (2)add( ) メソッドに実行が移る この際 add( ) メソッド呼び出し時の a と b の値がそれぞれ add( ) メソッド

TSUBAME利用手引き

Microsoft Word - document-force_pos_hybrid_module.docx

はじめに 1. 概要本書では SuitePRO V3 にて提供している迷惑メールフィルタのバージョンアップ手順について案内しています なお この手順につきましては 迷惑メールフィルタ機能について オンラインマニュアルの内容通りに設定されていることを前提条件とします

TDK Equivalent Circuit Model Library

Microsoft Word - RTSystemBuilderOnTheEA操作マニュアル_

RTM セミナー RT ミドルウェアによる実時間ロボット 制御系の構築とソフトウェア教育 静岡大学大学院工学研究科機械工学専攻 清水昌幸

7-1 Digital IC のライブラリの準備について [ 目的 ] 実験では 74HC00 を使用するので SPICE モデルを入手する [ 方法 ] LTspice User site からライブラリとシンボルを Download します

Microsoft Word JA_revH.doc

練習 4 ディレクトリにあるファイルを直接指定する (cat) cat コマンドを使う (% cat ファイル名 ) と ファイルの内容を表示できた ファイル名のところにパス名を使い ディレクトリ名 / ファイル名 のように指定すると ディレクトリ内にあるファイルを直接指定できる 1 % cat _

WAGO PROFIBUS バスカプラ/コントローラと、QJ71PB92Dとのコンフィグレーションマニュアル

Transcription:

(10-1) 2019.6.19 電気通信大学大学院情報理工学研究科末廣尚士

16. ロボットアーム RTC - 6 自由度ロボットアーム 6 回転関節シリアルリンク 2

- ロボットアーム RTC 入力 目標関節角度 :target_joints TimedDoubleSeq 型 ( 長さ 6), 単位はラジアン ハンドの開き幅 :h_width TimedDouble 型単位はメートル 出力 実際の関節角度 :current_joints TimedDoubleSeq 型 ( 長さ 6), 単位はラジアン ハンドの開き幅 :current_width TimedDouble 型単位はメートル 動作周期 100 ms 10 Hz 4

- RTC を使う手順 1. RTC を起動する 2. RTC の Object Reference をネームサーバから取得する 3. RTC を使うために必要な情報 ( 入出力ポート, サービスポートなど ) を取得する 4. RTC のポートにアクセスするためのポートを生成する 5. RTC 間を接続する 6. RTC をアクティベートする 5

- Naming Service の確認 robot:~/openrtm$ ps ax grep omni 1195? Sl 0:00 /usr/bin/omninames -errlog /var/log/omniorbnameserver.log 2975 pts/11 S+ 0:00 grep --color=auto omni 上記の形で走っていれば OK 走っていない場合は以下のようにして起動する. robot:~/openrtm$ cd omninames robot:~/opnertm/omninames$ rtm-naming 6

- ロボットアーム RTC の起動 robot:~/openrtm/robots/arm6dof$ python Arm6dof.py 7

- 起動できない場合 robot:~/openrtm/robots/arm6dof$ python Arm6dof.py Traceback (most recent call last): File "/usr/lib/python2.7/dist-ackages/openrtm_aist/factory.py", line 274, in create rtobj = self._new(mgr) File "Arm6dofComp.py", line 114, in init self.arm=create_arm() NameError: global name 'create_arm' is not defined この原因は,Arm6dof.py と arm6dof.py の区別ができていないため. そこで Arm6dof.py を Arm6dofComp.py に変更して, robot:~/openrtm/robots/arm6dof$ python Arm6dofComp.py とするれば OK. 8

- python から RTC を使う 直接 pythonインタプリターから使う scriptファイルを作成する jupyter notebookで利用する 後で script ファイルに落とす 9

- scripts ディレクトリの作成 Robots の下に作る robot:~/openrtm/robots$ mkdir scripts robot:~/openrtm/robots$ cd scripts robot:~/openrtm/robots/scripts$ 10

- rtc.conf の作成 python 自身を RTC 化する際には, その (scripts) ディレクトリに rtc.conf が必要 corba.nameservers: localhost:2809 naming.formats: %n_py.rtc logger.log_level: TRACE 11

- python を起動 python インタプリタ robot:~/openrtm/robots/scripts$ python ipython インタプリタ robot:~/openrtm/robots/scripts$ ipython jupyter notebook robot:~/openrtm/robots/scripts$ jupyter notebook emacs でスクリプトをいきなり書くのもあり 12

- 設定 基本モジュールの読み込み import sys import time import subprocess from math import * 環境設定 この辺は別ファイル (set_env.py) にして使いまわせるようにすると良い. その時は,from set_env import * RtmToolsDir="../../rtmtools" MyRtcDir=".." NS0="localhost:2809" 14

- ツールの読み込み パスを設定してツールを読み込む save_path = sys.path[:] sys.path.append(rtmtoolsdir+'/rtc_handle') from rtc_handle import * from rtc_handle_util import * sys.path.append(rtmtoolsdir+'/embryonic_rtc') from EmbryonicRtc import * sys.path = save_path 15

- rtc_handle とは python 環境からの RTC の簡単操作 RTC およびロボットシステムのデバッグツール RTC のプロトタイピング ロボット作業アプリケーションの開発 実行 ロボットシステム構築の支援 16

- rtc_handle rtc_handle.py corba orb 環境の保持 (RtmEnv) ネームサーバの情報の取得, 保持 (NameSpace) 各 RTC の情報の保持 (RtcHandle) サービスポート, 入出力ポート, コンフィギュレーションサービスの情報の保持, アクセス rtc_handle_util.py rtc_handle.py のお助け便利ツール EmbryonicRtc.py python 実行環境自身を RTC 化する 入出力ポートとのデータ授受をサポート 17

-corba 環境の立ち上げ orb の立ち上げとネームサーバの URL の設定 ネームサーバはリストで複数持てる orb のパラメタを sys.argv に持たせることができる env = RtmEnv(sys.argv,[NS0]) 18

- rtc のリスト作成 必要な RTC が立ち上がっていることを確認してリストアップする raw_input("are you sure that each rtc needed is running?") for ns in env.name_space : env.name_space[ns].list_obj() 19

- ロボット RTC のプロキシ取得 リストアップの結果はネームサーバごとの辞書に登録される env.name_space[ns0].rtc_handles {'lecture2018.host_cxt/arm6dof0.rtc': <rtc_handle.rtchandle instance at 0x7ff43b769170>} 使いやすいように変数を割り当てておく arm = env.name_space[ns0].rtc_handles['lecture2018.host_cxt/arm6 dof0.rtc'] 20

- 本体の RTC 化 ロボット RTC と入出力ポートでデータをやり取りできるように,python インタプリタ自身を RTC 化する mgr=main() comp=mgr.getcomponents()[0] ロボット RTC に対応したポートを生成する make_pipe(comp,arm) 21

- ロボットとの入出力ポートの確認 OutPort との接続は OutPipe. OutPipe はデータを受け取るので実は InPort arm.out_pipe {'current_joints': <rtc_handle.outpipe instance at 0x7ff438468bd8>, 'current_width': <rtc_handle.outpipe instance at 0x7ff4384641b8>} InPort との接続は InPipe arm.in_pipe {'h_width': <rtc_handle.inpipe instance at 0x7ff43845e6c8>, 'target_joints': <rtc_handle.inpipe instance at 0x7ff43b85e098>} 22

- 入出力ポートの接続 Pipe の connect() メソッドで対応するポートに接続できる for pp in arm.out_pipe : arm.out_pipe[pp].connect() for pp in arm.in_pipe : arm.in_pipe[pp].connect() ここまでの処理をまとめて script ファイルにしておくと良い.(arm_control.py) 23

- ロボット RTC の状態 状態を見る arm.get_state() INACTIVE 状態を変更する arm.activate() RTC_OK arm.get_state() ACTIVE 24

- SystemEditor で確認 接続の様子を SystemEditor で確認 25

- ロボットの現状を取得 現在の関節角度が送られてきたかの確認 arm.out_pipe['current_joints'].pipe.isnew() True 関節角度を取得する arm.out_pipe['current_joints'].read() [0.0, 0.0, 0.0, 0.0, 0.0, 0.0] 26

- ロボットの現状を見る 目標関節角度を送る arm.in_pipe['target_joints'].write([pi/3,pi/4,pi/2,0.0,pi/ 4,pi/3]) 指も動かす arm.in_pipe['h_width'].write(0.05) 27

- 動かした結果 28

- ロボットの現状を再取得 関節角度を取得する jj=arm.out_pipe['current_joints'].read() jj [1.0471975511965976, 0.7853981633974483, 1.5707963267948966, 0.0, 0.7853981633974483, 1.0471975511965976] degree で表示 59.99999999999999, 45.0, 90.0, 0.0, 45.0, 59.99999999999999] map(degrees, jj) [59.99999999999999, 45.0, 90.0, 0.0, 45.0, 59.99999999999999] 29

- script にまとめてやってみる 別窓でロボットを起動 robot:~/openrtm/arm6dof$ python Arm6dof.py scripts ディレクトリにスクリプトを置く robot:~/openrtm/robots/scripts$ ls arm_control.ipynb arm_control.pyc rtc.conf.template set_env.py.template arm_control.py rtc.conf set_env.py set_env.pyc 30

- script にまとめてやってみる python を起動して読み込む robot:~/openrtm/robots/scripts$ python Python 2.7.12 (default, Dec 4 2017, 14:50:18) >>> from arm_control import * are you sure that each rtc needed is running? objcet lecture2018.host_cxt/embryonicrtc0.rtc was listed. port_name: lecture2018_host_cxt/arm6dof0_rtcarm6dof0_target_joints handle for lecture2018.host_cxt/embryonicrtc0.rtc was created. objcet lecture2018.host_cxt/arm6dof0.rtc was listed. port_name: target_joints handle for lecture2018.host_cxt/arm6dof0.rtc was created. >>> 31

- script にまとめてやってみる 動かしてみる >>> arm.activate() RTC_OK >>> arm.in_pipe['target_joints'].write(map(radians,[60,45,90,0,45,60])) >>> 32

- 例題 16-1 1. 自身の環境で python からロボットアームを動かせるようにする. 2. いろいろな姿勢にしてみる 3. 一気に動くのではなく目標姿勢に向かって 動いていく ようにする 4. 物理的に滑らかに動くようにする. 少し大事なヒント : ロボットアームの制御周期に合わせてデータを送らないと,,,,.time.sleep() などを使って周期 100ms( サンプルレート 10Hz) になるようにすると良い. 33

- 下準備 (script ディレクトリにて ) rtc.conf corba.nameservers: localhost:2809 naming.formats: %n_py.rtc logger.log_level: TRACE set_env.py RtmToolsDir="../../rtmtools" MyRtcDir=".." NS0="localhost:2809" 34

- arm_control.py #!/usr/bin/env python # -*- coding: utf-8 -*- import sys import time import subprocess from math import * from set_env import * save_path = sys.path[:] sys.path.append(rtmtoolsdir+'/rtc_handle') from rtc_handle import * from rtc_handle_util import * sys.path.append(rtmtoolsdir+'/embryonic_rtc') from EmbryonicRtc import * sys.path = save_path 35

- arm_control.py # corba 環境の立ち上げ env = RtmEnv(sys.argv,[NS0]) # rtc のリスト作成 raw_input("are you sure that each rtc needed is running?") for ns in env.name_space : env.name_space[ns].list_obj() # ロボット RTC のプロキシ取得 env.name_space[ns0].rtc_handles arm = env.name_space[ns0].rtc_handles['lecture2018.host_cxt/arm6dof0.rtc'] 36

- arm_control.py # 本体の RTC 化とロボット RTC との対応ポートの生成 mgr=main() comp=mgr.getcomponents()[0] make_pipe(comp,arm) for pp in arm.out_pipe : arm.out_pipe[pp].connect() for pp in arm.in_pipe : arm.in_pipe[pp].connect() 37

- ロボットアーム RTC の起動 arm6dof ディレクトリにて robot:~/openrtm/robots/arm6dof$ python Arm6dof.py 38

- arm_control.py を import して使う robot:~/openrtm/robots/scripts$ python Python 2.7.12 (default, Dec 4 2017, 14:50:18) ここで, 改 >>> from arm_control import * 行を入力 are you sure that each rtc needed is running? objcet lecture2018.host_cxt/embryonicrtc0.rtc was listed. port_name: lecture2018_host_cxt/arm6dof0_rtcarm6dof0_target_joints handle for lecture2018.host_cxt/embryonicrtc0.rtc was created. objcet lecture2018.host_cxt/arm6dof0.rtc was listed. port_name: target_joints handle for lecture2018.host_cxt/arm6dof0.rtc was created. >>> 39

- 動かしてみる アーム RTC をアクティベートして アーム RTC の目標関節角度入力ポートに python 側の in_pipe を使って 関節角度のリストを送る >>> arm.activate() RTC_OK >>> arm.in_pipe['target_joints'].write(map(radians,[60,45,90,0,45,60])) >>> 40

- 次回予告 アームの軌道生成 41