Skip to main content

C

JAKAAbout 20 min

C

This document will introduce the data types and APIs defined in the JAKA SDK (C), mainly intended for software developers creating robot applications in C/C++ that communicate with virtual or real controllers. It will also be helpful for users who need to understand JAKA robot controller applications.

Interface List

Basic Robot Operations

Robot Arm Login

errno_t create_handler(const char *ip, JKHD *handle, BOOL use_grpc, const char *username, const char *password)

Robot Arm Logout

errno_t destory_handler(const JKHD *handle)

Power On Robot Arm

errno_t power_on(const JKHD *handle)

Power Off Robot Arm

errno_t power_off(const JKHD *handle)

Shut Down Robot Arm

errno_t shut_down(const JKHD *handle)

Enable Robot Arm

errno_t enable_robot(const JKHD *handle)

Disable Robot Arm

errno_t disable_robot(const JKHD *handle)

Get DH parameters of the currently connected robot arm

errno_t get_dh_param(const JKHD *handle, DHParam *dhParam)

Set Robot Arm Installation Angle

errno_t set_installation_angle(const JKHD* handle, double angleX, double angleZ)

Get Robot Arm Installation Angle

errno_t get_installation_angle(const JKHD* handle, Quaternion* quat, Rpy* appang)

Get Robot Arm Status

errno_t get_robot_state(const JKHD *handle, RobotState *state)

Get Robot Arm Status Monitoring Data - Only Thread-Safe Interface

errno_t get_robot_status(const JKHD *handle, RobotStatus *status)

Get Robot Arm Status Monitoring Data

errno_t get_robot_status_simple(const JKHD *handle, RobotStatus_simple *status)

SDK

Register callback function for robot arm errors

errno_t set_error_handler(const JKHD *handle, CallBackFuncType func)

Get SDK Version Number

errno_t get_sdk_version(const JKHD *handle, char *version)

Set robot arm motion type to automatically stop during network exceptions

errno_t set_network_exception_handle(const JKHD *handle, float millisecond, ProcessType mnt)

Get Controller IP

errno_t get_controller_ip(const JKHD *handle, char *controller_name, char *ip_list)

Set file storage path for robot arm error codes

errno_t set_errorcode_file_path(const JKHD *handle, char *path)

Set file storage path for robot arm error codes and get the most recent robot arm error code

errno_t get_last_error(const JKHD *handle, ErrorCode *code)

Error status clear

errno_t clear_error(const JKHD *handle)

Set whether the SDK enables debug mode

errno_t set_debug_mode(const JKHD *handle, BOOL mode)

Set SDK log path

errno_t set_SDK_filepath(const JKHD *handle, char *filepath)

Get SDK log path

errno_t get_SDK_filepath(const JKHD *handle, char *filepath, int size)

Robot Moving Output

Robot arm movement in manual mode

errno_t jog(const JKHD *handle, int aj_num, MoveMode move_mode, CoordType coord_type, double vel_cmd, double pos_cmd)

Robot arm stop movement in manual mode

errno_t jog_stop(const JKHD *handle, int num)

Robot arm joint movement

// The following interfaces provide the same functionality but differ in optional extended parameters. Select as needed based on actual requirements.
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)

Robot arm linear movement at end effector

// The following interfaces provide the same functionality but differ in optional extended parameters. Select as needed based on actual requirements.
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)

Robot arm arc movement

// The following interfaces provide the same functionality but differ in optional extended parameters. Select as needed based on actual requirements.
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)

Robot arm arc movement

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)

Set robot arm speed multiplier

errno_t set_rapidrate(const JKHD *handle, double rapid_rate)

Get robot arm speed multiplier

errno_t get_rapidrate(const JKHD *handle, double *rapid_rate)

Set tool information

errno_t set_tool_data(const JKHD *handle, int id, const CartesianPose *tcp, const char *name)

Get tool information

errno_t get_tool_data(const JKHD *handle, int id, CartesianPose *tcp)

Set the tool ID currently in use

errno_t set_tool_id(const JKHD *handle, const int id)

Query the tool ID currently in use

errno_t get_tool_id(const JKHD *handle, int *id)

Set user coordinate system information

errno_t set_user_frame_data(const JKHD *handle, int id, const CartesianPose *user_frame, const char *name)

Get user coordinate system information

