メインコンテンツへスキップ

C#

JAKA約22分

C#

本書類では、JAKA SDK(C#)で定義されているデータ型とAPIについて説明します。主に、C#を使用して仮想または実際のコントローラと通信するロボットアプリケーションを作成するソフトウェア開発者を対象としています。JAKAロボットコントローラアプリケーションを理解する必要があるユーザーにも一定の助けとなります。

インターフェース一覧

ロボットの基本操作

ロボットアームへのログイン

int create_handler(char[] ip, ref int handle, bool use_grpc = false) ;
int create_handler([MarshalAs(UnmanagedType.LPStr)] string ip, ref int handle, bool use_grpc = false);

ロボットアームのログアウト

int destory_handler(ref int handle)

ロボットアームへのログイン

int power_on(ref int handle)

ロボットアームの通電

int power_off(ref int handle)

ロボットアームのシャットダウン

int shut_down(ref int handle)

ロボットアームのイネーブル

int enable_robot(ref int handle)

ロボットアームのディスエーブル

int disable_robot(ref int handle)

現在接続されているロボットアームのDHパラメータを取得

int get_dh_param(ref int handle,ref JKTYPE.DHParam offset)

ロボットアームの設置角度を設定

int set_installation_angle(ref int handle, double angleX, double angleZ)

ロボットアームの設置角度を取得

int get_installation_angle(ref int handle, ref JKTYPE.Quaternion quat, ref JKTYPE.Rpy appang)

ロボットアームの状態を取得

int get_robot_state(ref int handle, ref JKTYPE.RobotState state)

ロボットアームの状態監視データを取得する - 唯一のマルチスレッド安全インターフェース

int get_robot_status(ref int handle, ref JKTYPE.RobotStatus status)

ロボットアームの状態監視データを取得する

int get_robot_status_simple(ref int handle, ref JKTYPE.get_robot_status_simple status)

SDK関連

ロボットアームでエラーが発生した際のコールバック関数を登録する

int set_error_handler(ref int handle, CallBackFuncType func)

SDKのバージョン番号を取得する

int get_sdk_version(ref int handle, StringBuilder version, int size)

ネットワーク異常時にロボットアームの動作を自動的に停止するタイプを設定する

int set_network_exception_handle(ref int handle, float millisecond, JKTYPE.ProcessType mnt)

コントローラのIPを取得する

int get_controller_ip(char[] controller_name, StringBuilder ip);
int get_controller_ip([MarshalAs(UnmanagedType.LPStr)] string controller_name, StringBuilder ip)

ロボットアームのエラーコードファイルの保存パスを設定する

int set_errorcode_file_path(ref int handle, StringBuilder path)

ロボットアームのエラーコードファイルの保存パスを設定し、現在発生している最後のエラーコードを取得する

int get_last_error(ref int handle, ref JKTYPE.ErrorCode code)

エラーをクリアする。衝突アラームをクリアし、衝突アラームから復旧する

int clear_error(ref int i)

SDKのデバッグモードを有効にするかどうかを設定する

int set_debug_mode(ref int handle, bool mode)

SDKのログパスを設定する

int set_SDK_filepath(ref int handle, ref char[] filepath);
int set_SDK_filepath(ref int handle, [MarshalAs(UnmanagedType.LPStr)] string filepath)

SDKログパスを取得

int get_SDK_filepath(char[] path, int size);
int get_SDK_filepath(StringBuilder path, int size)

ロボット動作出力

ロボットアーム手動モードでの動作

int jog(ref int handle, int aj_num, JKTYPE.MoveMode move_mode, JKTYPE.CoordType coord_type, double vel_cmd, double pos_cmd)

ロボットアーム手動モードの動作停止

int jog_stop(ref int handle, int num)

ロボットアーム関節動作

int joint_move(ref int handle, ref JKTYPE.JointValue joint_pos, JKTYPE.MoveMode move_mode, bool is_block, double speed);
int joint_move_extend(ref int handle, ref JKTYPE.JointValue joint_pos, JKTYPE.MoveMode move_mode, bool is_block, double speed, double acc, double tol, ref JKTYPE.OptionalCond option_cond)

ロボットアームエンドの直線動作

int linear_move(ref int handle, ref JKTYPE.CartesianPose end_pos, JKTYPE.MoveMode move_mode, bool is_block, double speed);
int linear_move_extend(ref int handle, ref JKTYPE.CartesianPose cart_pos, JKTYPE.MoveMode move_mode, bool is_block, double speed, double acc, double tol, ref JKTYPE.OptionalCond option_cond);
int linear_move_extend_ori(ref int handle, ref JKTYPE.CartesianPose cart_pos, JKTYPE.MoveMode move_mode, bool is_block, double speed, double acc, double tol, ref JKTYPE.OptionalCond option_cond, double ori_vel, double ori_acc)

ロボットアーム円弧動作

int circular_move(ref int handle, ref JKTYPE.CartesianPose end_pos, ref JKTYPE.CartesianPose mid_pos, JKTYPE.MoveMode move_mode, bool is_block, double speed, double acc, double tol, ref JKTYPE.OptionalCond option_cond);
int circular_move_extend(ref int handle, ref JKTYPE.CartesianPose end_pos, ref JKTYPE.CartesianPose mid_pos, JKTYPE.MoveMode move_mode, bool is_block, double speed, double acc, double tol, ref JKTYPE.OptionalCond option_cond, double circle_cnt);
int circular_move_extend_mode(ref int handle, ref JKTYPE.CartesianPose end_pos, ref JKTYPE.CartesianPose mid_pos, JKTYPE.MoveMode move_mode, bool is_block, double speed, double acc, double tol, ref JKTYPE.OptionalCond option_cond, double circle_cnt, int circle_mode)

ロボットアームの動作倍率を設定

int set_rapidrate(ref int handle, double rapid_rate)

ロボットアームの動作倍率を取得

int get_rapidrate(ref int handle, ref double rapid_rate)

ツール情報を設定

int set_tool_data(ref int handle, int id, ref JKTYPE.CartesianPose tcp, char[] name);
int set_tool_data(ref int handle, int id, ref JKTYPE.CartesianPose tcp, [MarshalAs(UnmanagedType.LPStr)] string name)

ツール情報を取得する

int get_tool_data(ref int handle, int id, ref JKTYPE.CartesianPose tcp)

現在使用中のツールIDを設定する

int set_tool_id(ref int handle, int id)

現在使用中のツールIDを照会する

int get_tool_id(ref int handle, ref int id)

ユーザー座標系情報を設定する

int set_user_frame_data(ref int handle, int id, ref JKTYPE.CartesianPose user_frame, char[] name);
int set_user_frame_data(ref int handle, int id, ref JKTYPE.CartesianPose user_frame, [MarshalAs(UnmanagedType.LPStr)] string name)

ユーザー座標系情報を取得

int get_user_frame_data(ref int handle, int id, ref JKTYPE.CartesianPose user_frame)

現在使用中のユーザー座標系IDを設定する

int set_user_frame_id(ref int handle, int id)

現在使用中のユーザー座標系IDを照会する

int get_user_frame_id(ref int handle, ref int id)

ロボットアームをドラッグモードに入るまたは終了させる

int drag_mode_enable(ref int handle, bool enable)

ロボットアームがドラッグモード中かどうかを照会する

int is_in_drag_mode(ref int handle, ref bool in_drag)

関節の摩擦補償係数(ドラッグ操作感パラメータ)を設定する

int set_drag_friction_compensation_gain(ref int handle, int joint, int gain);

関節の摩擦補償係数(ドラッグ操作感パラメータ)を取得する

int get_drag_friction_compensation_gain(ref int handle, ref JKTYPE.DragFrictionCompensationGainList gainList);

現在の設定下でのツール先端の姿勢を取得する――サーボフィードバック

int get_actual_tcp_position(ref int handle, ref JKTYPE.CartesianPose tcp_position)

現在の設定下でツールエンドの位置姿勢を取得する

int get_tcp_position(ref int handle, ref JKTYPE.CartesianPose tcp_position)

現在のロボットアームの関節角度を取得——サーボフィードバック

int get_actual_joint_position(ref int handle, ref JKTYPE.JointValue joint_position)

現在のロボットアームの関節角度を取得する

int get_joint_position(ref int handle, ref JKTYPE.JointValue joint_position)

ロボットアームがリミットを超えているかどうかを確認する

int is_on_limit(ref int handle, ref bool on_limit)

ロボットアームの動作が停止しているかどうかを確認する

int is_in_pos(ref int handle, ref bool in_pos)

ロボットアームが緊急停止状態にあるかどうかを確認する

int is_in_estop(ref int handle, ref bool estop)

ロボットアームのモーションプランナータイプを設定する

int set_motion_planner(ref int handle, int type)

ロボットアームの動作を中止する

int motion_abort()

ロボットアームの動作状態を確認する

int get_motion_status(ref int handle, ref JKTYPE.MotionStatus status)

ロボットアームの負荷を設定する

int set_payload(ref int handle, ref JKTYPE.PayLoad payload)

ロボットアームの負荷データを取得する

int get_payload(ref int handle, ref JKTYPE.PayLoad payload)

IO関連

デジタル出力変数を設定する

int set_digital_output(ref int handle, JKTYPE.IOType type, int index, bool value)

アナログ出力変数を設定する

int set_analog_output(ref int handle, JKTYPE.IOType type, int index, float value)

デジタル入力状態を照会する

int get_digital_input(ref int handle, JKTYPE.IOType type, int index, ref bool result)

デジタル出力状態を照会する

int get_digital_output(ref int handle, JKTYPE.IOType type, int index, ref bool result)

アナログ入力変数の値を取得する

int get_analog_input(ref int handle, JKTYPE.IOType type, int index, ref float result)

アナログ出力変数の値を取得する

int get_analog_output(ref int handle, JKTYPE.IOType type, int index, float result)

動作中にデジタル出力変数を設定する

int set_motion_digital_output(ref int handle, JKTYPE.IOType type, int index, bool value, bool rel, double distance);

動作中にアナログ出力変数を設定する

int set_motion_analog_output(ref int handle, JKTYPE.IOType type, int index, float value)

拡張IOが実行中かを照会する

int is_extio_running(ref int handle, ref bool is_running)

TIO関連

TIOv3電圧パラメータを設定する

int set_tio_vout_param(ref int handle, int vout_enable,int vout_vol)

TIOv3電圧パラメータを取得する

int get_tio_vout_param(ref int handle,ref int vout_enable,ref int vout_vol)

TIO信号量を追加または修正する

int add_tio_rs_signal(ref int handle, JKTYPE.SignInfo sign_info)

TIO信号量を削除する

int del_tio_rs_signal(ref int handle, char[] sig_name);
int del_tio_rs_signal(ref int handle, [MarshalAs(UnmanagedType.LPStr)] string sig_name)

TIO RS485送信コマンド

int send_tio_rs_command(ref int handle, int chn_id, byte[] data, int buffsize)

TIO セマフォ情報の更新

int update_tio_rs_signal(ref int handle, [In, Out] JKTYPE.SignInfo_simple[] sign_info)

TIO セマフォ情報の取得

int get_rs485_signal_info(ref int handle, [In, Out] JKTYPE.SignInfo[] sign_info, ref int size)

TIOモードの設定

int set_tio_pin_mode(ref int handle, int pin_type, int pin_mode)

TIOモードの取得

int get_tio_pin_mode(ref int handle, int pin_type, ref int pin_mode)

TIO RS485通信パラメータ設定

int set_rs485_chn_comm(ref int handle, JKTYPE.ModRtuComm mod_rtu_com)

TIO RS485通信パラメータ照会

int get_rs485_chn_comm(ref int handle, ref JKTYPE.ModRtuComm mod_rtu_com)

TIO RS485通信モード設定

int set_rs485_chn_mode(ref int handle, int chn_id, int chn_mode)

TIO RS485通信モード照会

int get_rs485_chn_mode(ref int handle, int chn_id, ref int chn_mode)

サーボ関連

ロボットアームがサーボモーション状態にあるかを確認

int is_in_servomove(ref int handle, bool in_servo)

ロボットアーム サーボ位置制御モード有効化

int servo_move_enable(ref int handle, bool enable);
int servo_move_enable_extend(ref int handle, bool enable, bool is_block, int robot_id)

ロボットアーム 関節空間サーボモード動作

int servo_j(ref int handle, ref JKTYPE.JointValue joint_pos, JKTYPE.MoveMode move_mode, int step_num = 1);
(int ret, int queue_num) servo_j(ref int handle, ref JKTYPE.JointValue joint_pos, JKTYPE.MoveMode move_mode, int step_num = 1, JKTYPE.DOInfo? do_info = null, int robot_id = 0)

ロボットアームのデカルト空間におけるサーボモード動作拡張

int servo_p(ref int handle, ref JKTYPE.CartesianPose cartesian_pose, JKTYPE.MoveMode move_mode, int step_num = 1);
(int, int queue_num) servo_p(ref int handle, ref JKTYPE.CartesianPose cartesian_pose, JKTYPE.MoveMode move_mode, int step_num = 1, JKTYPE.DOInfo? do_info = null, int robot_id = 0)

ロボットアームのサーボモードでフィルターを無効化

int servo_move_use_none_filter(ref int i)

ロボットアームのサーボモードにおける関節空間一次ローパスフィルター

int servo_move_use_joint_LPF(ref int handle, double cutoffFreq)

ロボットアームのサーボモードにおける関節空間非線形フィルター

int servo_move_use_joint_NLF(ref int handle, double max_vr, double max_ar, double max_jr)

ロボットアームのサーボモードにおけるデカルト空間非線形フィルター

int servo_move_use_carte_NLF(ref int handle, double max_vp, double max_ap, double max_jp, double max_vr, double max_ar, double max_jr);
int servo_move_use_carte_NLF_extend(ref int handle, double max_vp, double max_ap, double max_jp, double max_vr, double max_ar, double max_jr, int ori_quat, int robot_id)

ロボットアームのサーボモードにおける関節空間多段平均フィルター

int servo_move_use_joint_MMF(ref int handle, int max_buf, double kp, double kv, double ka)

ロボットアームのサーボモードにおける速度予測パラメータ設定

int servo_speed_foresight(ref int handle, int max_buf, double kp);
int servo_speed_foresight_extend(ref int handle, int max_buf, double kp, int ori_quat, int robot_id)

ロボットアームのSERVOモードにおける関節空間フィルタリング

int servo_move_use_joint_PCM(ref int handle, int max_buf, double kp, int robot_id);

ロボットアームのSERVOモードにおけるデカルト空間フィルタリング

int servo_move_use_carte_PCM(ref int handle, int max_buf, double kp, int robot_id);

ロボットアームのSERVOモードでサーボ軌跡ファイルを実行

int start_servo_traj(ref int handle, [MarshalAs(UnmanagedType.LPStr)] string file)

サーボ軌跡の実行状態を取得

int get_traj_status(ref int handle, ref int is_running, ref whole_points, ref progress)

サーボ軌跡ファイルの実行を停止

int stop_servo_traj(ref int handle)

EDG

ロボットアームEDGの有効化

int edg_init(ref int handle, ref bool en, char[] edg_stat_ip)
int edg_init_extend(ref int handle, ref bool en, char[] edg_stat_ip, int edg_port, int edg_mode)

ロボットアームの高速EDGフィードバックデータ取得

int edg_get_stat(ref int handle, ref JKTYPE.EDGState edg_state, byte robot_index)

ロボットアームEDGフィードバックデータ送信タイムスタンプ取得

int edg_stat_details(ref int handle, ulong[] details)

ロボットアームEDG関節空間サーボモード動作

int edg_servo_j(ref int handle, ref JKTYPE.JointValue joint_pos, JKTYPE.MoveMode move_mode, int step_num, byte robot_index)

ロボットアームEDGデカルト空間サーボモード動作

int edg_servo_p(ref int handle, ref JKTYPE.CartesianPose cartesian_pose, JKTYPE.MoveMode move_mode, int step_num, byte robot_index)

軌跡関連

軌跡再現構成パラメータを設定

int set_traj_config(ref int handle, ref JKTYPE.TrajTrackPara para)

軌跡再現構成パラメータを取得

int get_traj_config(ref int handle, ref JKTYPE.TrajTrackPara para)

軌跡再現データ収集制御スイッチ

int set_traj_sample_mode(ref int handle, bool mode, char[] filename);
int set_traj_sample_mode(ref int handle, bool mode, [MarshalAs(UnmanagedType.LPStr)] string filename)

軌跡再現データ収集状態の照会

int get_traj_sample_status(ref int handle, ref bool sample_statuse)

コントローラ内に既に存在する軌跡再現データのファイル名を取得する

int get_exist_traj_file_name(ref int handle, ref JKTYPE.MultStrStorType filename)

軌跡再現データのファイル名を変更する

int rename_traj_file_name(ref int handle, ref char[] src, ref char[] dest);
int rename_traj_file_name(ref int handle, [MarshalAs(UnmanagedType.LPStr)] string src, [MarshalAs(UnmanagedType.LPStr)] string dest)

删除控制器中轨迹复现数据文件

int remove_traj_file(ref int handle, ref char[] filename);
int remove_traj_file(ref int handle, [MarshalAs(UnmanagedType.LPStr)] string filename)

コントローラ内の軌跡再現データファイルからコントローラ実行スクリプトを生成する

int generate_traj_exe_file(ref int handle, char[] filename);
int generate_traj_exe_file(ref int handle, [MarshalAs(UnmanagedType.LPStr)] string filename)

プログラム関連

运行当前加载的作业程序

int program_run(ref int handle)

暂停当前运行的作业程序

int program_pause(ref int handle)

继续运行当前暂停的作业程序

int program_resume(ref int handle)

终止当前执行的作业程序

int program_abort(ref int handle)

加载指定的作业程序

int program_load(ref int handle, char[] file);
int program_load(ref int handle, [MarshalAs(UnmanagedType.LPStr)] string file)

获取已加载的作业程序的名字

int get_loaded_program(ref int handle, StringBuilder file, 100)

获取当前机械臂作业程序的执行行号

int get_current_line(ref int handle, ref int curr_line)

获取机械臂作业程序的执行状态

int get_program_state(ref int handle, ref JKTYPE.ProgramState status)

获取机械臂作业程序的信息

int get_program_info(ref int handle, ref JKTYPE.ProgramInfo info)

システム変数を取得

int get_user_var(ref int handle, ref JKTYPE.UserVariableList vlist)

システム変数を設定

int set_user_var(ref int handle, ref JKTYPE.UserVariable v)

FTP

FTPクライアントを初期化

int init_ftp_client(ref int i)

FTPクライアントを閉じる

int close_ftp_client(ref int i)

FTPダウンロード

int download_file(ref int handle, char[] local, char[] remote, int opt);
int download_file(ref int handle, [MarshalAs(UnmanagedType.LPStr)] string local, [MarshalAs(UnmanagedType.LPStr)] string remote, int opt)

FTPアップロード

int upload_file(ref int handle, char[] local, char[] remote, int opt);
int upload_file(ref int handle, [MarshalAs(UnmanagedType.LPStr)] string local, [MarshalAs(UnmanagedType.LPStr)] string remote, int opt)

FTP削除

int del_ftp_file(ref int handle, char[] remote, int opt);
int del_ftp_file(ref int handle, [MarshalAs(UnmanagedType.LPStr)] string remote, int opt)

FTPファイル名変更

int rename_ftp_file(ref int handle, char[] remote, char[] des, int opt);
int rename_ftp_file(ref int handle, [MarshalAs(UnmanagedType.LPStr)] string remote, [MarshalAs(UnmanagedType.LPStr)] string des, int opt)

FTPディレクトリ照会

int get_ftp_dir(ref int handle, char[] remote, int type, StringBuilder ret );
int get_ftp_dir(ref int handle, [MarshalAs(UnmanagedType.LPStr)] string remote, int type, StringBuilder ret )

力制御関連

エンド力センサのモデルを設定する

int set_torsenosr_brand(ref int handle, int sensor_brand)

エンド部力覚センサーの型番を取得

int get_torsenosr_brand(ref int handle, ref int sensor_brand)

エンドエフェクタ力センサーのオン/オフを切り替える

int set_torque_sensor_mode(ref int handle, int sensor_mode)

センサーの動作状態を取得する

int get_torque_sensor_mode(ref int handle, ref int sensor_mode)

エンドエフェクタの力センサー通信パラメータを設定

int set_torque_sensor_comm(ref int handle, int type, ref char[] ip_addr, int port);
int set_torque_sensor_comm(ref int handle, int type, [MarshalAs(UnmanagedType.LPStr)] string ip_addr, int port)

エンドエフェクタの力センサー通信パラメータを取得

int get_torque_sensor_comm(ref int handle, ref int type, [MarshalAs(UnmanagedType.LPStr)] StringBuilder ip_addr, ref int port)

力コンプライアンス制御を無効にする

int disable_force_control(ref int handle);

エンドエフェクタの力センサーのローパスフィルタカットオフ周波数を設定

int set_torque_sensor_filter(ref int handle, float torque_sensor_filter)

エンドエフェクタの力センサーのローパスフィルタカットオフ周波数を取得

int get_torque_sensor_filter(ref int handle, ref float torque_sensor_filter)

エンド力センサのソフトリミットを設定する

int set_torque_sensor_soft_limit(ref int handle, JKTYPE.FTxyz torque_sensor_soft_limit)

エンド力センサのソフトリミットを取得する

int get_torque_sensor_soft_limit(ref int handle, ref JKTYPE.FTxyz torque_sensor_soft_limit)

センサーの状態とデータを取得する

int get_torque_sensor_data(ref int handle, int type, ref JKTYPE.TorqSensorData)

センサーをゼロ設定にする

int zero_end_sensor(ref int handle)

力制御の速度制限を設定する

int set_compliant_speed_limit(ref int handle, double vel, double angular_vel)

力制御の速度制限を取得する

int get_compliant_speed_limit(ref int handle, ref double vel, ref double angular_vel)

速度コンプライアンス制御パラメータを設定する

int set_vel_compliant_ctrl(ref int handle, ref JKTYPE.VelCom vel_cfg)

トルク基準中心を設定する

int set_torque_ref_point(ref int handle, int refPoint)

トルク参照点を取得

int get_torque_ref_point(ref int handle, ref int refPoint)

センサー感度を設定する

int set_end_sensor_sensitivity_threshold(ref int handle, JKTYPE.FTxyz)

センサー感度を取得

int get_end_sensor_sensitivity_threshold(ref int handle, ref JKTYPE.FTxyz)

力制御の終了条件を設定

int set_force_stop_condition(ref int handle, ref JKTYPE.ForceStopConditionList)

負荷識別

センサーエンドの負荷識別を開始

int start_torq_sensor_payload_identify(ref int handle, ref JKTYPE.JointValue joint_pos)

センサーエンドの負荷識別状態を取得

int get_torq_sensor_identify_staus(ref int handle, ref int identify_status)

センサーエンドの負荷識別結果を取得

int get_torq_sensor_payload_identify_result(ref int handle, ref JKTYPE.PayLoad payload)

センサーエンドの負荷を設定

int set_torq_sensor_tool_payload(ref int handle, ref JKTYPE.PayLoad payload)

センサー先端の負荷を取得

int get_torq_sensor_tool_payload(ref int handle, ref JKTYPE.PayLoad payload)

ツールドラッグ

力コンプライアンス制御パラメータを取得

int get_admit_ctrl_config(ref int handle, ref JKTYPE.RobotAdmitCtrl admit_ctrl_cfg)

力・コンプライアンス制御パラメータの設定

int set_admit_ctrl_config(ref int handle, int axis, int opt, double ftUser, double ftConstant, int ftNnormalTrack, double ftReboundFK)

ツールドラッグのオン/オフを切り替える

int enable_admittance_ctrl(ref int handle, int enable_flag)

开启工具拖拽

int enable_tool_drive(ref int handle, int enable_flag)

获取工具拖拽开启状态

int get_tool_drive_state(ref int handle, ref int enable_flag, ref int state)

ツールドラッグパラメータを取得

int get_tool_drive_config(ref int handle, ref JKTYPE.RobotToolDriveCtrl)

力制御ドラッグ感覚パラメータを設定

int set_tool_drive_config(ref int handle, JKTYPE.ToolDriveConfig)

ツールドラッグ座標系を取得

int get_tool_drive_frame(ref int handle, ref JKTYPE.FTFrameType)

ツールドラッグ座標系を設定

int set_tool_drive_frame(ref int handle, JKTYPE.FTFrameType)

融合ドライブ感度を取得

int get_fusion_drive_sensitivity_level(ref int handle, ref int level)

融合ドライブ感度を設定

int set_fusion_drive_sensitivity_level(ref int handle, int level)

获取运动限制-奇异点和关节限位-预警范围

int get_motion_limit_warning_range(ref int handle, ref int warning_range)

设置运动限制-奇异点和关节限位-预警范围

int set_motion_limit_warning_range(ref int handle, int warning_range)

力控

恒力コンプライアンス制御座標系を設定

int set_ft_ctrl_frame(ref int handle, int ftFrame)

恒力コンプライアンス制御座標系を取得

int get_ft_ctrl_frame(ref int handle,ref int ftFrame)

设置力控类型和校零(初始化)选项

int set_compliant_type(ref int handle, int sensor_compensation, int compliance_type)

获取力控类型和读数显示(初始化)状态

int get_compliant_type(ref int handle, ref int sensor_compensation, ref int compliance_type)

速度コンプライアンス制御の力条件を設定する

int set_compliance_condition(ref int handle, ref JKTYPE.FTxyz ft)

设置进近限速

int set_approach_speed_limit(ref int handle, double vel, double angularVel)

获取进近限速

int get_approach_speed_limit(ref int handle, ref double vel, ref double angularVel)

恒力制御許容値を設定

int set_ft_tolerance(ref int handle, double force, double torque)

恒力制御許容値を取得

int get_ft_tolerance(ref int handle, ref double force, ref double torque)

定常力コンプライアンス制御の有効/無効を設定

int set_ft_ctrl_mode(ref int handle, int mode)

定力コンプライアンスの有効状態を取得

int get_ft_ctrl_mode(ref int handle,ref int mode)

定常力コンプライアンス制御パラメータを設定

int set_ft_ctrl_config(ref int handle, AdmitCtrlType cfg)

定常力コンプライアンス制御パラメータを取得

int get_ft_ctrl_config(ref int handle,ref RobotAdmitCtrl cfg)

碰撞

查询机械臂是否处于碰撞保护模式

int is_in_collision(ref int handle, ref bool in_collision)

碰撞之后从碰撞保护模式恢复

int collision_recover(ref int handle)

设置机械臂碰撞等级

int set_collision_level(ref int handle, int level)

获取机器设置的碰撞等级

int get_collision_level(ref int handle, ref int level)

运动学

机械臂求解逆解

int kine_inverse(ref int handle, ref JKTYPE.JointValue ref_pos, ref JKTYPE.CartesianPose cartesian_pose, ref JKTYPE.JointValue joint_pos)

机械臂求解正解

int kine_forward(ref int handle, ref JKTYPE.JointValue joint_pos, ref JKTYPE.CartesianPose cartesian_pose)

机械臂求解逆解拓展

int kine_inverse_extend(ref int handle, ref JKTYPE.JointValue ref_pos, ref JKTYPE.CartesianPose cartesian_pose, ref JKTYPE.JointValue joint_pos, ref JKTYPE.CartesianPose tool, ref JKTYPE.CartesianPose userFrame)

机械臂求解正解拓展

int kine_forward_extend(ref int handle, ref JKTYPE.JointValue joint_pos, ref JKTYPE.CartesianPose cartesian_pose, ref JKTYPE.CartesianPose tool, ref JKTYPE.CartesianPose userFrame)

欧拉角到旋转矩阵的转换

int rpy_to_rot_matrix(ref int handle, ref JKTYPE.Rpy rpy, ref JKTYPE.RotMatrix rot_matrix)

旋转矩阵到欧拉角的转换

int rot_matrix_to_rpy(ref int handle, ref JKTYPE.RotMatrix rot_matrix, ref JKTYPE.Rpy rpy)

四元数到旋转矩阵的转换

int quaternion_to_rot_matrix(ref int handle, ref JKTYPE.Quaternion quaternion, ref JKTYPE.RotMatrix rot_matrix)

旋转矩阵到四元数的转换

int rot_matrix_to_quaternion(ref int handle, ref JKTYPE.RotMatrix rot_matrix, ref JKTYPE.Quaternion quaternion)

接口调用返回值列表及问题排查

错误代码説明处理建议
0successnull
2interface error or controller not support核对控制器和SDK版本信息,进行升级或换用其他接口
-1invalid handler请检查调用接口前是否login
-2invalid parameter请检查参数是否正确
-3fail to connect请检查网络连接状态,或机器人IP是否正确
-4kine_inverse error逆解失败,请检查当前的坐标系,或参考关节角是否合理
-5e-stop急停状态,保留状态
-6not power on未上电
-7not enable未使能
-8not in servo mode不处于伺服模式,在执行servoJP 的时候,必须先进入伺服模式,请检查是否调用对应接口
-9must turn off enable before power off下电前必须下使能
-10cannot operate, program is running无法操作,程序正在执行中,请先关闭程序
-11cannot open file, or file doesn't exist无法打开文件,或者文件不存在
-12motion abnormal运动异常,可能处于奇异点附近,或者超出机器人运动限制
-14ftp errorftp异常
-15socket msg or value oversize超出限制异常
-16kine_forward error正解失败
-17not support empty folder不支持空文件夹
-20protective stop保護停止
-21emergency stop緊急停止
-22on soft limit处于软限位,此时无法手动拖动机器人,需要用APP上的示教功能接触软限位
-30fail to encode cmd string命令编码失败,一般是解析控制器返回的消息时出错
-31fail to decode cmd string命令解码失败,一般是解析控制器返回的消息时出错
-32fail to uncompress port 10004 string解压缩10004端口数据失败,可能受网络波动影响,或数据量太大的原因
-40move linear error直线运动失败,请检查是否路径中是否有奇异区域
-41move joint error关节运动失败,请检查设置的关节角度
-42move circular error圆弧运动失败,请检查设置的参数
-50block_wait timeout阻塞等待超时
-51power on timeout上电超时
-52power off timeout下电超时
-53enable timeoff使能超时
-54disable timeout下使能超时
-55set userframe timeout设置用户坐标系超时
-56set tool timeout设置工具坐标系超时
-57edg init failededg功能初始化失败
-58edg is running, cannot use servo_j or servo_pedg功能正在执行中,无法使用servo_j或者servo_p接口
-59current edg mode does not support using edg_servo_j or edg_servo_p.edg功能正在执行中,无法使用edg_servo_j或者edg_servo_p接口
-60set io timeout设置IO超时
-61operation timeout接口超时
-62servo queue is full伺服队列已满
-63servo is not running伺服模式未启动
-9997not implement接口未实现
-9998deprecated interface接口未来将被移除(功能暂可用)
-9999obsolete interface接口未来将被移除(功能不可用)

问题反馈

文档中若出现不准确的描述或者错误,恳请读者见谅指正。如果您在阅读过程中发现任何问题或者有想提出的意见,可以发送邮件到 support@jaka.com ,我们将尽快给您回复。

最終更新日: