C言語
約21分
C言語
本ドキュメントでは、JAKA SDK(C)で定義されているデータ型およびAPIについて説明します。これは、C/C++を使用して仮想または実際のコントローラと通信するロボットアプリケーションを作成するソフトウェア開発者を主な対象としています。JAKAロボットコントローラのアプリケーションを理解する必要があるユーザーにも有用です。
インターフェース一覧
ロボット基礎操作
ロボットアームログイン
errno_t create_handler(const char *ip, JKHD *handle, BOOL use_grpc)
ロボットアームログアウト
errno_t destory_handler(const JKHD *handle)
ロボットアーム通電
errno_t power_on(const JKHD *handle)
ロボットアーム電源オフ
errno_t power_off(const JKHD *handle)
ロボットアームシャットダウン
errno_t shut_down(const JKHD *handle)
ロボットアーム有効化
errno_t enable_robot(const JKHD *handle)
ロボットアーム無効化
errno_t disable_robot(const JKHD *handle)
現在接続されているロボットアームのDHパラメータを取得
errno_t get_dh_param(const JKHD *handle, DHParam *dhParam)
ロボットアームの設置角度を設定
errno_t set_installation_angle(const JKHD* handle, double angleX, double angleZ)
ロボットアームの設置角度を取得
errno_t get_installation_angle(const JKHD* handle, Quaternion* quat, Rpy* appang)
ロボットアームの状態を取得
errno_t get_robot_state(const JKHD *handle, RobotState *state)
ロボットアームの状態監視データを取得 — 唯一のマルチスレッド安全インターフェース
errno_t get_robot_status(const JKHD *handle, RobotStatus *status)
ロボットアームの状態監視データを取得
errno_t get_robot_status_simple(const JKHD *handle, RobotStatus_simple *status)
SDK
ロボットアームのエラー時にコールバック関数を登録
errno_t set_error_handler(const JKHD *handle, CallBackFuncType func)
SDKバージョン番号を取得
errno_t get_sdk_version(const JKHD *handle, char *version)
ネットワーク異常時にロボットアームの動作を自動停止するタイプを設定
errno_t set_network_exception_handle(const JKHD *handle, float millisecond, ProcessType mnt)
コントローラのIPを取得
errno_t get_controller_ip(char *controller_name, char *ip_list)
ロボットアームのエラーコードファイル保存パスを設定
errno_t set_errorcode_file_path(const JKHD *handle, char *path)
ロボットアームのエラーコードファイル保存パスを設定し、現在発生している最後のエラーコードを取得
errno_t get_last_error(const JKHD *handle, ErrorCode *code)
エラー状態をクリア
errno_t clear_error(const JKHD *handle)
SDKのデバッグモードを有効にするかどうかを設定
errno_t set_debug_mode(const JKHD *handle, BOOL mode)
SDKログのパスを設定
errno_t set_SDK_filepath(const JKHD *handle, char *filepath)
SDKログパスを取得
errno_t get_SDK_filepath(const JKHD *handle, char *filepath, int size)
ロボット動作出力
ロボットアームの手動モードでの動作
errno_t jog(const JKHD *handle, int aj_num, MoveMode move_mode, CoordType coord_type, double vel_cmd, double pos_cmd)
ロボットアームの手動モード動作を停止
errno_t jog_stop(const JKHD *handle, int num)
ロボットアーム関節運動
//以下のインターフェースは機能が同じで、拡張オプションパラメータが異なる。実際の要件に応じて使用を選択可能。
errno_t joint_move(const JKHD *handle, const JointValue *joint_pos, MoveMode move_mode, BOOL is_block, double speed)
errno_t joint_move_extend(const JKHD *handle, const JointValue *joint_pos, MoveMode move_mode, BOOL is_block, double speed, double acc, double tol, const OptionalCond *option_cond)
ロボットアーム末端の直線運動
//以下のインターフェースは機能が同じで、拡張オプションパラメータが異なる。実際の要件に応じて使用を選択可能。
errno_t linear_move(const JKHD *handle, const CartesianPose *end_pos, MoveMode move_mode, BOOL is_block, double speed)
errno_t linear_move_extend(const JKHD *handle, const CartesianPose *end_pos, MoveMode move_mode, BOOL is_block, double speed, double accel, double tol, const OptionalCond *option_cond)
errno_t linear_move_extend_ori(const JKHD *handle, const CartesianPose *end_pos, MoveMode move_mode, BOOL is_block, double speed, double accel, double tol, const OptionalCond *option_cond, double ori_vel, double ori_acc)
ロボットアーム円弧運動
//以下のインターフェースは機能が同じで、拡張オプションパラメータが異なる。実際の要件に応じて使用を選択可能。
errno_t circular_move(const JKHD *handle, const CartesianPose *end_pos, const CartesianPose *mid_pos, MoveMode move_mode, BOOL is_block, double speed, double accel, double tol, const OptionalCond *option_cond)
errno_t circular_move_extend(const JKHD *handle, const CartesianPose *end_pos, const CartesianPose *mid_pos, MoveMode move_mode, BOOL is_block, double speed, double accel, double tol, const OptionalCond *option_cond, double circle_cnt)
errno_t circular_move_extend_mode(const JKHD *handle, const CartesianPose *end_pos, const CartesianPose *mid_pos, MoveMode move_mode, BOOL is_block, double speed, double accel, double tol, const OptionalCond *option_cond, double circle_cnt, int circle_mode)
ロボットアームの動作倍率を設定
errno_t set_rapidrate(const JKHD *handle, double rapid_rate)
ロボットアームの動作倍率を取得
errno_t get_rapidrate(const JKHD *handle, double *rapid_rate)
ツール情報を設定
errno_t set_tool_data(const JKHD *handle, int id, const CartesianPose *tcp, const char *name)
ツール情報を取得
errno_t get_tool_data(const JKHD *handle, int id, CartesianPose *tcp)
現在使用中のツールIDを設定する
errno_t set_tool_id(const JKHD *handle, const int id)
現在使用中のツールIDを照会する
errno_t get_tool_id(const JKHD *handle, int *id)
ユーザー座標系情報を設定する
errno_t set_user_frame_data(const JKHD *handle, int id, const CartesianPose *user_frame, const char *name)
ユーザー座標系情報を取得
errno_t get_user_frame_data(const JKHD *handle, int id, CartesianPose *user_frame)
現在使用中のユーザー座標系IDを設定する
errno_t set_user_frame_id(const JKHD *handle, const int id)
現在使用中のユーザー座標系IDを照会する
errno_t get_user_frame_id(const JKHD *handle, int *id)
ロボットアームをドラッグモードに入るまたは終了させる
errno_t drag_mode_enable(const JKHD *handle, BOOL enable)
ロボットアームがドラッグモード中かどうかを照会する
errno_t is_in_drag_mode(const JKHD *handle, BOOL *in_drag)
関節摩擦補償係数を取得する
errno_t get_drag_friction_compensation_gain(const JKHD* handle, DragFrictionCompensationGainList* list)
現在のロボットアームの関節角度——サーボフィードバックを取得する
errno_t get_actual_joint_position(const JKHD *handle, JointValue *joint_position)
現在の設定下での関節角度を取得する
errno_t get_joint_position(const JKHD *handle, JointValue *joint_position)
現在の設定下でのツールエンドの姿勢——サーボフィードバックを取得する
errno_t get_actual_tcp_position(const JKHD *handle, CartesianPose *tcp_position)
現在の設定下でのツールエンドの姿勢を取得する
errno_t get_tcp_position(const JKHD *handle, CartesianPose *tcp_position)
ロボットアームがリミットを超えているかを確認する
errno_t is_on_limit(const JKHD *handle, BOOL *on_limit)
ロボットアームの動作が停止しているかを確認する
errno_t is_in_pos(const JKHD *handle, BOOL *in_pos)
ロボットアームが非常停止状態にあるかを確認する
errno_t is_in_estop(const JKHD *handle, BOOL *in_estop)
ロボットアームのモーションプランナータイプを設定する
errno_t set_motion_planner(const JKHD* handle, MotionPlannerType type)
ロボットアームの動作を中止する
errno_t motion_abort(const JKHD *handle)
ロボットアームの動作状態を確認する
errno_t get_motion_status(const JKHD* handle, MotionStatus *status)
ロボットアームのペイロードを設定する
errno_t set_payload(const JKHD *handle, const PayLoad *payload)
ロボットアームのペイロードデータを取得する
errno_t get_payload(const JKHD *handle, PayLoad *payload)
IO
デジタル出力変数を設定する
errno_t set_digital_output(const JKHD *handle, IOType type, int index, BOOL value)
アナログ出力変数を設定する
errno_t set_analog_output(const JKHD *handle, IOType type, int index, float value)
動作中にデジタル出力変数を設定する
errno_t set_motion_digital_output(const JKHD *handle, IOType type, int index, BOOL value, BOOL rel, double distance)
動作中にアナログ出力変数を設定する
errno_t set_motion_analog_output(const JKHD *handle, IOType type, int index, float value, BOOL rel, double distance)
デジタル入力状態を照会
errno_t get_digital_input(const JKHD *handle, IOType type, int index, BOOL *result)
デジタル出力状態を照会
errno_t get_digital_output(const JKHD *handle, IOType type, int index, BOOL *result)
アナログ入力変数の値を取得
errno_t get_analog_input(const JKHD *handle, IOType type, int index, float *result)
アナログ出力変数の値を取得
errno_t get_analog_output(const JKHD *handle, IOType type, int index, float *result)
拡張IOが動作中か確認
errno_t is_extio_running(const JKHD *handle, BOOL *is_running)
TIOケーブル
TIOv3電圧パラメータを設定
errno_t set_tio_vout_param(const JKHD* handle, int vout_enable, int vout_vol)
TIOv3電圧パラメータを取得
errno_t get_tio_vout_param(const JKHD* handle, int* vout_enable, int* vout_vol)
TIOセマフォを追加または変更
errno_t add_tio_rs_signal(const JKHD* handle, SignInfo sign_info)
TIOセマフォを削除
errno_t del_tio_rs_signal(const JKHD* handle, const char* sig_name)
TIO RS485コマンドを送信
errno_t send_tio_rs_command(const JKHD* handle, int chn_id, uint8_t* cmdbuf, int bufsize)
TIOセマフォ情報を更新
errno_t update_tio_rs_signal(const JKHD* handle, SignInfo_simple sign_info);
TIOセマフォ情報を取得
errno_t get_rs485_signal_info(const JKHD* handle, SignInfo* sign_info_array, int *array_len)
TIOモードを設定
errno_t set_tio_pin_mode(const JKHD* handle, int pin_type, int pin_mode)
TIOモードを取得
errno_t get_tio_pin_mode(const JKHD* handle, int pin_type, int* pin_mode)
TIO RS485通信パラメータ設定
errno_t set_rs485_chn_comm(const JKHD* handle, ModRtuComm mod_rtu_com)
TIO RS485通信パラメータ照会
errno_t get_rs485_chn_comm(const JKHD* handle, int chn_id, ModRtuComm* mod_rtu_com)
TIO RS485通信モード設定
errno_t set_rs485_chn_mode(const JKHD* handle, int chn_id, int chn_mode)
TIO RS485通信モード照会
errno_t get_rs485_chn_mode(const JKHD* handle, int chn_id, int* chn_mode)
サーボ
ロボットアームがサーボ動作状態にあるかを確認
errno_t is_in_servomove(const JKHD *handle, BOOL *in_servo)
ロボットアームのサーボ位置制御モードを有効化
//以下のインターフェースは機能が同じで、拡張オプションパラメータが異なる。実際の要件に応じて使用を選択可能。
errno_t servo_move_enable(const JKHD *handle, BOOL enable)
errno_t servo_move_enable_extend(const JKHD *handle, BOOL enable, BOOL is_block, int robot_id)
ロボットアーム関節空間サーボモード動作
//以下のインターフェースは機能が同じで、拡張オプションパラメータが異なる。実際の要件に応じて使用を選択可能。
errno_t servo_j(const JKHD *handle, const JointValue *joint_pos, MoveMode move_mode)
errno_t servo_j_extend(const JKHD *handle, const JointValue *joint_pos, MoveMode move_mode, unsigned int step_num)
errno_t servo_j_extend_queue(const JKHD *handle, const JointValue *joint_pos, MoveMode move_mode, unsigned int step_num, int *queue_num, DOInfo *do_info, int robot_id)
ロボットアームデカルト空間サーボモード動作拡張
//以下のインターフェースは機能が同じで、拡張オプションパラメータが異なる。実際の要件に応じて使用を選択可能。
errno_t servo_p(const JKHD *handle, const CartesianPose *cartesian_pose, MoveMode move_mode)
errno_t servo_p_extend(const JKHD *handle, const CartesianPose *cartesian_pose, MoveMode move_mode, unsigned int step_num)
errno_t servo_p_extend_queue(const JKHD *handle, const CartesianPose *cartesian_pose, MoveMode move_mode, unsigned int step_num, int *queue_num, DOInfo *do_info, int robot_id)
ロボットアームのサーボモードでフィルターを無効にする
errno_t servo_move_use_none_filter(const JKHD *handle)
ロボットアームのサーボモードで関節空間の一次ローパスフィルタ
errno_t servo_move_use_joint_LPF(const JKHD *handle, double cutoffFreq)
ロボットアームのサーボモードで関節空間の非線形フィルタ
errno_t servo_move_use_joint_NLF(const JKHD *handle, double max_vr, double max_ar, double max_jr)
ロボットアームのサーボモードでデカルト空間の非線形フィルタ
//以下のインターフェースは機能が同じで、拡張オプションパラメータが異なる。実際の要件に応じて使用を選択可能。
errno_t servo_move_use_carte_NLF(const JKHD *handle, double max_vp, double max_ap, double max_jp, double max_vr, double max_ar, double max_jr)
errno_t servo_move_use_carte_NLF_extend(const JKHD *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)
ロボットアームのサーボモードで関節空間の多段平均フィルタ
errno_t servo_move_use_joint_MMF(const JKHD *handle, int max_buf, double kp, double kv, double ka)
ロボットアームのサーボモードで速度先見パラメータを設定
//以下のインターフェースは機能が同じで、拡張オプションパラメータが異なる。実際の要件に応じて使用を選択可能。
errno_t servo_speed_foresight(const JKHD *handle, int max_buf, double kp)
errno_t servo_speed_foresight_extend(const JKHD *handle, int max_buf, double kp, int ori_quat, int robot_id)
ロボットアームのSERVOモードで関節空間フィルタを適用
errno_t servo_move_use_joint_PCM(const JKHD *handle, int max_buf, double kp, int robot_id)
ロボットアームのSERVOモードでデカルト空間フィルタを適用
errno_t servo_move_use_carte_PCM(const JKHD *handle, int max_buf, double kp, int robot_id)
ロボットアームのSERVOモードでサーボ軌跡ファイルを実行
errno_t start_servo_traj(const JKHD *handle, const char* filename)
サーボ軌跡の実行状態を取得
errno_t get_traj_status(const JKHD *handle, int* is_running, int* whole_points, int* progress)
サーボ軌跡ファイルの実行を停止
errno_t stop_servo_traj(const JKHD *handle)
EDG
ロボットアームEDGのイネーブル
//以下のインターフェースは機能が同じで、拡張オプションパラメータが異なる。実際の要件に応じて使用を選択可能。
errno_t edg_init(const JKHD *handle, BOOL en, const char* edg_stat_ip)
errno_t edg_init_extend(const JKHD *handle, BOOL en, const char* edg_stat_ip, int edg_port, unsigned int edg_mode)
ロボットアームの高速EDGフィードバックデータ取得
errno_t edg_get_stat(const JKHD *handle, EDGState *edg_state, unsigned char robot_index)
ロボットアームのEDGフィードバックデータ送信タイムスタンプ取得
errno_t edg_stat_details(const JKHD *handle, unsigned long int details[3]);
ロボットアームEDG関節空間サーボモード動作
//以下のインターフェースは機能が同じで、拡張オプションパラメータが異なる。実際の要件に応じて使用を選択可能。
errno_t edg_servo_j(const JKHD *handle, const JointValue *joint_pos, MoveMode move_mode)
errno_t edg_servo_j_extend(const JKHD *handle, const JointValue *joint_pos, MoveMode move_mode, unsigned int step_num, unsigned char robot_index)
ロボットアームEDGデカルト空間サーボモード動作
//以下のインターフェースは機能が同じで、拡張オプションパラメータが異なる。実際の要件に応じて使用を選択可能。
errno_t edg_servo_p(const JKHD *handle, const CartesianPose *cartesian_pose, MoveMode move_mode)
errno_t edg_servo_p_extend(const JKHD *handle, const CartesianPose *cartesian_pose, MoveMode move_mode, unsigned int step_num, unsigned char robot_index)
軌跡
軌跡再現の設定パラメータを設定
errno_t set_traj_config(const JKHD *handle, const TrajTrackPara *para)
軌跡再現データ収集の制御スイッチ
errno_t set_traj_sample_mode(const JKHD *handle, const BOOL mode, char *filename)
軌跡再現の設定パラメータを取得
errno_t get_traj_config(const JKHD *handle, TrajTrackPara *para)
軌跡再現データ収集の状態を照会
errno_t get_traj_sample_status(const JKHD *handle, BOOL *sample_status)
コントローラ内に既に存在する軌跡再現データのファイル名を取得する
errno_t get_exist_traj_file_name(const JKHD *handle, MultStrStorType *filename)
軌跡再現データのファイル名を変更する
errno_t rename_traj_file_name(const JKHD *handle, const char *src, const char *dest)
コントローラ内の軌跡再現データファイルを削除
errno_t remove_traj_file(const JKHD *handle, const char *filename)
コントローラ内の軌跡再現データファイルからコントローラ実行スクリプトを生成する
errno_t generate_traj_exe_file(const JKHD *handle, const char *filename)
プログラム
現在読み込まれているジョブプログラムを実行する
errno_t program_run(const JKHD *handle)
現在実行中のジョブプログラムを一時停止する
errno_t program_pause(const JKHD *handle)
現在一時停止中のジョブプログラムを再開する
errno_t program_resume(const JKHD *handle)
現在実行中のジョブプログラムを終了する
errno_t program_abort(const JKHD *handle)
指定されたジョブプログラムを読み込む
errno_t program_load(const JKHD *handle, const char *file)
ロボットアームのジョブプログラムの実行状態を取得する
errno_t get_program_state(const JKHD *handle, ProgramState *status)
ロボットアームのジョブプログラム情報を取得する
errno_t get_program_info(const JKHD *handle, ProgramInfo* info)
読み込まれているジョブプログラムの名前を取得する
errno_t get_loaded_program(const JKHD *handle, char *file)
現在のロボットアームジョブプログラムの実行行番号を取得する
errno_t get_current_line(const JKHD *handle, int *curr_line)
システム変数を取得する
errno_t get_user_var(const JKHD *handle, UserVariableList* vlist)
システム変数を設定する
errno_t set_user_var(const JKHD *handle, UserVariable v)
FTP
FTPクライアントを初期化する
errno_t init_ftp_client(const JKHD *handle)
FTPクライアントを閉じる
errno_t close_ftp_client(const JKHD *handle)
FTPダウンロード
errno_t download_file(const JKHD *handle, char *local, char *remote, int opt)
FTPアップロード
errno_t upload_file(const JKHD *handle, char *local, char *remote, int opt)
FTP削除
errno_t del_ftp_file(const JKHD *handle, char *remote, int opt)
FTPファイル名の変更
errno_t rename_ftp_file(const JKHD *handle, char *remote, char *des, int opt)
FTPディレクトリ照会
errno_t get_ftp_dir(const JKHD *handle, const char *remotedir, int type, char *ret)
力制御関連
エンド力センサのモデルを設定する
errno_t set_torsenosr_brand(const JKHD *handle, int sensor_brand)
エンド部力覚センサーの型番を取得
errno_t get_torsenosr_brand(const JKHD *handle, int *sensor_brand)
エンドエフェクタ力センサーのオン/オフを切り替える
errno_t set_torque_sensor_mode(const JKHD *handle, int sensor_mode)
エンドエフェクタの力センサー通信パラメータを設定
errno_t set_torque_sensor_comm(const JKHD *handle, const int type, const char *ip_addr, const int port)
エンドエフェクタの力センサー通信パラメータを取得
errno_t get_torque_sensor_comm(const JKHD *handle, int *type, char *ip_addr, int *port)
力コンプライアンス制御を無効にする
errno_t disable_force_control(const JKHD *handle);
エンドエフェクタの力センサーのローパスフィルタカットオフ周波数を設定
errno_t set_torque_sensor_filter(const JKHD *handle, const float torque_sensor_filter)
エンドエフェクタの力センサーのローパスフィルタカットオフ周波数を取得
errno_t get_torque_sensor_filter(const JKHD *handle, float *torque_sensor_filter)
エンド力センサのソフトリミットを設定する
errno_t set_torque_sensor_soft_limit(const JKHD *handle, const FTxyz torque_sensor_soft_limit)
エンド力センサのソフトリミットを取得する
errno_t get_torque_sensor_soft_limit(const JKHD *handle, FTxyz *torque_sensor_soft_limit)
センサーの動作状態を取得する
errno_t get_torque_sensor_mode(const JKHD *handle, int* sensor_mode)
センサーの状態とデータを取得する
errno_t get_torque_sensor_data(const JKHD *handle, int type, TorqSensorData* data)
センサーをゼロ設定にする
errno_t zero_end_sensor(const JKHD *handle)
力制御の速度制限を設定する
errno_t set_compliant_speed_limit(const JKHD *handle, double speed_limit, double angular_speed_limit)
力制御の速度制限を取得する
errno_t get_compliant_speed_limit(const JKHD *handle, double* speed_limit, double* angular_speed_limitangularVel)
力制御タイプとゼロ校正(初期化)オプションを設定する
errno_t set_compliant_type(const JKHD *handle, int sensor_compensation, int compliance_type)
力制御タイプと読み取り表示(初期化)状態を取得する
errno_t get_compliant_type(const JKHD *handle, int *sensor_compensation, int *compliance_type)
速度コンプライアンス制御パラメータを設定する
errno_t set_vel_compliant_ctrl(const JKHD *handle, const VelCom *vel)
トルク基準中心を設定する
errno_t set_torque_ref_point(const JKHD *handle, int ref_point)
トルク参照点を取得
errno_t get_torque_ref_point(const JKHD *handle, int *ref_point)
センサー感度を設定する
errno_t set_end_sensor_sensitivity_threshold(const JKHD *handle, FTxyz threshold)
センサー感度を取得する
errno_t get_end_sensor_sensitivity_threshold(const JKHD *handle, FTxyz *threshold)
力制御の停止条件を設定する
errno_t set_force_stop_condition(const JKHD *handle, ForceStopConditionList condition)
センサーエンドの負荷識別を開始
errno_t start_torq_sensor_payload_identify(const JKHD *handle, const JointValue *joint_pos)
センサーエンドの負荷識別状態を取得
errno_t get_torq_sensor_identify_staus(const JKHD *handle, int *identify_status)
センサーエンドの負荷識別結果を取得
errno_t get_torq_sensor_payload_identify_result(const JKHD *handle, PayLoad *payload)
センサーエンドの負荷を設定
errno_t set_torq_sensor_tool_payload(const JKHD *handle, const PayLoad *payload)
センサー先端の負荷を取得
errno_t get_torq_sensor_tool_payload(const JKHD *handle, PayLoad *payload)
ツールドラッグ
力コンプライアンス制御パラメータを取得
errno_t get_admit_ctrl_config(const JKHD *handle, RobotAdmitCtrl *admit_ctrl_cfg)
力制御アドミッタンス有効化
errno_t enable_admittance_ctrl(const JKHD *handle, const int enable_flag)
开启工具拖拽
errno_t enable_tool_drive(const JKHD *handle, const int enable_flag)
获取工具拖拽开启状态
errno_t get_tool_drive_state(const JKHD *handle, int* enable, int *state)
ツールドラッグパラメータを取得
errno_t get_tool_drive_config(const JKHD *handle, RobotToolDriveCtrl* cfg)
力制御ドラッグ感覚パラメータを設定
errno_t set_tool_drive_config(const JKHD *handle, ToolDriveConfig cfg)
ツールドラッグ座標系を取得
errno_t get_tool_drive_frame(const JKHD *handle, FTFrameType *ftFrame)
ツールドラッグ座標系を設定
errno_t set_tool_drive_frame(const JKHD *handle, FTFrameType ftFrame)
融合ドライブ感度を取得
errno_t get_fusion_drive_sensitivity_level(const JKHD *handle, int *level)
融合ドライブ感度を設定
errno_t set_fusion_drive_sensitivity_level(const JKHD *handle, int level)
获取运动限制(奇异点和关节限位)预警范围
errno_t get_motion_limit_warning_range(const JKHD *handle, int *warning_range)
设置运动限制(奇异点和关节限位)预警范围
errno_t set_motion_limit_warning_range(const JKHD *handle, int warning_range)
力制御
恒力コンプライアンス制御座標系を設定
errno_t set_ft_ctrl_frame(const JKHD *handle, FTFrameType ftFrame)
恒力コンプライアンス制御座標系を取得
errno_t get_ft_ctrl_frame(const JKHD *handle, FTFrameType *ftFrame)
恒力制御許容値を設定
errno_t set_ft_tolerance(const JKHD *handle, double force, double torque)
恒力制御許容値を取得
errno_t get_ft_tolerance(const JKHD *handle, double* force, double* torque)
定常力コンプライアンス制御の有効/無効を設定
errno_t set_ft_ctrl_mode(const JKHD *handle, BOOL mode)
定力コンプライアンスの有効状態を取得
errno_t get_ft_ctrl_mode(const JKHD *handle, BOOL* mode)
定常力コンプライアンス制御パラメータを設定
errno_t set_ft_ctrl_config(const JKHD *handle, AdmitCtrlType cfg)
定常力コンプライアンス制御パラメータを取得
errno_t get_ft_ctrl_config(const JKHD *handle, RobotAdmitCtrl* cfg)
力制御タイプとゼロ校正(初期化)オプションを設定する
errno_t set_compliant_type(const JKHD *handle, int sensor_compensation, int compliance_type)
力制御タイプと読み取り表示(初期化)状態を取得する
errno_t get_compliant_type(const JKHD *handle, int *sensor_compensation, int *compliance_type)
速度コンプライアンス制御の力条件を設定する
errno_t set_compliance_condition(const JKHD *handle, const FTxyz *ft)
接近速度制限を設定
errno_t set_approach_speed_limit(const JKHD *handle, double vel, double angularVel)
接近速度制限を取得
errno_t get_approach_speed_limit(const JKHD *handle, double* vel, double* angularVel)
衝突
ロボットアームが衝突保護モードにあるかどうかを確認
errno_t is_in_collision(const JKHD *handle, BOOL *in_collision)
ロボットアームの衝突レベルを設定
errno_t set_collision_level(const JKHD *handle, const int level)
ロボットに設定された衝突レベルを取得
errno_t get_collision_level(const JKHD *handle, int *level)
碰撞之后从碰撞保护模式恢复
errno_t collision_recover(const JKHD *handle)
運動学
机械臂求解逆解
errno_t kine_inverse(const JKHD *handle, const JointValue *ref_pos, const CartesianPose *cartesian_pose, JointValue *joint_pos)
//扩展可选参数,可在所选用户坐标系和工具坐标系下逆解
errno_t kine_inverse_extend(const JKHD *handle, const JointValue *ref_pos, const CartesianPose *cartesian_pose, JointValue *joint_pos, const CartesianPose *tool, const CartesianPose *userFrame)
机械臂求解正解
errno_t kine_forward(const JKHD *handle, const JointValue *joint_pos, CartesianPose *cartesian_pose)
//扩展可选参数,可在所选用户坐标系和工具坐标系下正解
errno_t kine_forward_extend(const JKHD *handle, const JointValue *joint_pos, CartesianPose *cartesian_pose, const CartesianPose *tool, const CartesianPose *userFrame)
欧拉角到旋转矩阵的转换
errno_t rpy_to_rot_matrix(const JKHD *handle, const Rpy *rpy, RotMatrix *rot_matrix)
旋转矩阵到欧拉角的转换
errno_t rot_matrix_to_rpy(const JKHD *handle, const RotMatrix *rot_matrix, Rpy *rpy)
旋转矩阵到四元数的转换
errno_t rot_matrix_to_quaternion(const JKHD *handle, const RotMatrix *rot_matrix, Quaternion *quaternion)
四元数到旋转矩阵的转换
errno_t quaternion_to_rot_matrix(const JKHD *handle, const Quaternion *quaternion, RotMatrix *rot_matrix)
接口调用返回值列表及问题排查
| 错误代码 | 説明 | 处理建议 |
|---|---|---|
| 0 | success | null |
| 2 | interface error or controller not support | 核对控制器和SDK版本信息,进行升级或换用其他接口 |
| -1 | invalid handler | 请检查调用接口前是否login |
| -2 | invalid parameter | 请检查参数是否正确 |
| -3 | fail to connect | 请检查网络连接状态,或机器人IP是否正确 |
| -4 | kine_inverse error | 逆解失败,请检查当前的坐标系,或参考关节角是否合理 |
| -5 | e-stop | 急停状态,保留状态 |
| -6 | not power on | 未上电 |
| -7 | not enable | 未使能 |
| -8 | not in servo mode | 不处于伺服模式,在执行servoJP 的时候,必须先进入伺服模式,请检查是否调用对应接口 |
| -9 | must turn off enable before power off | 下电前必须下使能 |
| -10 | cannot operate, program is running | 无法操作,程序正在执行中,请先关闭程序 |
| -11 | cannot open file, or file doesn't exist | 无法打开文件,或者文件不存在 |
| -12 | motion abnormal | 运动异常,可能处于奇异点附近,或者超出机器人运动限制 |
| -14 | ftp error | ftp异常 |
| -15 | socket msg or value oversize | 超出限制异常 |
| -16 | kine_forward error | 正解失败 |
| -17 | not support empty folder | 不支持空文件夹 |
| -20 | protective stop | 保護停止 |
| -21 | emergency stop | 緊急停止 |
| -22 | on soft limit | 处于软限位,此时无法手动拖动机器人,需要用APP上的示教功能接触软限位 |
| -30 | fail to encode cmd string | 命令编码失败,一般是解析控制器返回的消息时出错 |
| -31 | fail to decode cmd string | 命令解码失败,一般是解析控制器返回的消息时出错 |
| -32 | fail to uncompress port 10004 string | 解压缩10004端口数据失败,可能受网络波动影响,或数据量太大的原因 |
| -40 | move linear error | 直线运动失败,请检查是否路径中是否有奇异区域 |
| -41 | move joint error | 关节运动失败,请检查设置的关节角度 |
| -42 | move circular error | 圆弧运动失败,请检查设置的参数 |
| -50 | block_wait timeout | 阻塞等待超时 |
| -51 | power on timeout | 上电超时 |
| -52 | power off timeout | 下电超时 |
| -53 | enable timeoff | 使能超时 |
| -54 | disable timeout | 下使能超时 |
| -55 | set userframe timeout | 设置用户坐标系超时 |
| -56 | set tool timeout | 设置工具坐标系超时 |
| -57 | edg init failed | edg功能初始化失败 |
| -58 | edg is running, cannot use servo_j or servo_p | edg功能正在执行中,无法使用servo_j或者servo_p接口 |
| -59 | current edg mode does not support using edg_servo_j or edg_servo_p. | edg功能正在执行中,无法使用edg_servo_j或者edg_servo_p接口 |
| -60 | set io timeout | 设置IO超时 |
| -61 | operation timeout | 接口超时 |
| -62 | servo queue is full | 伺服队列已满 |
| -63 | servo is not running | 伺服模式未启动 |
| -9997 | not implement | 接口未实现 |
| -9998 | deprecated interface | 接口未来将被移除(功能暂可用) |
| -9999 | obsolete interface | 接口未来将被移除(功能不可用) |
问题反馈
文档中若出现不准确的描述或者错误,恳请读者见谅指正。如果您在阅读过程中发现任何问题或者有想提出的意见,可以发送邮件到 support@jaka.com ,我们将尽快给您回复。