errno_t get_user_frame_data(const JKHD *handle, int id, CartesianPose *user_frame)

Set the user coordinate system ID currently in use

errno_t set_user_frame_id(const JKHD *handle, const int id)

Query the user coordinate system ID currently in use

errno_t get_user_frame_id(const JKHD *handle, int *id)

Control robot arm to enter or exit drag mode

errno_t drag_mode_enable(const JKHD *handle, BOOL enable)

Query whether the robot arm is in drag mode

errno_t is_in_drag_mode(const JKHD *handle, BOOL *in_drag)

Get joint friction compensation coefficient

errno_t get_drag_friction_compensation_gain(const JKHD* handle, DragFrictionCompensationGainList* list)

Get current robot arm joint angles — servo feedback

errno_t get_actual_joint_position(const JKHD *handle, JointValue *joint_position)

Get joint angles under current settings

errno_t get_joint_position(const JKHD *handle, JointValue *joint_position)

Set manual or automatic mode

errno_t set_auto_manual_mode(const JKHD *handle, int mode, int robot_id);

Get the current robot arm operation mode

errno_t get_auto_manual_mode(const JKHD *handle, int *mode, int robot_id);

Get the pose of the tool endpoint under the current settings — servo feedback

errno_t get_actual_tcp_position(const JKHD *handle, CartesianPose *tcp_position)

Get the pose of the tool endpoint under the current settings

errno_t get_tcp_position(const JKHD *handle, CartesianPose *tcp_position)

Check if the robot arm exceeds the limit

errno_t is_on_limit(const JKHD *handle, BOOL *on_limit)

Check if the robot arm movement has stopped

errno_t is_in_pos(const JKHD *handle, BOOL *in_pos)

Check if the robot arm is in an emergency stop state

errno_t is_in_estop(const JKHD *handle, BOOL *in_estop)

Set the robot arm motion planner type

errno_t set_motion_planner(const JKHD* handle, MotionPlannerType type)

Terminate robot arm movement

errno_t motion_abort(const JKHD *handle)

Check the robot arm motion status

errno_t get_motion_status(const JKHD* handle, MotionStatus *status)

Set the robot arm load

errno_t set_payload(const JKHD *handle, const PayLoad *payload)

Get robot arm load data

errno_t get_payload(const JKHD *handle, PayLoad *payload)

IO

Set digital output variable

errno_t set_digital_output(const JKHD *handle, IOType type, int index, BOOL value)

Set analog output variable

errno_t set_analog_output(const JKHD *handle, IOType type, int index, float value)

Set digital output variable during movement

errno_t set_motion_digital_output(const JKHD *handle, IOType type, int index, BOOL value, BOOL rel, double distance)

Set analog output variable during movement

errno_t set_motion_analog_output(const JKHD *handle, IOType type, int index, float value, BOOL rel, double distance)

Check digital input status

errno_t get_digital_input(const JKHD *handle, IOType type, int index, BOOL *result)

Check digital output status

errno_t get_digital_output(const JKHD *handle, IOType type, int index, BOOL *result)

Get the value of the analog input variable

errno_t get_analog_input(const JKHD *handle, IOType type, int index, float *result)

Get the value of the analog output variable

errno_t get_analog_output(const JKHD *handle, IOType type, int index, float *result)

Check if the extended IO is running

errno_t is_extio_running(const JKHD *handle, BOOL *is_running)

TIO

Set the tiov3 voltage parameters

errno_t set_tio_vout_param(const JKHD* handle, int vout_enable, int vout_vol)

Get the tiov3 voltage parameters

errno_t get_tio_vout_param(const JKHD* handle, int* vout_enable, int* vout_vol)

Add or modify TIO semaphore

errno_t add_tio_rs_signal(const JKHD* handle, SignInfo sign_info)

TIO delete semaphore

errno_t del_tio_rs_signal(const JKHD* handle, const char* sig_name)

TIO RS485 send command

errno_t send_tio_rs_command(const JKHD* handle, int chn_id, uint8_t* cmdbuf, int bufsize)

TIO refresh semaphore information

errno_t update_tio_rs_signal(const JKHD* handle, SignInfo_simple sign_info);  

TIO get semaphore information

errno_t get_rs485_signal_info(const JKHD* handle, SignInfo* sign_info_array, int *array_len)

Set TIO mode

