7 #ifndef CORE_INSTRUCTION_UXBUS_CMD_H_ 8 #define CORE_INSTRUCTION_UXBUS_CMD_H_ 13 #include <sys/timeb.h> 28 usleep(milliseconds * 1000);
37 return 1000 * t.time + t.millitm;
40 clock_gettime(CLOCK_REALTIME, &t);
41 return 1000 * t.tv_sec + t.tv_nsec / 1000000;
66 int get_reduced_states(
int *on,
int xyz_list[6],
float *tcp_speed,
float *joint_speed,
float jrange_rad[14] = NULL,
int *fense_is_on = NULL,
int *collision_rebound_is_on = NULL,
int length = 21);
86 int move_lineb(
float mvpose[6],
float mvvelo,
float mvacc,
float mvtime,
88 int move_joint(
float mvjoint[7],
float mvvelo,
float mvacc,
float mvtime);
89 int move_jointb(
float mvjoint[7],
float mvvelo,
float mvacc,
float mvradii);
90 int move_line_tool(
float mvpose[6],
float mvvelo,
float mvacc,
float mvtime);
91 int move_gohome(
float mvvelo,
float mvacc,
float mvtime);
92 int move_servoj(
float mvjoint[7],
float mvvelo,
float mvacc,
float mvtime);
99 int move_circle(
float pose1[6],
float pose2[6],
float mvvelo,
float mvacc,
float mvtime,
float percent);
114 int get_ik(
float pose[6],
float angles[7]);
115 int get_fk(
float angles[7],
float pose[6]);
142 int tgpio_set_modbus(
unsigned char *send_data,
int length,
unsigned char *recv_data);
170 int cgpio_get_state(
int *state,
int *digit_io,
float *analog,
int *input_conf,
int *output_conf,
int *input_conf2=NULL,
int *output_conf2=NULL);
172 int get_pose_offset(
float pose1[6],
float pose2[6],
float offset[6],
int orient_type_in=0,
int orient_type_out=0);
174 int move_line_aa(
float mvpose[6],
float mvvelo,
float mvacc,
float mvtime,
int mvcoord=0,
int relative=0);
175 int move_servo_cart_aa(
float mvpose[6],
float mvvelo,
float mvacc,
int tool_coord=0,
int relative=0);
194 virtual void close(
void);
195 virtual int is_ok(
void);
199 virtual int send_pend(
int funcode,
int num,
int timeout,
unsigned char *rx_data);
200 virtual int send_xbus(
int funcode,
unsigned char *txdata,
int num);
202 int set_nu8(
int funcode,
int *datas,
int num);
203 int get_nu8(
int funcode,
int *rx_data,
int num);
204 int get_nu8(
int funcode,
unsigned char *rx_data,
int num);
205 int set_nu16(
int funcode,
int *datas,
int num);
206 int get_nu16(
int funcode,
int *rx_data,
int num);
207 int set_nfp32(
int funcode,
float *datas,
int num);
208 int set_nint32(
int funcode,
int *datas,
int num);
209 int get_nfp32(
int funcode,
float *rx_data,
int num);
210 int swop_nfp32(
int funcode,
float tx_datas[],
int txn,
float *rx_data,
int rxn);
211 int is_nfp32(
int funcode,
float datas[],
int txn,
int *value);
int set_gravity_dir(float gravity_dir[3])
int get_reduced_states(int *on, int xyz_list[6], float *tcp_speed, float *joint_speed, float jrange_rad[14]=NULL, int *fense_is_on=NULL, int *collision_rebound_is_on=NULL, int length=21)
int set_collis_sens(int value)
int set_nfp32_with_bytes(int funcode, float *datas, int num, char *additional, int n)
int set_nu8(int funcode, int *datas, int num)
int gripper_set_posspd(float speed)
int gripper_addr_r16(int addr, float *value)
void sleep_milliseconds(unsigned long milliseconds)
int gripper_modbus_set_pos(float pulse)
int set_joint_maxacc(float maxacc)
int get_err_code(int *rx_data)
int get_version(unsigned char rx_data[40])
int gripper_modbus_clean_err(void)
int set_safe_level(int level)
int tgpio_get_analog1(float *value)
int set_timeout(float timeout)
int playback_traj_old(int times)
int cgpio_get_analog2(float *value)
int gripper_set_mode(int value)
int move_jointb(float mvjoint[7], float mvvelo, float mvacc, float mvradii)
int set_nu8_char(int funcode, char *datas, int num)
static const int GET_TIMEOUT
int move_lineb(float mvpose[6], float mvvelo, float mvacc, float mvtime, float mvradii)
int get_hd_types(int *rx_data)
int set_tcp_maxacc(float maxacc)
int get_report_tau_or_i(int *rx_data)
int get_nu16(int funcode, int *rx_data, int num)
int set_world_offset(float pose_offset[6])
int config_io_stop_reset(int io_type, int val)
int set_reduced_jrange(float jrange_rad[14])
int servo_get_dbmsg(int rx_data[16])
virtual int check_xbus_prot(unsigned char *data, int funcode)
int shutdown_system(int value)
int gripper_get_errcode(int rx_data[2])
int get_fk(float angles[7], float pose[6])
int gripper_modbus_w16s(int addr, float value, int len)
int load_traj(char filename[81])
int vc_set_linev(float line_v[6], int coord)
int gripper_modbus_set_zero(void)
int get_state(int *rx_data)
int set_xyz_limits(int xyz_list[6])
int is_tcp_limit(float pose[6], int *value)
int tgpio_get_digital(int *io1, int *io2)
int reload_dynamics(void)
int set_reduced_jointspeed(float jspd_rad)
int set_servot(float jnt_taus[7])
int save_traj(char filename[81])
int set_collision_tool_model(int tool_type, int n=0, float *argv=NULL)
int set_nint32(int funcode, int *datas, int num)
int get_joint_pose(float angles[7])
int move_circle(float pose1[6], float pose2[6], float mvvelo, float mvacc, float mvtime, float percent)
int gripper_clean_err(void)
int move_servo_cartesian(float mvpose[6], float mvvelo, float mvacc, float mvtime)
int is_joint_limit(float joint[7], int *value)
int swop_nfp32(int funcode, float tx_datas[], int txn, float *rx_data, int rxn)
int set_nu16(int funcode, int *datas, int num)
int cgpio_get_state(int *state, int *digit_io, float *analog, int *input_conf, int *output_conf, int *input_conf2=NULL, int *output_conf2=NULL)
int playback_traj(int times, int spdx=1)
int get_traj_rw_status(int *rx_data)
int cgpio_position_set_analog(int ionum, float value, float xyz[3], float tol_r)
int move_line_aa(float mvpose[6], float mvvelo, float mvacc, float mvtime, int mvcoord=0, int relative=0)
int get_robot_sn(unsigned char rx_data[40])
int tgpio_addr_w16(int addr, float value)
int servo_addr_r16(int id, int addr, float *value)
int move_gohome(float mvvelo, float mvacc, float mvtime)
int get_ik(float pose[6], float angles[7])
int get_nu8(int funcode, int *rx_data, int num)
int gripper_modbus_set_en(int value)
int tgpio_set_modbus(unsigned char *send_data, int length, unsigned char *recv_data)
int set_modbus_timeout(int value)
int check_verification(int *rx_data)
int get_nfp32(int funcode, float *rx_data, int num)
int gripper_modbus_get_errcode(int *err)
int set_simulation_robot(int on_off)
int servo_addr_w32(int id, int addr, float value)
int cgpio_set_infun(int ionum, int fun)
int get_position_aa(float pose[6])
int cgpio_set_auxdigit(int ionum, int value)
int get_pose_offset(float pose1[6], float pose2[6], float offset[6], int orient_type_in=0, int orient_type_out=0)
int gripper_modbus_set_posspd(float speed)
int gripper_set_pos(float pulse)
int set_tcp_offset(float pose_offset[6])
int set_fense_on(int on_off)
virtual int send_pend(int funcode, int num, int timeout, unsigned char *rx_data)
int tgpio_addr_r32(int addr, float *value)
int set_modbus_baudrate(int baud)
int gripper_modbus_r16s(int addr, int len, unsigned char *rx_data)
int gripper_modbus_set_mode(int value)
int servo_set_zero(int id)
int tgpio_get_analog2(float *value)
int set_collis_reb(int on_off)
int get_safe_level(int *level)
int get_tcp_pose(float pose[6])
int gripper_addr_r32(int addr, float *value)
long long get_system_time()
int gripper_set_zero(void)
int cgpio_get_auxdigit(int *value)
int gripper_get_pos(float *pulse)
int move_line_tool(float mvpose[6], float mvvelo, float mvacc, float mvtime)
int sleep_instruction(float sltime)
int get_joint_tau(float jnt_taus[7])
int move_line(float mvpose[6], float mvvelo, float mvacc, float mvtime)
int get_cmdnum(int *rx_data)
int tgpio_addr_r16(int addr, float *value)
int set_tcp_jerk(float jerk)
int servo_addr_r32(int id, int addr, float *value)
int servo_addr_w16(int id, int addr, float value)
int cgpio_position_set_digital(int ionum, int value, float xyz[3], float tol_r)
int set_record_traj(int value)
int move_servoj(float mvjoint[7], float mvvelo, float mvacc, float mvtime)
int is_nfp32(int funcode, float datas[], int txn, int *value)
int tgpio_position_set_digital(int ionum, int value, float xyz[3], float tol_r)
int gripper_modbus_get_pos(float *pulse)
int tgpio_addr_w32(int addr, float value)
int set_reduced_mode(int on_off)
int set_teach_sens(int value)
static const int SET_TIMEOUT
int move_joint(float mvjoint[7], float mvvelo, float mvacc, float mvtime)
int set_reduced_linespeed(float lspd_mm)
int get_reduced_mode(int *rx_data)
int set_nfp32(int funcode, float *datas, int num)
int set_self_collision_detection(int on_off)
int gripper_addr_w16(int addr, float value)
int vc_set_jointv(float jnt_v[7], int jnt_sync)
int set_tcp_load(float mass, float load_offset[3])
int set_joint_jerk(float jerk)
int gripper_addr_w32(int addr, float value)
int move_servo_cart_aa(float mvpose[6], float mvvelo, float mvacc, int tool_coord=0, int relative=0)
int cgpio_set_outfun(int ionum, int fun)
int motion_en(int id, int value)
int cgpio_set_analog2(float value)
virtual int send_xbus(int funcode, unsigned char *txdata, int num)
int cgpio_get_analog1(float *value)
int cgpio_delay_set_digital(int ionum, int value, float delay_sec)
int set_report_tau_or_i(int tau_or_i)
int gripper_set_en(int value)
int set_brake(int axis, int en)
int cgpio_set_analog1(float value)
int tgpio_delay_set_digital(int ionum, int value, float delay_sec)
int tgpio_set_digital(int ionum, int value)