C言語
約23分
C言語
本ドキュメントでは、JAKA SDK(C)で定義されているデータ型およびAPIについて説明します。これは、C/C++を使用して仮想または実際のコントローラと通信するロボットアプリケーションを作成するソフトウェア開発者を主な対象としています。JAKAロボットコントローラのアプリケーションを理解する必要があるユーザーにも有用です。
インターフェース一覧
ロボット基礎操作
ロボットアームログイン
errno_t create_handler(const char *ip, JKHD *handle, BOOL use_grpc, const char *username, const char *password)
ロボットアームログアウト
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(const JKHD *handle, 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 set_auto_manual_mode(const JKHD *handle, int mode, int robot_id);
現在のロボットアームの動作モードを取得
errno_t get_auto_manual_mode(const JKHD *handle, int *mode, int robot_id);
現在の設定下でのツールエンドの姿勢——サーボフィードバックを取得する
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 get_ft_sensor_basic_info(const JKHD *handle, FTSensorBasicInfoStr *infos, int robot_id)
センサーのソフトリミットルールを取得
errno_t get_ft_sensor_soft_limit_rules(const JKHD *handle, FTSensorSoftLimitRuleStr *rules, int robot_id)
センサーのソフトリミットルールを設定
errno_t set_ft_sensor_soft_limit_rules(const JKHD *handle, const FTSensorSoftLimitRuleStr *rules, int robot_id)
センサーのフィルターパラメーターを設定
errno_t set_ft_sensor_filter(const JKHD *handle, int sensor_id, const double *filter)
センサーのフィルターパラメーターを取得
errno_t get_ft_sensor_filter(const JKHD *handle, int sensor_id, double *filter)
センサーモードを取得
errno_t get_ft_sensor_mode(const JKHD *handle, int sensor_id, int *mode)
力覚センサのゼロ点調整
errno_t set_ft_sensor_zero(const JKHD *handle, int sensor_id)
センサーのしきい値を設定
errno_t set_contact_force_threshold(const JKHD *handle, int sensor_id, const FTSensorThresholdStr *threshold)
センサーのしきい値を取得
errno_t get_contact_force_threshold(const JKHD *handle, int sensor_id, FTSensorThresholdStr *threshold)
センサーの基準点を設定
errno_t set_ft_sensor_ref_point(const JKHD *handle, const CartesianTran *ref_point, int robot_id)
センサーの参照点を取得
errno_t get_ft_sensor_ref_point(const JKHD *handle, CartesianTran *ref_point, int robot_id)
センサー データを取得する
errno_t get_ft_sensor_data(const JKHD *handle, int sensor_id, int type, FTSensorDataStr *data)
センサーのペイロードを取得
errno_t get_ft_sensor_payload(const JKHD *handle, int sensor_id, PayLoad *payload)
センサーのペイロードを設定
errno_t set_ft_sensor_payload(const JKHD *handle, int sensor_id, int payload_id)
現在ロボットアームに接続されているセンサーIDを取得
errno_t get_linked_ft_sensor_id(const JKHD *handle, FTLinkedSensorIDStr *sensor_ids, int robot_id)
センサーを追加
errno_t add_ft_sensor(const JKHD *handle, const FTSensorConfigStr *config, int robot_id)
センサーを削除
errno_t remove_ft_sensor(const JKHD *handle, int sensor_id, int robot_id)
力制御モードでの速度制限を設定
errno_t set_force_ctrl_vel_limit(const JKHD *handle, const VelocityLimit *limit, int robot_id)
力制御モードでの速度制限を取得
errno_t get_force_ctrl_vel_limit(const JKHD *handle, VelocityLimit *limit, int robot_id)
接近速度制限を設定
errno_t set_approaching_vel_limit(const JKHD *handle, const VelocityLimit *limit, int robot_id)
接近速度制限を取得
errno_t get_approaching_vel_limit(const JKHD *handle, VelocityLimit *limit, int robot_id)
定力コンプライアンス制御モードのパラメータを設定
errno_t set_cst_force_ctrl_config(const JKHD *handle, const AdmitCtrlType *config, int robot_id)
定力コンプライアンス制御モードのパラメータを取得
errno_t get_cst_force_ctrl_config(const JKHD *handle, AdmitCtrlType *config, int robot_id)
定力コンプライアンス制御の許容誤差を設定
errno_t set_cst_force_ctrl_tol(const JKHD *handle, const FTxyz *tol, int robot_id)
定力柔軟制御の許容差を取得
errno_t get_cst_force_ctrl_tol(const JKHD *handle, FTxyz *tol, int robot_id)
力制御の停止条件を設定する
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 | 成功 | null |
| 2 | インターフェースエラーまたはコントローラーが未対応 | コントローラーとSDKのバージョン情報を確認し、アップグレードまたは他のインターフェースを使用してください |
| -1 | 無効なハンドラー | インターフェース呼び出し前にログインしているか確認してください |
| -2 | 無効なパラメータ | パラメータが正しいか確認してください |
| -3 | 接続に失敗しました | ネットワーク接続状態、またはロボットのIPが正しいか確認してください |
| -4 | 逆運動学エラー | 逆解に失敗しました。現在の座標系または参照関節角が妥当か確認してください |
| -5 | 非常停止 | 非常停止状態、保持中 |
| -6 | 電源未投入 | 電源が入っていません |
| -7 | 未イネーブル | イネーブルされていません |
| -8 | サーボモードではありません | サーボモードではありません。servoJPを実行する際には、まずサーボモードに入る必要があります。対応するインターフェースが呼び出されているか確認してください |
| -9 | 電源を切る前にイネーブルを解除する必要があります | 電源を切る前にイネーブルをオフにする必要があります |
| -10 | 操作できません。プログラムが実行中です | 操作できません。プログラムが実行中です。先にプログラムを停止してください |
| -11 | ファイルを開けません、またはファイルが存在しません | ファイルが開けないか、存在しません |
| -12 | 動作異常 | 動作異常です。特異点付近にあるか、ロボットの動作制限を超えている可能性があります |
| -14 | FTPエラー | FTP異常 |
| -15 | ソケットメッセージまたは値が上限を超えています | 制限超過異常 |
| -16 | 正運動学エラー | 正解に失敗しました |
| -17 | 空のフォルダーはサポートされていません | 空のフォルダーはサポートされていません |
| -20 | 保護停止 | 保護停止 |
| -21 | 緊急停止 | 緊急停止 |
| -22 | ソフトリミット上 | ソフトリミットに達しており、現在はロボットを手動でドラッグできません。APP上のティーチング機能を使用してソフトリミットに接触してください。 |
| -30 | コマンド文字列のエンコードに失敗 | コマンドのエンコードに失敗しました。通常はコントローラーから返されたメッセージを解析する際にエラーが発生します。 |
| -31 | コマンド文字列のデコードに失敗 | コマンドのデコードに失敗しました。通常はコントローラーから返されたメッセージを解析する際にエラーが発生します。 |
| -32 | ポート10004文字列の解凍に失敗 | ポート10004のデータの解凍に失敗しました。ネットワークの変動の影響、またはデータ量が多すぎることが原因の可能性があります。 |
| -40 | 直線移動エラー | 直線移動に失敗しました。経路内に特異点領域があるか確認してください。 |
| -41 | 関節移動エラー | 関節移動に失敗しました。設定した関節角度を確認してください。 |
| -42 | 円弧移動エラー | 円弧移動に失敗しました。設定したパラメータを確認してください。 |
| -50 | block_wait タイムアウト | ブロック待機がタイムアウトしました |
| -51 | 電源オンのタイムアウト | 電源投入のタイムアウト |
| -52 | 電源オフのタイムアウト | 電源遮断のタイムアウト |
| -53 | タイムオフを有効化 | 有効化タイムアウト |
| -54 | 無効化タイムアウト | 無効化タイムアウト |
| -55 | ユーザーフレームのタイムアウトを設定 | ユーザー座標系のタイムアウトを設定 |
| -56 | ツールのタイムアウトを設定 | ツール座標系のタイムアウトを設定 |
| -57 | EDG初期化に失敗しました | EDG機能の初期化に失敗しました |
| -58 | EDGが実行中のため、servo_jまたはservo_pを使用できません | EDG機能が実行中のため、servo_jまたはservo_pインターフェースを使用できません |
| -59 | 現在のEDGモードでは、edg_servo_jまたはedg_servo_pの使用はサポートされていません。 | EDG機能が実行中のため、edg_servo_jまたはedg_servo_pインターフェースを使用できません |
| -60 | IOタイムアウトを設定 | IOタイムアウトを設定 |
| -61 | 操作タイムアウト | インターフェースタイムアウト |
| -62 | サーボキューがいっぱいです | サーボキューが満杯です |
| -63 | サーボが動作していません | サーボモードが起動していません |
| -9997 | 未実装 | インターフェースが実装されていません |
| -9998 | 非推奨のインターフェース | このインターフェースは将来的に削除される予定です(現在は利用可能) |
| -9999 | 廃止されたインターフェース | このインターフェースは将来的に削除される予定です(機能は利用できません) |
問題のフィードバック
ドキュメントに不正確な記述や誤りがあった場合は、読者の皆様のご理解とご指摘をお願いいたします。読書中に問題を発見したりご意見がありましたら、support@jaka.com までメールをお送りください。できるだけ早く返信いたします。