errno_t set_tio_pin_mode(const JKHD* handle, int pin_type, int pin_mode)

Get TIO mode

errno_t get_tio_pin_mode(const JKHD* handle, int pin_type, int* pin_mode)

TIO RS485 communication parameter configuration

errno_t set_rs485_chn_comm(const JKHD* handle, ModRtuComm mod_rtu_com)

TIO RS485 communication parameter query

errno_t get_rs485_chn_comm(const JKHD* handle, int chn_id, ModRtuComm* mod_rtu_com)

TIO RS485 communication mode configuration

errno_t set_rs485_chn_mode(const JKHD* handle, int chn_id, int chn_mode)

TIO RS485 communication mode query

errno_t get_rs485_chn_mode(const JKHD* handle, int chn_id, int* chn_mode)

Servo

Query whether the robot arm is in servo motion state

errno_t is_in_servomove(const JKHD *handle, BOOL *in_servo)

Enable robot arm servo position control mode

// The following interfaces provide the same functionality but differ in optional extended parameters. Select as needed based on actual requirements.
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)

Robot arm joint space servo mode motion

// The following interfaces provide the same functionality but differ in optional extended parameters. Select as needed based on actual requirements.
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)

Robot arm Cartesian space servo mode motion extension

// The following interfaces provide the same functionality but differ in optional extended parameters. Select as needed based on actual requirements.
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)

Disable filter in robot arm servo mode

errno_t servo_move_use_none_filter(const JKHD *handle)

First-order low-pass filtering in robot arm joint space servo mode

errno_t servo_move_use_joint_LPF(const JKHD *handle, double cutoffFreq)

Nonlinear filtering in robot arm joint space servo mode

errno_t servo_move_use_joint_NLF(const JKHD *handle, double max_vr, double max_ar, double max_jr)

Nonlinear filtering in robot arm Cartesian space servo mode

// The following interfaces provide the same functionality but differ in optional extended parameters. Select as needed based on actual requirements.
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)

Multi-stage mean filtering in robot arm joint space servo mode

errno_t servo_move_use_joint_MMF(const JKHD *handle, int max_buf, double kp, double kv, double ka)

Set velocity feedforward parameters in robot arm servo mode

// The following interfaces provide the same functionality but differ in optional extended parameters. Select as needed based on actual requirements.
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)

Filter joint space in robot arm SERVO mode

errno_t servo_move_use_joint_PCM(const JKHD *handle, int max_buf, double kp, int robot_id)

Filter Cartesian space in robot arm SERVO mode

errno_t servo_move_use_carte_PCM(const JKHD *handle, int max_buf, double kp, int robot_id)

Execute servo trajectory file in robot arm SERVO mode

errno_t start_servo_traj(const JKHD *handle, const char* filename)

Get servo trajectory execution status

errno_t get_traj_status(const JKHD *handle, int* is_running, int* whole_points, int* progress)

Stop running servo trajectory file

errno_t stop_servo_traj(const JKHD *handle)

EDG

Robot arm EDG enable

// The following interfaces provide the same functionality but differ in optional extended parameters. Select as needed based on actual requirements.
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)

Robot arm high-speed acquisition of EDG feedback data

errno_t edg_get_stat(const JKHD *handle, EDGState *edg_state, unsigned char robot_index)

Robot arm acquisition of EDG feedback data issuance timestamp

errno_t edg_stat_details(const JKHD *handle, unsigned long int details[3]);

Robot arm EDG joint space servo mode motion

// The following interfaces provide the same functionality but differ in optional extended parameters. Select as needed based on actual requirements.
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)

Robot arm EDG Cartesian space servo mode motion

// The following interfaces provide the same functionality but differ in optional extended parameters. Select as needed based on actual requirements.
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)

Trajectory

Set trajectory reproduction configuration parameters

errno_t set_traj_config(const JKHD *handle, const TrajTrackPara *para)

Collect trajectory reproduction data control switch

errno_t set_traj_sample_mode(const JKHD *handle, const BOOL mode, char *filename)

Get trajectory reproduction configuration parameters

errno_t get_traj_config(const JKHD *handle, TrajTrackPara *para)

Query status of collected trajectory reproduction data

errno_t get_traj_sample_status(const JKHD *handle, BOOL *sample_status)

Query file names of already existing trajectory reproduction data in the controller

