API Reference
接続
URCtrl(...)
UR 制御インスタンスを作る。初期化時に connect() する。
connect() -> bool
SDU Robotics ur_rtde の RTDEControl / RTDEReceive / RTDEIO を接続する。
disconnect() -> bool
仮想変数を保存し、接続を閉じる。
reconnect() -> bool
切断して再接続する。
is_connected() -> bool
ur_rtde 系が接続済みか返す。
get_version() -> str
PolyScope または SDU Robotics ur_rtde のバージョンを返す。
変数
get_var(kind_or_combined, id_num=None)
P/I/F/IO を取得する。
set_var(kind_or_combined, id_or_value, value=None)
P/I/F/IO を設定する。
get_P(id_num) / set_P(id_num, value)
P 変数を扱う。
teach(kind_or_combined="P", id_num=None, save=True)
現在 P/J を仮想変数へ保存する。
get_I() / set_I() / get_F() / set_F()
I/F 変数を扱う。
設定
set_motion_mode() / get_motion_mode()
移動モードを設定・取得する。
set_coord_type() / get_coord_type()
P/J の既定座標種別を設定・取得する。
set_speed() / get_speed()
直線速度比率を設定・取得する。
set_jspeed() / get_jspeed()
関節速度比率を設定・取得する。
set_accel() / get_accel()
加速度比率を設定・取得する。
set_decel() / get_decel()
停止減速度比率を設定・取得する。
状態
current_position
現在 P pose を返す。
current_angle
現在 J angle を返す。
state()
UR 状態を dict で返す。
is_running()
RTDE script 実行状態を返す。
motion_complete()
steady 状態を返す。
wait_for_complete(timeout=None, interval=0.02)
完了待ちする。
移動
move(target, ...)
単一点移動。
move_path(targets, ...)
複数点移動。
drive(target, relative=False, ...)
軸移動。
dev(base, offset)
6 成分単純加算。
pose_trans(base, offset)
URScript pose_trans() 相当。
p2j(p_type_pos) / j2p(j_type_pos)
IK / FK。
stop() / halt() / task_stop() / hand_stop()
停止。
IO / TCP
set_IO(id_num, value) / get_IO(id_num)
Digital Output。
get_digital_input(id_num)
Digital Input。
set_tcp(tcp)
TCP offset 設定。
get_current_tool()
TCP offset 取得。
is_pose_within_safety_limits(pose)
P pose の safety limit 判定。
is_joints_within_safety_limits(joints)
J 座標の safety limit 判定。
エラー
get_current_error_info()
現在のエラー情報を返す。
reset_error()
復旧を試みる。
turn_on_motor() / turn_off_motor()
Dashboard 経由で motor power / brake を扱う。
未対応
以下は UR 実装では未対応または COBOTTA 固有である。
・move_circle()
・rotate()
・init_hand()
・open_hand()
・hand()
・take_camera()
・take_script()
・run_script()
・COBOTTA ファイル転送系