errno_t get_exist_traj_file_name(const JKHD *handle, MultStrStorType *filename)

Rename file names of trajectory reproduction data

errno_t rename_traj_file_name(const JKHD *handle, const char *src, const char *dest)

Delete trajectory reproduction data files in the controller

errno_t remove_traj_file(const JKHD *handle, const char *filename)

Generate controller execution script from trajectory reproduction data files in the controller

errno_t generate_traj_exe_file(const JKHD *handle, const char *filename)

Program

Run the currently loaded job program

errno_t program_run(const JKHD *handle)

Pause the currently running job program

errno_t program_pause(const JKHD *handle)

Continue running the currently paused job program

errno_t program_resume(const JKHD *handle)

Terminate the currently executing job program

errno_t program_abort(const JKHD *handle)

Load the specified job program

errno_t program_load(const JKHD *handle, const char *file)

Get execution status of robot arm job program

errno_t get_program_state(const JKHD *handle, ProgramState *status)

Get information of robot arm job program

errno_t get_program_info(const JKHD *handle, ProgramInfo* info)

Get the name of the loaded job program

errno_t get_loaded_program(const JKHD *handle, char *file)

Get the execution line number of the current robot arm operation program

errno_t get_current_line(const JKHD *handle, int *curr_line)

Get system variable

errno_t get_user_var(const JKHD *handle, UserVariableList* vlist)

Set system variable

errno_t set_user_var(const JKHD *handle, UserVariable v)

FTP

Initialize FTP client

errno_t init_ftp_client(const JKHD *handle)

Close FTP client

errno_t close_ftp_client(const JKHD *handle)

FTP download

errno_t download_file(const JKHD *handle, char *local, char *remote, int opt)

FTP upload

errno_t upload_file(const JKHD *handle, char *local, char *remote, int opt)

FTP delete

errno_t del_ftp_file(const JKHD *handle, char *remote, int opt)

FTP rename

errno_t rename_ftp_file(const JKHD *handle, char *remote, char *des, int opt)

FTP directory query

errno_t get_ftp_dir(const JKHD *handle, const char *remotedir, int type, char *ret)

Set end force sensor model

errno_t set_torsenosr_brand(const JKHD *handle, int sensor_brand)

Get end force sensor model

errno_t get_torsenosr_brand(const JKHD *handle, int *sensor_brand)

Enable or disable end force sensor

errno_t set_torque_sensor_mode(const JKHD *handle, int sensor_mode)

Set end force sensor communication parameters

errno_t set_torque_sensor_comm(const JKHD *handle, const int type, const char *ip_addr, const int port)

Get end force sensor communication parameters

errno_t get_torque_sensor_comm(const JKHD *handle, int *type, char *ip_addr, int *port)

Constant Force Compliant Control

errno_t disable_force_control(const JKHD *handle);

Set end force sensor low-pass filter cutoff frequency

errno_t set_torque_sensor_filter(const JKHD *handle, const float torque_sensor_filter)

Get end force sensor low-pass filter cutoff frequency

errno_t get_torque_sensor_filter(const JKHD *handle, float *torque_sensor_filter)

Set end force sensor soft limit

errno_t set_torque_sensor_soft_limit(const JKHD *handle, const FTxyz torque_sensor_soft_limit)

Get end force sensor soft limit

errno_t get_torque_sensor_soft_limit(const JKHD *handle, FTxyz *torque_sensor_soft_limit)

Get sensor operating status

errno_t get_torque_sensor_mode(const JKHD *handle, int* sensor_mode)

Get sensor status and data

errno_t get_torque_sensor_data(const JKHD *handle, int type, TorqSensorData* data)

Zero Sensor

errno_t zero_end_sensor(const JKHD *handle)

Set force control speed limit

errno_t set_compliant_speed_limit(const JKHD *handle, double speed_limit, double angular_speed_limit)

Get force control speed limit

errno_t get_compliant_speed_limit(const JKHD *handle, double* speed_limit, double* angular_speed_limitangularVel)

Set force control type and zero calibration (initialization) options

errno_t set_compliant_type(const JKHD *handle, int sensor_compensation, int compliance_type)

Get force control type and reading display (initialization) status

errno_t get_compliant_type(const JKHD *handle, int *sensor_compensation, int *compliance_type)

Set speed compliance control parameters

errno_t set_vel_compliant_ctrl(const JKHD *handle, const VelCom *vel)

Set torque reference center

errno_t set_torque_ref_point(const JKHD *handle, int ref_point)

Get torque reference center

errno_t get_torque_ref_point(const JKHD *handle, int *ref_point)

Set sensor sensitivity

errno_t set_end_sensor_sensitivity_threshold(const JKHD *handle, FTxyz threshold)

Get sensor sensitivity

errno_t get_end_sensor_sensitivity_threshold(const JKHD *handle, FTxyz *threshold)

Get basic sensor information

errno_t get_ft_sensor_basic_info(const JKHD *handle, FTSensorBasicInfoStr *infos, int robot_id)

Get sensor soft limit rules

errno_t get_ft_sensor_soft_limit_rules(const JKHD *handle, FTSensorSoftLimitRuleStr *rules, int robot_id)

Set sensor soft limit rules

errno_t set_ft_sensor_soft_limit_rules(const JKHD *handle, const FTSensorSoftLimitRuleStr *rules, int robot_id)

Set sensor filter parameters

errno_t set_ft_sensor_filter(const JKHD *handle, int sensor_id, const double *filter)

Get sensor filter parameters

errno_t get_ft_sensor_filter(const JKHD *handle, int sensor_id, double *filter)

Get sensor mode

errno_t get_ft_sensor_mode(const JKHD *handle, int sensor_id, int *mode)

To zero the sensor

errno_t set_ft_sensor_zero(const JKHD *handle, int sensor_id)

Set sensor threshold

errno_t set_contact_force_threshold(const JKHD *handle, int sensor_id, const FTSensorT·hresholdStr *threshold)

Get sensor threshold

errno_t get_contact_force_threshold(const JKHD *handle, int sensor_id, FTSensorThresholdStr *threshold)

Set sensor reference point

errno_t set_ft_sensor_ref_point(const JKHD *handle, const CartesianTran *ref_point, int robot_id)

Get sensor reference point

errno_t get_ft_sensor_ref_point(const JKHD *handle, CartesianTran *ref_point, int robot_id)

Get sensor data

errno_t get_ft_sensor_data(const JKHD *handle, int sensor_id, int type, FTSensorDataStr *data)

Get sensor load

errno_t get_ft_sensor_payload(const JKHD *handle, int sensor_id, PayLoad *payload)

Set sensor load

errno_t set_ft_sensor_payload(const JKHD *handle, int sensor_id, int payload_id)

Get ID of the sensor currently connected to the robot arm

errno_t get_linked_ft_sensor_id(const JKHD *handle, FTLinkedSensorIDStr *sensor_ids, int robot_id)

Add sensor

errno_t add_ft_sensor(const JKHD *handle, const FTSensorConfigStr *config, int robot_id)

Delete sensor

errno_t remove_ft_sensor(const JKHD *handle, int sensor_id, int robot_id)

Set speed limit in force control mode

errno_t set_force_ctrl_vel_limit(const JKHD *handle, const VelocityLimit *limit, int robot_id)

Get speed limit in force control mode

errno_t get_force_ctrl_vel_limit(const JKHD *handle, VelocityLimit *limit, int robot_id)

Set approach speed limit

errno_t set_approaching_vel_limit(const JKHD *handle, const VelocityLimit *limit, int robot_id)

Get approach speed limit

errno_t get_approaching_vel_limit(const JKHD *handle, VelocityLimit *limit, int robot_id)

Set constant-force compliance control mode parameters

errno_t set_cst_force_ctrl_config(const JKHD *handle, const AdmitCtrlType *config, int robot_id)

Get constant-force compliance control mode parameters

errno_t get_cst_force_ctrl_config(const JKHD *handle, AdmitCtrlType *config, int robot_id)

Set constant-force compliance control tolerance

errno_t set_cst_force_ctrl_tol(const JKHD *handle, const FTxyz *tol, int robot_id)

Get constant-force compliance control tolerance

errno_t get_cst_force_ctrl_tol(const JKHD *handle, FTxyz *tol, int robot_id)

Set force control termination condition

errno_t set_force_stop_condition(const JKHD *handle, ForceStopConditionList condition)

Start identifying sensor end load

errno_t start_torq_sensor_payload_identify(const JKHD *handle, const JointValue *joint_pos)

Get sensor end load identification status

errno_t get_torq_sensor_identify_staus(const JKHD *handle, int *identify_status)

Get sensor end load identification result

errno_t get_torq_sensor_payload_identify_result(const JKHD *handle, PayLoad *payload)

Set sensor end load

errno_t set_torq_sensor_tool_payload(const JKHD *handle, const PayLoad *payload)

Get sensor end load

errno_t get_torq_sensor_tool_payload(const JKHD *handle, PayLoad *payload)

Tool Drag

Get force compliance control parameters

errno_t get_admit_ctrl_config(const JKHD *handle, RobotAdmitCtrl *admit_ctrl_cfg)

Force control admittance enable

errno_t enable_admittance_ctrl(const JKHD *handle, const int enable_flag)

Enable tool dragging

errno_t enable_tool_drive(const JKHD *handle, const int enable_flag)

Get tool dragging enable status

errno_t get_tool_drive_state(const JKHD *handle, int* enable, int *state)

Get tool dragging parameters

errno_t get_tool_drive_config(const JKHD *handle, RobotToolDriveCtrl* cfg)

Set force control drag feel parameters

errno_t set_tool_drive_config(const JKHD *handle, ToolDriveConfig cfg)

Get tool drag coordinate system

errno_t get_tool_drive_frame(const JKHD *handle, FTFrameType *ftFrame)

Set tool drag coordinate system

errno_t set_tool_drive_frame(const JKHD *handle, FTFrameType ftFrame)

Get fusion drag sensitivity

errno_t get_fusion_drive_sensitivity_level(const JKHD *handle, int *level)

Set fusion drag sensitivity

errno_t set_fusion_drive_sensitivity_level(const JKHD *handle, int level)

Get motion limit (singularity and joint limit) warning range

errno_t get_motion_limit_warning_range(const JKHD *handle, int *warning_range)

Set motion limit (singularity and joint limit) warning range

errno_t set_motion_limit_warning_range(const JKHD *handle, int warning_range)

Force control

Set constant-force compliance control coordinate system

errno_t set_ft_ctrl_frame(const JKHD *handle, FTFrameType ftFrame)

Get constant-force compliance control coordinate system

errno_t get_ft_ctrl_frame(const JKHD *handle, FTFrameType *ftFrame)

Set constant-force control tolerance

errno_t set_ft_tolerance(const JKHD *handle, double force, double torque)

Get constant-force control tolerance

errno_t get_ft_tolerance(const JKHD *handle, double* force, double* torque)

Activate/Deactivate Constant Force Compliant Control

errno_t set_ft_ctrl_mode(const JKHD *handle, BOOL mode)

Get constant-force compliance enable status

errno_t get_ft_ctrl_mode(const JKHD *handle, BOOL* mode)

Set constant-force compliance control parameters

errno_t set_ft_ctrl_config(const JKHD *handle, AdmitCtrlType cfg)

Get constant-force compliance control parameters


errno_t get_ft_ctrl_config(const JKHD *handle, RobotAdmitCtrl* cfg)

Set force control type and zero calibration (initialization) options

errno_t set_compliant_type(const JKHD *handle, int sensor_compensation, int compliance_type)

Get force control type and reading display (initialization) status

errno_t get_compliant_type(const JKHD *handle, int *sensor_compensation, int *compliance_type)

Set speed compliance control force condition

errno_t set_compliance_condition(const JKHD *handle, const FTxyz *ft)

Set approach speed limit

errno_t set_approach_speed_limit(const JKHD *handle, double vel, double angularVel)

Get approach speed limit

errno_t get_approach_speed_limit(const JKHD *handle, double* vel, double* angularVel)

Collision

Query whether the robot arm is in collision protection mode

errno_t is_in_collision(const JKHD *handle, BOOL *in_collision)

Set robot arm collision level

errno_t set_collision_level(const JKHD *handle, const int level)

Get collision level set by machine

errno_t get_collision_level(const JKHD *handle, int *level)

Recover from collision protection mode after collision

errno_t collision_recover(const JKHD *handle)

Kinematics

Robot arm inverse kinematics solution

errno_t kine_inverse(const JKHD *handle, const JointValue *ref_pos, const CartesianPose *cartesian_pose, JointValue *joint_pos)
// Optional extended parameters allow inverse kinematics to be computed in the selected user frame and tool frame.
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)

Robot arm forward kinematics solution

errno_t kine_forward(const JKHD *handle, const JointValue *joint_pos, CartesianPose *cartesian_pose)
// Optional extended parameters allow forward kinematics to be computed in the selected user frame and tool frame.
errno_t kine_forward_extend(const JKHD *handle, const JointValue *joint_pos, CartesianPose *cartesian_pose, const CartesianPose *tool, const CartesianPose *userFrame)

Convert Euler angles to rotation matrix

errno_t rpy_to_rot_matrix(const JKHD *handle, const Rpy *rpy, RotMatrix *rot_matrix)

Convert rotation matrix to Euler angles

errno_t rot_matrix_to_rpy(const JKHD *handle, const RotMatrix *rot_matrix, Rpy *rpy)

Convert rotation matrix to quaternion

errno_t rot_matrix_to_quaternion(const JKHD *handle, const RotMatrix *rot_matrix, Quaternion *quaternion)

Convert quaternion to rotation matrix

errno_t quaternion_to_rot_matrix(const JKHD *handle, const Quaternion *quaternion, RotMatrix *rot_matrix)

Interface call return value list and troubleshooting

Error codesDescriptionHandling suggestions
0successnull
2interface error or controller not supportedCheck the controller and SDK version information, upgrade or use another interface
-1invalid handlerPlease check whether login is done before calling the interface
-2invalid parameterPlease check whether the parameters are correct
-3failed to connectPlease check the network connection status, or whether the robot IP is correct
-4inverse kinematics errorInverse kinematics failed, please check the current coordinate system, or whether the reference joint angles are reasonable
-5emergency stopEmergency stop state, status retained
-6not powered onNot powered on
-7not enabledNot enabled
-8not in servo modeNot in servo mode. When executing servoJP, you must first enter servo mode. Please check whether the corresponding interface is called
-9must disable enable before powering offMust disable enable before powering off
-10cannot operate, program is runningCannot operate, a program is currently running. Please close the program first
-11cannot open file, or file does not existCannot open file, or file does not exist
-12motion abnormalAbnormal movement, possibly near a singularity point or exceeding robot movement limits
-14ftp errorftp abnormal
-15socket msg or value oversizeExceeding limit abnormal
-16kine_forward errorForward kinematics failed
-17not support empty folderEmpty folders are not supported
-20protective stopSafeguard (Protective) Stop
-21emergency stopEmergency stop
-22on soft limitIn soft limit position, manual drag of the robot is not possible; use the teaching function in the APP to approach the soft limit
-30fail to encode cmd stringCommand encoding failed, usually due to an error while parsing the message returned by the controller
-31fail to decode cmd stringCommand decoding failed, usually due to an error while parsing the message returned by the controller
-32fail to uncompress port 10004 stringFailed to decompress data from port 10004, possibly due to network fluctuations or excessive data size
-40move linear errorLinear movement failed, please check if there are any singular regions in the path
-41move joint errorJoint movement failed, please check the set joint angles
-42move circular errorArc motion failed, please check the set parameters
-50block_wait timeoutBlocking wait timeout
-51power on timeoutPower-on timeout
-52power off timeoutPower-off timeout
-53enable timeoffEnable timeout
-54disable timeoutDisable timeout
-55set userframe timeoutSetting user coordinate system timeout
-56set tool timeoutSetting tool coordinate system timeout
-57edg init failedEDG function initialization failed
-58edg is running, cannot use servo_j or servo_pEDG function is running, cannot use servo_j or servo_p interface
-59Current EDG mode does not support using edg_servo_j or edg_servo_p.EDG function is running, cannot use edg_servo_j or edg_servo_p interface
-60set io timeoutSetting IO timeout
-61operation timeoutInterface timeout
-62servo queue is fullServo queue is full
-63servo is not runningServo mode is not started
-9997not implementInterface not implemented
-9998deprecated interfaceInterface will be removed in the future (function still available)
-9999obsolete interfaceInterface will be removed in the future (function unavailable)

Issue feedback

If there are any inaccurate descriptions or mistakes in the document, we kindly ask readers for their understanding and corrections. If you find any problems or wish to provide suggestions while reading, you can send an email to support@jaka.com , and we will reply to you as soon as possible.

Last update: