Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
XArmAPI Class Reference

#include <xarm_api.h>

Public Member Functions

void _recv_report_data (void)
 
int clean_bio_gripper_error (void)
 
int clean_conf (void)
 
int clean_error (void)
 
int clean_gripper_error (void)
 
int clean_warn (void)
 
int close_bio_gripper (int speed=0, bool wait=true, fp32 timeout=5)
 
int close_bio_gripper (bool wait=true, fp32 timeout=5)
 
int config_cgpio_reset_when_stop (bool on_off)
 
int config_tgpio_reset_when_stop (bool on_off)
 
int connect (const std::string &port="")
 
void disconnect (void)
 
void emergency_stop (void)
 
int get_bio_gripper_error (int *err)
 
int get_bio_gripper_status (int *status)
 
int get_cgpio_analog (int ionum, fp32 *value)
 
int get_cgpio_digital (int *digitals, int *digitals2=NULL)
 
int get_cgpio_state (int *state, int *digit_io, fp32 *analog, int *input_conf, int *output_conf, int *input_conf2=NULL, int *output_conf2=NULL)
 
int get_cmdnum (int *cmdnum)
 
int get_err_warn_code (int err_warn[2])
 
int get_forward_kinematics (fp32 angles[7], fp32 pose[6])
 
int get_gripper_err_code (int *err)
 
int get_gripper_position (fp32 *pos)
 
int get_gripper_version (unsigned char versions[3])
 
int get_inverse_kinematics (fp32 pose[6], fp32 angles[7])
 
int get_pose_offset (float pose1[6], float pose2[6], float offset[6], int orient_type_in=0, int orient_type_out=0)
 
int get_position (fp32 pose[6])
 
int get_position_aa (fp32 pose[6])
 
int get_reduced_mode (int *mode)
 
int get_reduced_states (int *on, int *xyz_list, float *tcp_speed, float *joint_speed, float jrange[14]=NULL, int *fense_is_on=NULL, int *collision_rebound_is_on=NULL)
 
int get_report_tau_or_i (int *tau_or_i)
 
int get_robot_sn (unsigned char robot_sn[40])
 
int get_servo_angle (fp32 angles[7])
 
int get_servo_version (unsigned char versions[3], int servo_id=1)
 
int get_state (int *state)
 
int get_suction_cup (int *val)
 
int get_tgpio_analog (int ionum, float *value)
 
int get_tgpio_digital (int *io0_value, int *io1_value)
 
int get_tgpio_modbus_baudrate (int *baud)
 
int get_tgpio_version (unsigned char versions[3])
 
int get_trajectory_rw_status (int *status)
 
int get_vacuum_gripper (int *val)
 
int get_version (unsigned char version[40])
 
int getset_tgpio_modbus_data (unsigned char *modbus_data, int modbus_length, unsigned char *ret_data, int ret_length)
 
bool has_err_warn (void)
 
bool has_error (void)
 
bool has_warn (void)
 
bool is_connected (void)
 
int is_joint_limit (fp32 angles[7], int *limit)
 
bool is_reported (void)
 
int is_tcp_limit (fp32 pose[6], int *limit)
 
int load_trajectory (char *filename, float timeout=10)
 
int motion_enable (bool enable, int servo_id=8)
 
int move_circle (fp32 pose1[6], fp32 pose2[6], fp32 percent, fp32 speed=0, fp32 acc=0, fp32 mvtime=0, bool wait=false, fp32 timeout=NO_TIMEOUT)
 
int move_gohome (fp32 speed=0, fp32 acc=0, fp32 mvtime=0, bool wait=false, fp32 timeout=NO_TIMEOUT)
 
int move_gohome (bool wait=false, fp32 timeout=NO_TIMEOUT)
 
int open_bio_gripper (int speed=0, bool wait=true, fp32 timeout=5)
 
int open_bio_gripper (bool wait=true, fp32 timeout=5)
 
int playback_trajectory (int times=1, char *filename=NULL, bool wait=false, int double_speed=1)
 
int register_cmdnum_changed_callback (void(*callback)(int cmdnum))
 
int register_connect_changed_callback (void(*callback)(bool connected, bool reported))
 
int register_count_changed_callback (void(*callback)(int count))
 
int register_error_warn_changed_callback (void(*callback)(int err_code, int warn_code))
 
int register_mode_changed_callback (void(*callback)(int mode))
 
int register_mtable_mtbrake_changed_callback (void(*callback)(int mtable, int mtbrake))
 
int register_report_location_callback (void(*callback)(const fp32 *pose, const fp32 *angles))
 
int register_state_changed_callback (void(*callback)(int state))
 
int register_temperature_changed_callback (void(*callback)(const fp32 *temps))
 
int release_cmdnum_changed_callback (void(*callback)(int cmdnum)=NULL)
 
int release_connect_changed_callback (void(*callback)(bool connected, bool reported)=NULL)
 
int release_count_changed_callback (void(*callback)(int count)=NULL)
 
int release_error_warn_changed_callback (void(*callback)(int err_code, int warn_code)=NULL)
 
int release_mode_changed_callback (void(*callback)(int mode)=NULL)
 
int release_mtable_mtbrake_changed_callback (void(*callback)(int mtable, int mtbrake)=NULL)
 
int release_report_location_callback (void(*callback)(const fp32 *pose, const fp32 *angles)=NULL)
 
int release_state_changed_callback (void(*callback)(int state)=NULL)
 
int release_temperature_changed_callback (void(*callback)(const fp32 *temps)=NULL)
 
int reload_dynamics (void)
 
void reset (bool wait=false, fp32 timeout=NO_TIMEOUT)
 
int robotiq_close (unsigned char speed=0xFF, unsigned char force=0xFF, bool wait=true, fp32 timeout=5, unsigned char ret_data[6]=NULL)
 
int robotiq_close (bool wait=true, fp32 timeout=5, unsigned char ret_data[6]=NULL)
 
int robotiq_close (bool wait=true, unsigned char ret_data[6]=NULL)
 
int robotiq_close (unsigned char ret_data[6]=NULL)
 
int robotiq_get_status (unsigned char ret_data[9], unsigned char number_of_registers=3)
 
int robotiq_open (unsigned char speed=0xFF, unsigned char force=0xFF, bool wait=true, fp32 timeout=5, unsigned char ret_data[6]=NULL)
 
int robotiq_open (bool wait=true, fp32 timeout=5, unsigned char ret_data[6]=NULL)
 
int robotiq_open (bool wait=true, unsigned char ret_data[6]=NULL)
 
int robotiq_open (unsigned char ret_data[6]=NULL)
 
int robotiq_reset (unsigned char ret_data[6]=NULL)
 
int robotiq_set_activate (bool wait=true, fp32 timeout=3, unsigned char ret_data[6]=NULL)
 
int robotiq_set_activate (bool wait=true, unsigned char ret_data[6]=NULL)
 
int robotiq_set_activate (unsigned char ret_data[6]=NULL)
 
int robotiq_set_position (unsigned char pos, unsigned char speed=0xFF, unsigned char force=0xFF, bool wait=true, fp32 timeout=5, unsigned char ret_data[6]=NULL)
 
int robotiq_set_position (unsigned char pos, bool wait=true, fp32 timeout=5, unsigned char ret_data[6]=NULL)
 
int robotiq_set_position (unsigned char pos, bool wait=true, unsigned char ret_data[6]=NULL)
 
int robotiq_set_position (unsigned char pos, unsigned char ret_data[6]=NULL)
 
int save_conf (void)
 
int save_record_trajectory (char *filename, float timeout=10)
 
int set_bio_gripper_enable (bool enable, bool wait=true, fp32 timeout=3)
 
int set_bio_gripper_speed (int speed)
 
int set_cgpio_analog (int ionum, fp32 value)
 
int set_cgpio_analog_with_xyz (int ionum, float value, float xyz[3], float tol_r)
 
int set_cgpio_digital (int ionum, int value, float delay_sec=0)
 
int set_cgpio_digital_input_function (int ionum, int fun)
 
int set_cgpio_digital_output_function (int ionum, int fun)
 
int set_cgpio_digital_with_xyz (int ionum, int value, float xyz[3], float tol_r)
 
int set_collision_rebound (bool on)
 
int set_collision_sensitivity (int sensitivity)
 
int set_collision_tool_model (int tool_type, int n=0,...)
 
int set_counter_increase (void)
 
int set_counter_reset (void)
 
int set_fence_mode (bool on)
 
int set_fense_mode (bool on)
 
int set_gravity_direction (fp32 gravity_dir[3])
 
int set_gripper_enable (bool enable)
 
int set_gripper_mode (int mode)
 
int set_gripper_position (fp32 pos, bool wait=false, fp32 timeout=10)
 
int set_gripper_speed (fp32 speed)
 
int set_joint_jerk (fp32 jerk)
 
int set_joint_maxacc (fp32 acc)
 
int set_mode (int mode)
 
int set_pause_time (fp32 sltime)
 
int set_position (fp32 pose[6], fp32 radius=-1, fp32 speed=0, fp32 acc=0, fp32 mvtime=0, bool wait=false, fp32 timeout=NO_TIMEOUT)
 
int set_position (fp32 pose[6], fp32 radius=-1, bool wait=false, fp32 timeout=NO_TIMEOUT)
 
int set_position (fp32 pose[6], bool wait=false, fp32 timeout=NO_TIMEOUT)
 
int set_position_aa (fp32 pose[6], fp32 speed=0, fp32 acc=0, fp32 mvtime=0, bool is_tool_coord=false, bool relative=false, bool wait=false, fp32 timeout=NO_TIMEOUT)
 
int set_position_aa (fp32 pose[6], bool is_tool_coord=false, bool relative=false, bool wait=false, fp32 timeout=NO_TIMEOUT)
 
int set_reduced_joint_range (float jrange[14])
 
int set_reduced_max_joint_speed (float speed)
 
int set_reduced_max_tcp_speed (float speed)
 
int set_reduced_mode (bool on)
 
int set_reduced_tcp_boundary (int boundary[6])
 
int set_report_tau_or_i (int tau_or_i=0)
 
int set_self_collision_detection (bool on)
 
int set_servo_angle (fp32 angles[7], fp32 speed=0, fp32 acc=0, fp32 mvtime=0, bool wait=false, fp32 timeout=NO_TIMEOUT, fp32 radius=-1)
 
int set_servo_angle (fp32 angles[7], bool wait=false, fp32 timeout=NO_TIMEOUT, fp32 radius=-1)
 
int set_servo_angle (int servo_id, fp32 angle, fp32 speed=0, fp32 acc=0, fp32 mvtime=0, bool wait=false, fp32 timeout=NO_TIMEOUT, fp32 radius=-1)
 
int set_servo_angle (int servo_id, fp32 angle, bool wait=false, fp32 timeout=NO_TIMEOUT, fp32 radius=-1)
 
int set_servo_angle_j (fp32 angles[7], fp32 speed=0, fp32 acc=0, fp32 mvtime=0)
 
int set_servo_attach (int servo_id)
 
int set_servo_cartesian (fp32 pose[6], fp32 speed=0, fp32 acc=0, fp32 mvtime=0, bool is_tool_coord=false)
 
int set_servo_cartesian_aa (fp32 pose[6], fp32 speed=0, fp32 acc=0, bool is_tool_coord=false, bool relative=false)
 
int set_servo_cartesian_aa (fp32 pose[6], bool is_tool_coord=false, bool relative=false)
 
int set_servo_detach (int servo_id)
 
int set_simulation_robot (bool on)
 
int set_state (int state)
 
int set_suction_cup (bool on, bool wait=false, float timeout=3, float delay_sec=0)
 
int set_tcp_jerk (fp32 jerk)
 
int set_tcp_load (fp32 weight, fp32 center_of_gravity[3])
 
int set_tcp_maxacc (fp32 acc)
 
int set_tcp_offset (fp32 pose_offset[6])
 
int set_teach_sensitivity (int sensitivity)
 
int set_tgpio_digital (int ionum, int value, float delay_sec=0)
 
int set_tgpio_digital_with_xyz (int ionum, int value, float xyz[3], float tol_r)
 
int set_tgpio_modbus_baudrate (int baud)
 
int set_tgpio_modbus_timeout (int timeout)
 
int set_timeout (fp32 timeout)
 
int set_tool_position (fp32 pose[6], fp32 speed=0, fp32 acc=0, fp32 mvtime=0, bool wait=false, fp32 timeout=NO_TIMEOUT)
 
int set_tool_position (fp32 pose[6], bool wait=false, fp32 timeout=NO_TIMEOUT)
 
int set_vacuum_gripper (bool on, bool wait=false, float timeout=3, float delay_sec=0)
 
int set_world_offset (float pose_offset[6])
 
int shutdown_system (int value=1)
 
int start_record_trajectory (void)
 
int stop_record_trajectory (char *filename=NULL)
 
int vc_set_cartesian_velocity (fp32 speeds[6], bool is_tool_coord=false)
 
int vc_set_joint_velocity (fp32 speeds[7], bool is_sync=true)
 
 XArmAPI (const std::string &port="", bool is_radian=DEFAULT_IS_RADIAN, bool do_not_open=false, bool check_tcp_limit=true, bool check_joint_limit=true, bool check_cmdnum_limit=true, bool check_robot_sn=false, bool check_is_ready=true, bool check_is_pause=true, int max_callback_thread_count=-1, int max_cmdnum=256)
 
 ~XArmAPI (void)
 

Public Attributes

fp32angles
 
int axis
 
int cgpio_code
 
int * cgpio_input_conf
 
int * cgpio_input_digitals
 
fp32cgpio_intput_anglogs
 
fp32cgpio_output_anglogs
 
int * cgpio_output_conf
 
int * cgpio_output_digitals
 
int cgpio_state
 
int cmd_num
 
fp32collision_model_params
 
int collision_sensitivity
 
int collision_tool_type
 
UxbusCmdcore
 
int count
 
fp32currents
 
bool default_is_radian
 
int device_type
 
int error_code
 
unsigned char * gpio_reset_config
 
fp32gravity_direction
 
int is_collision_detection
 
int is_simulation_robot
 
fp32joint_acc_limit
 
fp32 joint_jerk
 
fp32joint_speed_limit
 
fp32joints_torque
 
fp32last_used_angles
 
fp32 last_used_joint_acc
 
fp32 last_used_joint_speed
 
fp32last_used_position
 
fp32 last_used_tcp_acc
 
fp32 last_used_tcp_speed
 
int master_id
 
fp32 max_rot_acc
 
int mode
 
bool * motor_brake_states
 
bool * motor_enable_states
 
int motor_fid
 
int motor_tid
 
fp32position
 
fp32realtime_joint_speeds
 
fp32 realtime_tcp_speed
 
struct RobotIqStatus robotiq_status
 
fp32 rot_jerk
 
int slave_id
 
unsigned char sn [40]
 
int state
 
fp32tcp_acc_limit
 
fp32 tcp_jerk
 
fp32tcp_load
 
fp32tcp_offset
 
fp32tcp_speed_limit
 
int teach_sensitivity
 
fp32temperatures
 
unsigned char version [30]
 
int * version_number
 
fp32voltages
 
int warn_code
 
fp32world_offset
 

Private Member Functions

int _bio_gripper_send_modbus (unsigned char *send_data, int length, unsigned char *ret_data, int ret_length)
 
int _bio_gripper_wait_enable_completed (fp32 timeout=3)
 
int _bio_gripper_wait_motion_completed (fp32 timeout=5)
 
int _check_code (int code, bool is_move_cmd=false)
 
int _check_gripper_position (fp32 target_pos, fp32 timeout=10)
 
int _check_gripper_status (fp32 timeout=10)
 
void _check_is_pause (void)
 
int _check_modbus_code (int ret, unsigned char *rx_data=NULL)
 
void _check_version (void)
 
int _checkset_modbus_baud (int baudrate, bool check=true)
 
int _get_bio_gripper_register (unsigned char *ret_data, int address=0x00, int number_of_registers=1)
 
int _get_gripper_status (int *status)
 
int _get_modbus_baudrate (int *baud_inx)
 
bool _gripper_is_support_status (void)
 
void _init (void)
 
template<typename callable_vector , typename callable >
int _register_event_callback (callable_vector &&callbacks, callable &&f)
 
template<typename callable_vector , typename callable >
int _release_event_callback (callable_vector &&callbacks, callable &&f)
 
template<typename callable_vector , class... arguments>
void _report_callback (callable_vector &&callbacks, arguments &&...args)
 
void _report_cmdnum_changed_callback (void)
 
void _report_connect_changed_callback (void)
 
void _report_count_changed_callback (void)
 
void _report_error_warn_changed_callback (void)
 
void _report_location_callback (void)
 
void _report_mode_changed_callback (void)
 
void _report_mtable_mtbrake_changed_callback (void)
 
void _report_state_changed_callback (void)
 
void _report_temperature_changed_callback (void)
 
int _robotiq_get (unsigned char ret_data[9], unsigned char number_of_registers=0x03)
 
int _robotiq_set (unsigned char *params, int length, unsigned char ret_data[6])
 
int _robotiq_wait_activation_completed (fp32 timeout=3)
 
int _robotiq_wait_motion_completed (fp32 timeout=5, bool check_detected=false)
 
int _set_bio_gripper_position (int pos, int speed=0, bool wait=true, fp32 timeout=5)
 
int _set_bio_gripper_position (int pos, bool wait=true, fp32 timeout=5)
 
void _sync (void)
 
void _update (unsigned char *data)
 
void _update_old (unsigned char *data)
 
bool _version_is_ge (int major=1, int minor=2, int revision=11)
 
int _wait_move (fp32 timeout)
 
int _wait_until_cmdnum_lt_max (void)
 

Private Attributes

bool arm_type_is_1300_
 
int bio_gripper_error_code_
 
bool bio_gripper_is_enabled_
 
int bio_gripper_speed_
 
bool callback_in_thread_
 
bool check_cmdnum_limit_
 
bool check_is_pause_
 
bool check_is_ready_
 
bool check_joint_limit_
 
bool check_robot_sn_
 
bool check_tcp_limit_
 
fp32 cmd_timeout_
 
std::vector< void(*)(int)> cmdnum_changed_callbacks_
 
std::condition_variable cond_
 
std::vector< void(*)(bool, bool)> connect_changed_callbacks_
 
bool control_box_type_is_1300_
 
std::vector< void(*)(int)> count_changed_callbacks_
 
std::vector< void(*)(int, int)> error_warn_changed_callbacks_
 
bool gripper_is_enabled_
 
int gripper_version_numbers_ [3]
 
bool ignore_error_
 
bool ignore_state_
 
bool is_first_report_
 
bool is_old_protocol_
 
bool is_ready_
 
bool is_sync_
 
bool is_tcp_
 
long long last_report_time_
 
int major_version_number_
 
int max_cmdnum_
 
fp32 max_joint_acc_
 
fp32 max_joint_speed_
 
long long max_report_interval_
 
fp32 max_tcp_acc_
 
fp32 max_tcp_speed_
 
fp32 min_joint_acc_
 
fp32 min_joint_speed_
 
fp32 min_tcp_acc_
 
fp32 min_tcp_speed_
 
int minor_version_number_
 
int modbus_baud_
 
std::vector< void(*)(int)> mode_changed_callbacks_
 
int mt_able_
 
int mt_brake_
 
std::vector< void(*)(int, int)> mtable_mtbrake_changed_callbacks_
 
std::mutex mutex_
 
fp32 p2p_msg_ [5]
 
ThreadPool pool
 
std::string port_
 
std::vector< void(*)(const fp32 *, const fp32 *)> report_location_callbacks_
 
std::thread report_thread_
 
int revision_version_number_
 
int robotiq_error_code_
 
bool robotiq_is_activated_
 
fp32 rot_msg_ [2]
 
long long sleep_finish_time_
 
std::vector< void(*)(int)> state_changed_callbacks_
 
SerialPortstream_ser_
 
SocketPortstream_tcp_
 
SocketPortstream_tcp_report_
 
int sv3msg_ [16]
 
std::vector< void(*)(const fp32 *)> temperature_changed_callbacks_
 
fp32 trs_msg_ [5]
 
int xarm_gripper_error_code_
 

Detailed Description

Definition at line 50 of file xarm_api.h.

Constructor & Destructor Documentation

XArmAPI::XArmAPI ( const std::string &  port = "",
bool  is_radian = DEFAULT_IS_RADIAN,
bool  do_not_open = false,
bool  check_tcp_limit = true,
bool  check_joint_limit = true,
bool  check_cmdnum_limit = true,
bool  check_robot_sn = false,
bool  check_is_ready = true,
bool  check_is_pause = true,
int  max_callback_thread_count = -1,
int  max_cmdnum = 256 
)

Definition at line 41 of file xarm_api.cc.

XArmAPI::~XArmAPI ( void  )

Definition at line 69 of file xarm_api.cc.

Member Function Documentation

int XArmAPI::_bio_gripper_send_modbus ( unsigned char *  send_data,
int  length,
unsigned char *  ret_data,
int  ret_length 
)
private

Definition at line 2614 of file xarm_api.cc.

int XArmAPI::_bio_gripper_wait_enable_completed ( fp32  timeout = 3)
private

Definition at line 2649 of file xarm_api.cc.

int XArmAPI::_bio_gripper_wait_motion_completed ( fp32  timeout = 5)
private

Definition at line 2627 of file xarm_api.cc.

int XArmAPI::_check_code ( int  code,
bool  is_move_cmd = false 
)
private

Definition at line 804 of file xarm_api.cc.

int XArmAPI::_check_gripper_position ( fp32  target_pos,
fp32  timeout = 10 
)
private

Definition at line 1592 of file xarm_api.cc.

int XArmAPI::_check_gripper_status ( fp32  timeout = 10)
private

Definition at line 1664 of file xarm_api.cc.

void XArmAPI::_check_is_pause ( void  )
private

Definition at line 785 of file xarm_api.cc.

int XArmAPI::_check_modbus_code ( int  ret,
unsigned char *  rx_data = NULL 
)
private

Definition at line 2351 of file xarm_api.cc.

void XArmAPI::_check_version ( void  )
private

Definition at line 704 of file xarm_api.cc.

int XArmAPI::_checkset_modbus_baud ( int  baudrate,
bool  check = true 
)
private

Definition at line 2383 of file xarm_api.cc.

int XArmAPI::_get_bio_gripper_register ( unsigned char *  ret_data,
int  address = 0x00,
int  number_of_registers = 1 
)
private

Definition at line 2621 of file xarm_api.cc.

int XArmAPI::_get_gripper_status ( int *  status)
private

Definition at line 1582 of file xarm_api.cc.

int XArmAPI::_get_modbus_baudrate ( int *  baud_inx)
private

Definition at line 2367 of file xarm_api.cc.

bool XArmAPI::_gripper_is_support_status ( void  )
private

Definition at line 1572 of file xarm_api.cc.

void XArmAPI::_init ( void  )
private

Definition at line 73 of file xarm_api.cc.

void XArmAPI::_recv_report_data ( void  )

Definition at line 640 of file xarm_api.cc.

template<typename callable_vector , typename callable >
int XArmAPI::_register_event_callback ( callable_vector &&  callbacks,
callable &&  f 
)
inlineprivate

Definition at line 2028 of file xarm_api.cc.

template<typename callable_vector , typename callable >
int XArmAPI::_release_event_callback ( callable_vector &&  callbacks,
callable &&  f 
)
inlineprivate

Definition at line 2038 of file xarm_api.cc.

template<typename callable_vector , class... arguments>
void XArmAPI::_report_callback ( callable_vector &&  callbacks,
arguments &&...  args 
)
inlineprivate

Definition at line 210 of file xarm_api.cc.

void XArmAPI::_report_cmdnum_changed_callback ( void  )
inlineprivate

Definition at line 269 of file xarm_api.cc.

void XArmAPI::_report_connect_changed_callback ( void  )
inlineprivate

Definition at line 225 of file xarm_api.cc.

void XArmAPI::_report_count_changed_callback ( void  )
inlineprivate

Definition at line 285 of file xarm_api.cc.

void XArmAPI::_report_error_warn_changed_callback ( void  )
inlineprivate

Definition at line 260 of file xarm_api.cc.

void XArmAPI::_report_location_callback ( void  )
inlineprivate

Definition at line 217 of file xarm_api.cc.

void XArmAPI::_report_mode_changed_callback ( void  )
inlineprivate

Definition at line 244 of file xarm_api.cc.

void XArmAPI::_report_mtable_mtbrake_changed_callback ( void  )
inlineprivate

Definition at line 252 of file xarm_api.cc.

void XArmAPI::_report_state_changed_callback ( void  )
inlineprivate

Definition at line 235 of file xarm_api.cc.

void XArmAPI::_report_temperature_changed_callback ( void  )
inlineprivate

Definition at line 277 of file xarm_api.cc.

int XArmAPI::_robotiq_get ( unsigned char  ret_data[9],
unsigned char  number_of_registers = 0x03 
)
private

Definition at line 2439 of file xarm_api.cc.

int XArmAPI::_robotiq_set ( unsigned char *  params,
int  length,
unsigned char  ret_data[6] 
)
private

Definition at line 2423 of file xarm_api.cc.

int XArmAPI::_robotiq_wait_activation_completed ( fp32  timeout = 3)
private

Definition at line 2479 of file xarm_api.cc.

int XArmAPI::_robotiq_wait_motion_completed ( fp32  timeout = 5,
bool  check_detected = false 
)
private

Definition at line 2500 of file xarm_api.cc.

int XArmAPI::_set_bio_gripper_position ( int  pos,
int  speed = 0,
bool  wait = true,
fp32  timeout = 5 
)
private

Definition at line 2689 of file xarm_api.cc.

int XArmAPI::_set_bio_gripper_position ( int  pos,
bool  wait = true,
fp32  timeout = 5 
)
private

Definition at line 2709 of file xarm_api.cc.

void XArmAPI::_sync ( void  )
private

Definition at line 699 of file xarm_api.cc.

void XArmAPI::_update ( unsigned char *  data)
private

Definition at line 417 of file xarm_api.cc.

void XArmAPI::_update_old ( unsigned char *  data)
private

Definition at line 293 of file xarm_api.cc.

bool XArmAPI::_version_is_ge ( int  major = 1,
int  minor = 2,
int  revision = 11 
)
private

Definition at line 813 of file xarm_api.cc.

int XArmAPI::_wait_move ( fp32  timeout)
private

Definition at line 1121 of file xarm_api.cc.

int XArmAPI::_wait_until_cmdnum_lt_max ( void  )
private

Definition at line 793 of file xarm_api.cc.

int XArmAPI::clean_bio_gripper_error ( void  )

Definition at line 2754 of file xarm_api.cc.

int XArmAPI::clean_conf ( void  )

Definition at line 1448 of file xarm_api.cc.

int XArmAPI::clean_error ( void  )

Definition at line 1082 of file xarm_api.cc.

int XArmAPI::clean_gripper_error ( void  )

Definition at line 1719 of file xarm_api.cc.

int XArmAPI::clean_warn ( void  )

Definition at line 1102 of file xarm_api.cc.

int XArmAPI::close_bio_gripper ( int  speed = 0,
bool  wait = true,
fp32  timeout = 5 
)

Definition at line 2721 of file xarm_api.cc.

int XArmAPI::close_bio_gripper ( bool  wait = true,
fp32  timeout = 5 
)

Definition at line 2725 of file xarm_api.cc.

int XArmAPI::config_cgpio_reset_when_stop ( bool  on_off)

Definition at line 2283 of file xarm_api.cc.

int XArmAPI::config_tgpio_reset_when_stop ( bool  on_off)

Definition at line 2278 of file xarm_api.cc.

int XArmAPI::connect ( const std::string &  port = "")

Definition at line 876 of file xarm_api.cc.

void XArmAPI::disconnect ( void  )

Definition at line 930 of file xarm_api.cc.

void XArmAPI::emergency_stop ( void  )

Definition at line 1370 of file xarm_api.cc.

int XArmAPI::get_bio_gripper_error ( int *  err)

Definition at line 2745 of file xarm_api.cc.

int XArmAPI::get_bio_gripper_status ( int *  status)

Definition at line 2729 of file xarm_api.cc.

int XArmAPI::get_cgpio_analog ( int  ionum,
fp32 value 
)

Definition at line 1773 of file xarm_api.cc.

int XArmAPI::get_cgpio_digital ( int *  digitals,
int *  digitals2 = NULL 
)

Definition at line 1758 of file xarm_api.cc.

int XArmAPI::get_cgpio_state ( int *  state,
int *  digit_io,
fp32 analog,
int *  input_conf,
int *  output_conf,
int *  input_conf2 = NULL,
int *  output_conf2 = NULL 
)

Definition at line 1822 of file xarm_api.cc.

int XArmAPI::get_cmdnum ( int *  cmdnum)

Definition at line 978 of file xarm_api.cc.

int XArmAPI::get_err_warn_code ( int  err_warn[2])

Definition at line 987 of file xarm_api.cc.

int XArmAPI::get_forward_kinematics ( fp32  angles[7],
fp32  pose[6] 
)

Definition at line 1398 of file xarm_api.cc.

int XArmAPI::get_gripper_err_code ( int *  err)

Definition at line 1557 of file xarm_api.cc.

int XArmAPI::get_gripper_position ( fp32 pos)

Definition at line 1547 of file xarm_api.cc.

int XArmAPI::get_gripper_version ( unsigned char  versions[3])

Definition at line 2169 of file xarm_api.cc.

int XArmAPI::get_inverse_kinematics ( fp32  pose[6],
fp32  angles[7] 
)

Definition at line 1384 of file xarm_api.cc.

int XArmAPI::get_pose_offset ( float  pose1[6],
float  pose2[6],
float  offset[6],
int  orient_type_in = 0,
int  orient_type_out = 0 
)

Definition at line 2326 of file xarm_api.cc.

int XArmAPI::get_position ( fp32  pose[6])

Definition at line 997 of file xarm_api.cc.

int XArmAPI::get_position_aa ( fp32  pose[6])

Definition at line 2340 of file xarm_api.cc.

int XArmAPI::get_reduced_mode ( int *  mode)

Definition at line 1842 of file xarm_api.cc.

int XArmAPI::get_reduced_states ( int *  on,
int *  xyz_list,
float *  tcp_speed,
float *  joint_speed,
float  jrange[14] = NULL,
int *  fense_is_on = NULL,
int *  collision_rebound_is_on = NULL 
)

Definition at line 1847 of file xarm_api.cc.

int XArmAPI::get_report_tau_or_i ( int *  tau_or_i)

Definition at line 2797 of file xarm_api.cc.

int XArmAPI::get_robot_sn ( unsigned char  robot_sn[40])

Definition at line 955 of file xarm_api.cc.

int XArmAPI::get_servo_angle ( fp32  angles[7])

Definition at line 1011 of file xarm_api.cc.

int XArmAPI::get_servo_version ( unsigned char  versions[3],
int  servo_id = 1 
)

Definition at line 2200 of file xarm_api.cc.

int XArmAPI::get_state ( int *  state)

Definition at line 969 of file xarm_api.cc.

int XArmAPI::get_suction_cup ( int *  val)

Definition at line 2123 of file xarm_api.cc.

int XArmAPI::get_tgpio_analog ( int  ionum,
float *  value 
)

Definition at line 1747 of file xarm_api.cc.

int XArmAPI::get_tgpio_digital ( int *  io0_value,
int *  io1_value 
)

Definition at line 1729 of file xarm_api.cc.

int XArmAPI::get_tgpio_modbus_baudrate ( int *  baud)

Definition at line 2773 of file xarm_api.cc.

int XArmAPI::get_tgpio_version ( unsigned char  versions[3])

Definition at line 2219 of file xarm_api.cc.

int XArmAPI::get_trajectory_rw_status ( int *  status)

Definition at line 2022 of file xarm_api.cc.

int XArmAPI::get_vacuum_gripper ( int *  val)
inline

Definition at line 866 of file xarm_api.h.

int XArmAPI::get_version ( unsigned char  version[40])

Definition at line 950 of file xarm_api.cc.

int XArmAPI::getset_tgpio_modbus_data ( unsigned char *  modbus_data,
int  modbus_length,
unsigned char *  ret_data,
int  ret_length 
)

Definition at line 2782 of file xarm_api.cc.

bool XArmAPI::has_err_warn ( void  )

Definition at line 189 of file xarm_api.cc.

bool XArmAPI::has_error ( void  )

Definition at line 193 of file xarm_api.cc.

bool XArmAPI::has_warn ( void  )

Definition at line 197 of file xarm_api.cc.

bool XArmAPI::is_connected ( void  )

Definition at line 201 of file xarm_api.cc.

int XArmAPI::is_joint_limit ( fp32  angles[7],
int *  limit 
)

Definition at line 1421 of file xarm_api.cc.

bool XArmAPI::is_reported ( void  )

Definition at line 205 of file xarm_api.cc.

int XArmAPI::is_tcp_limit ( fp32  pose[6],
int *  limit 
)

Definition at line 1412 of file xarm_api.cc.

int XArmAPI::load_trajectory ( char *  filename,
float  timeout = 10 
)

Definition at line 1939 of file xarm_api.cc.

int XArmAPI::motion_enable ( bool  enable,
int  servo_id = 8 
)

Definition at line 1025 of file xarm_api.cc.

int XArmAPI::move_circle ( fp32  pose1[6],
fp32  pose2[6],
fp32  percent,
fp32  speed = 0,
fp32  acc = 0,
fp32  mvtime = 0,
bool  wait = false,
fp32  timeout = NO_TIMEOUT 
)

Definition at line 1300 of file xarm_api.cc.

int XArmAPI::move_gohome ( fp32  speed = 0,
fp32  acc = 0,
fp32  mvtime = 0,
bool  wait = false,
fp32  timeout = NO_TIMEOUT 
)

Definition at line 1323 of file xarm_api.cc.

int XArmAPI::move_gohome ( bool  wait = false,
fp32  timeout = NO_TIMEOUT 
)

Definition at line 1342 of file xarm_api.cc.

int XArmAPI::open_bio_gripper ( int  speed = 0,
bool  wait = true,
fp32  timeout = 5 
)

Definition at line 2713 of file xarm_api.cc.

int XArmAPI::open_bio_gripper ( bool  wait = true,
fp32  timeout = 5 
)

Definition at line 2717 of file xarm_api.cc.

int XArmAPI::playback_trajectory ( int  times = 1,
char *  filename = NULL,
bool  wait = false,
int  double_speed = 1 
)

Definition at line 1966 of file xarm_api.cc.

int XArmAPI::register_cmdnum_changed_callback ( void(*)(int cmdnum)  callback)

Definition at line 2076 of file xarm_api.cc.

int XArmAPI::register_connect_changed_callback ( void(*)(bool connected, bool reported)  callback)

Definition at line 2056 of file xarm_api.cc.

int XArmAPI::register_count_changed_callback ( void(*)(int count callback)

Definition at line 2084 of file xarm_api.cc.

int XArmAPI::register_error_warn_changed_callback ( void(*)(int err_code, int warn_code callback)

Definition at line 2072 of file xarm_api.cc.

int XArmAPI::register_mode_changed_callback ( void(*)(int mode callback)

Definition at line 2064 of file xarm_api.cc.

int XArmAPI::register_mtable_mtbrake_changed_callback ( void(*)(int mtable, int mtbrake)  callback)

Definition at line 2068 of file xarm_api.cc.

int XArmAPI::register_report_location_callback ( void(*)(const fp32 *pose, const fp32 *angles callback)

Definition at line 2052 of file xarm_api.cc.

int XArmAPI::register_state_changed_callback ( void(*)(int state callback)

Definition at line 2060 of file xarm_api.cc.

int XArmAPI::register_temperature_changed_callback ( void(*)(const fp32 *temps)  callback)

Definition at line 2080 of file xarm_api.cc.

int XArmAPI::release_cmdnum_changed_callback ( void(*)(int cmdnum)  callback = NULL)

Definition at line 2112 of file xarm_api.cc.

int XArmAPI::release_connect_changed_callback ( void(*)(bool connected, bool reported)  callback = NULL)

Definition at line 2092 of file xarm_api.cc.

int XArmAPI::release_count_changed_callback ( void(*)(int count callback = NULL)

Definition at line 2119 of file xarm_api.cc.

int XArmAPI::release_error_warn_changed_callback ( void(*)(int err_code, int warn_code callback = NULL)

Definition at line 2108 of file xarm_api.cc.

int XArmAPI::release_mode_changed_callback ( void(*)(int mode callback = NULL)

Definition at line 2100 of file xarm_api.cc.

int XArmAPI::release_mtable_mtbrake_changed_callback ( void(*)(int mtable, int mtbrake)  callback = NULL)

Definition at line 2104 of file xarm_api.cc.

int XArmAPI::release_report_location_callback ( void(*)(const fp32 *pose, const fp32 *angles callback = NULL)

Definition at line 2088 of file xarm_api.cc.

int XArmAPI::release_state_changed_callback ( void(*)(int state callback = NULL)

Definition at line 2096 of file xarm_api.cc.

int XArmAPI::release_temperature_changed_callback ( void(*)(const fp32 *temps)  callback = NULL)

Definition at line 2116 of file xarm_api.cc.

int XArmAPI::reload_dynamics ( void  )

Definition at line 2238 of file xarm_api.cc.

void XArmAPI::reset ( bool  wait = false,
fp32  timeout = NO_TIMEOUT 
)

Definition at line 1346 of file xarm_api.cc.

int XArmAPI::robotiq_close ( unsigned char  speed = 0xFF,
unsigned char  force = 0xFF,
bool  wait = true,
fp32  timeout = 5,
unsigned char  ret_data[6] = NULL 
)

Definition at line 2598 of file xarm_api.cc.

int XArmAPI::robotiq_close ( bool  wait = true,
fp32  timeout = 5,
unsigned char  ret_data[6] = NULL 
)

Definition at line 2602 of file xarm_api.cc.

int XArmAPI::robotiq_close ( bool  wait = true,
unsigned char  ret_data[6] = NULL 
)

Definition at line 2606 of file xarm_api.cc.

int XArmAPI::robotiq_close ( unsigned char  ret_data[6] = NULL)

Definition at line 2610 of file xarm_api.cc.

int XArmAPI::robotiq_get_status ( unsigned char  ret_data[9],
unsigned char  number_of_registers = 3 
)

Definition at line 2523 of file xarm_api.cc.

int XArmAPI::robotiq_open ( unsigned char  speed = 0xFF,
unsigned char  force = 0xFF,
bool  wait = true,
fp32  timeout = 5,
unsigned char  ret_data[6] = NULL 
)

Definition at line 2582 of file xarm_api.cc.

int XArmAPI::robotiq_open ( bool  wait = true,
fp32  timeout = 5,
unsigned char  ret_data[6] = NULL 
)

Definition at line 2586 of file xarm_api.cc.

int XArmAPI::robotiq_open ( bool  wait = true,
unsigned char  ret_data[6] = NULL 
)

Definition at line 2590 of file xarm_api.cc.

int XArmAPI::robotiq_open ( unsigned char  ret_data[6] = NULL)

Definition at line 2594 of file xarm_api.cc.

int XArmAPI::robotiq_reset ( unsigned char  ret_data[6] = NULL)

Definition at line 2528 of file xarm_api.cc.

int XArmAPI::robotiq_set_activate ( bool  wait = true,
fp32  timeout = 3,
unsigned char  ret_data[6] = NULL 
)

Definition at line 2537 of file xarm_api.cc.

int XArmAPI::robotiq_set_activate ( bool  wait = true,
unsigned char  ret_data[6] = NULL 
)

Definition at line 2548 of file xarm_api.cc.

int XArmAPI::robotiq_set_activate ( unsigned char  ret_data[6] = NULL)

Definition at line 2551 of file xarm_api.cc.

int XArmAPI::robotiq_set_position ( unsigned char  pos,
unsigned char  speed = 0xFF,
unsigned char  force = 0xFF,
bool  wait = true,
fp32  timeout = 5,
unsigned char  ret_data[6] = NULL 
)

Definition at line 2555 of file xarm_api.cc.

int XArmAPI::robotiq_set_position ( unsigned char  pos,
bool  wait = true,
fp32  timeout = 5,
unsigned char  ret_data[6] = NULL 
)

Definition at line 2571 of file xarm_api.cc.

int XArmAPI::robotiq_set_position ( unsigned char  pos,
bool  wait = true,
unsigned char  ret_data[6] = NULL 
)

Definition at line 2574 of file xarm_api.cc.

int XArmAPI::robotiq_set_position ( unsigned char  pos,
unsigned char  ret_data[6] = NULL 
)

Definition at line 2578 of file xarm_api.cc.

int XArmAPI::save_conf ( void  )

Definition at line 1453 of file xarm_api.cc.

int XArmAPI::save_record_trajectory ( char *  filename,
float  timeout = 10 
)

Definition at line 1912 of file xarm_api.cc.

int XArmAPI::set_bio_gripper_enable ( bool  enable,
bool  wait = true,
fp32  timeout = 3 
)

Definition at line 2670 of file xarm_api.cc.

int XArmAPI::set_bio_gripper_speed ( int  speed)

Definition at line 2679 of file xarm_api.cc.

int XArmAPI::set_cgpio_analog ( int  ionum,
fp32  value 
)

Definition at line 1797 of file xarm_api.cc.

int XArmAPI::set_cgpio_analog_with_xyz ( int  ionum,
float  value,
float  xyz[3],
float  tol_r 
)

Definition at line 2271 of file xarm_api.cc.

int XArmAPI::set_cgpio_digital ( int  ionum,
int  value,
float  delay_sec = 0 
)

Definition at line 1784 of file xarm_api.cc.

int XArmAPI::set_cgpio_digital_input_function ( int  ionum,
int  fun 
)

Definition at line 1810 of file xarm_api.cc.

int XArmAPI::set_cgpio_digital_output_function ( int  ionum,
int  fun 
)

Definition at line 1816 of file xarm_api.cc.

int XArmAPI::set_cgpio_digital_with_xyz ( int  ionum,
int  value,
float  xyz[3],
float  tol_r 
)

Definition at line 2264 of file xarm_api.cc.

int XArmAPI::set_collision_rebound ( bool  on)

Definition at line 1882 of file xarm_api.cc.

int XArmAPI::set_collision_sensitivity ( int  sensitivity)

Definition at line 1430 of file xarm_api.cc.

int XArmAPI::set_collision_tool_model ( int  tool_type,
int  n = 0,
  ... 
)

Definition at line 2807 of file xarm_api.cc.

int XArmAPI::set_counter_increase ( void  )

Definition at line 2250 of file xarm_api.cc.

int XArmAPI::set_counter_reset ( void  )

Definition at line 2243 of file xarm_api.cc.

int XArmAPI::set_fence_mode ( bool  on)
inline

Definition at line 980 of file xarm_api.h.

int XArmAPI::set_fense_mode ( bool  on)

Definition at line 1877 of file xarm_api.cc.

int XArmAPI::set_gravity_direction ( fp32  gravity_dir[3])

Definition at line 1442 of file xarm_api.cc.

int XArmAPI::set_gripper_enable ( bool  enable)

Definition at line 1516 of file xarm_api.cc.

int XArmAPI::set_gripper_mode ( int  mode)

Definition at line 1527 of file xarm_api.cc.

int XArmAPI::set_gripper_position ( fp32  pos,
bool  wait = false,
fp32  timeout = 10 
)

Definition at line 1694 of file xarm_api.cc.

int XArmAPI::set_gripper_speed ( fp32  speed)

Definition at line 1537 of file xarm_api.cc.

int XArmAPI::set_joint_jerk ( fp32  jerk)

Definition at line 1502 of file xarm_api.cc.

int XArmAPI::set_joint_maxacc ( fp32  acc)

Definition at line 1509 of file xarm_api.cc.

int XArmAPI::set_mode ( int  mode)

Definition at line 1066 of file xarm_api.cc.

int XArmAPI::set_pause_time ( fp32  sltime)

Definition at line 1107 of file xarm_api.cc.

int XArmAPI::set_position ( fp32  pose[6],
fp32  radius = -1,
fp32  speed = 0,
fp32  acc = 0,
fp32  mvtime = 0,
bool  wait = false,
fp32  timeout = NO_TIMEOUT 
)

Definition at line 1173 of file xarm_api.cc.

int XArmAPI::set_position ( fp32  pose[6],
fp32  radius = -1,
bool  wait = false,
fp32  timeout = NO_TIMEOUT 
)

Definition at line 1202 of file xarm_api.cc.

int XArmAPI::set_position ( fp32  pose[6],
bool  wait = false,
fp32  timeout = NO_TIMEOUT 
)

Definition at line 1206 of file xarm_api.cc.

int XArmAPI::set_position_aa ( fp32  pose[6],
fp32  speed = 0,
fp32  acc = 0,
fp32  mvtime = 0,
bool  is_tool_coord = false,
bool  relative = false,
bool  wait = false,
fp32  timeout = NO_TIMEOUT 
)

Definition at line 2288 of file xarm_api.cc.

int XArmAPI::set_position_aa ( fp32  pose[6],
bool  is_tool_coord = false,
bool  relative = false,
bool  wait = false,
fp32  timeout = NO_TIMEOUT 
)

Definition at line 2309 of file xarm_api.cc.

int XArmAPI::set_reduced_joint_range ( float  jrange[14])

Definition at line 1868 of file xarm_api.cc.

int XArmAPI::set_reduced_max_joint_speed ( float  speed)

Definition at line 1837 of file xarm_api.cc.

int XArmAPI::set_reduced_max_tcp_speed ( float  speed)

Definition at line 1832 of file xarm_api.cc.

int XArmAPI::set_reduced_mode ( bool  on)

Definition at line 1827 of file xarm_api.cc.

int XArmAPI::set_reduced_tcp_boundary ( int  boundary[6])

Definition at line 1863 of file xarm_api.cc.

int XArmAPI::set_report_tau_or_i ( int  tau_or_i = 0)

Definition at line 2792 of file xarm_api.cc.

int XArmAPI::set_self_collision_detection ( bool  on)

Definition at line 2802 of file xarm_api.cc.

int XArmAPI::set_servo_angle ( fp32  angles[7],
fp32  speed = 0,
fp32  acc = 0,
fp32  mvtime = 0,
bool  wait = false,
fp32  timeout = NO_TIMEOUT,
fp32  radius = -1 
)

Definition at line 1237 of file xarm_api.cc.

int XArmAPI::set_servo_angle ( fp32  angles[7],
bool  wait = false,
fp32  timeout = NO_TIMEOUT,
fp32  radius = -1 
)

Definition at line 1267 of file xarm_api.cc.

int XArmAPI::set_servo_angle ( int  servo_id,
fp32  angle,
fp32  speed = 0,
fp32  acc = 0,
fp32  mvtime = 0,
bool  wait = false,
fp32  timeout = NO_TIMEOUT,
fp32  radius = -1 
)

Definition at line 1271 of file xarm_api.cc.

int XArmAPI::set_servo_angle ( int  servo_id,
fp32  angle,
bool  wait = false,
fp32  timeout = NO_TIMEOUT,
fp32  radius = -1 
)

Definition at line 1277 of file xarm_api.cc.

int XArmAPI::set_servo_angle_j ( fp32  angles[7],
fp32  speed = 0,
fp32  acc = 0,
fp32  mvtime = 0 
)

Definition at line 1281 of file xarm_api.cc.

int XArmAPI::set_servo_attach ( int  servo_id)

Definition at line 1071 of file xarm_api.cc.

int XArmAPI::set_servo_cartesian ( fp32  pose[6],
fp32  speed = 0,
fp32  acc = 0,
fp32  mvtime = 0,
bool  is_tool_coord = false 
)

Definition at line 1290 of file xarm_api.cc.

int XArmAPI::set_servo_cartesian_aa ( fp32  pose[6],
fp32  speed = 0,
fp32  acc = 0,
bool  is_tool_coord = false,
bool  relative = false 
)

Definition at line 2313 of file xarm_api.cc.

int XArmAPI::set_servo_cartesian_aa ( fp32  pose[6],
bool  is_tool_coord = false,
bool  relative = false 
)

Definition at line 2322 of file xarm_api.cc.

int XArmAPI::set_servo_detach ( int  servo_id)

Definition at line 1077 of file xarm_api.cc.

int XArmAPI::set_simulation_robot ( bool  on)

Definition at line 2828 of file xarm_api.cc.

int XArmAPI::set_state ( int  state)

Definition at line 1045 of file xarm_api.cc.

int XArmAPI::set_suction_cup ( bool  on,
bool  wait = false,
float  timeout = 3,
float  delay_sec = 0 
)

Definition at line 2128 of file xarm_api.cc.

int XArmAPI::set_tcp_jerk ( fp32  jerk)

Definition at line 1488 of file xarm_api.cc.

int XArmAPI::set_tcp_load ( fp32  weight,
fp32  center_of_gravity[3] 
)

Definition at line 1469 of file xarm_api.cc.

int XArmAPI::set_tcp_maxacc ( fp32  acc)

Definition at line 1495 of file xarm_api.cc.

int XArmAPI::set_tcp_offset ( fp32  pose_offset[6])

Definition at line 1458 of file xarm_api.cc.

int XArmAPI::set_teach_sensitivity ( int  sensitivity)

Definition at line 1436 of file xarm_api.cc.

int XArmAPI::set_tgpio_digital ( int  ionum,
int  value,
float  delay_sec = 0 
)

Definition at line 1734 of file xarm_api.cc.

int XArmAPI::set_tgpio_digital_with_xyz ( int  ionum,
int  value,
float  xyz[3],
float  tol_r 
)

Definition at line 2257 of file xarm_api.cc.

int XArmAPI::set_tgpio_modbus_baudrate ( int  baud)

Definition at line 2769 of file xarm_api.cc.

int XArmAPI::set_tgpio_modbus_timeout ( int  timeout)

Definition at line 2764 of file xarm_api.cc.

int XArmAPI::set_timeout ( fp32  timeout)

Definition at line 943 of file xarm_api.cc.

int XArmAPI::set_tool_position ( fp32  pose[6],
fp32  speed = 0,
fp32  acc = 0,
fp32  mvtime = 0,
bool  wait = false,
fp32  timeout = NO_TIMEOUT 
)

Definition at line 1210 of file xarm_api.cc.

int XArmAPI::set_tool_position ( fp32  pose[6],
bool  wait = false,
fp32  timeout = NO_TIMEOUT 
)

Definition at line 1232 of file xarm_api.cc.

int XArmAPI::set_vacuum_gripper ( bool  on,
bool  wait = false,
float  timeout = 3,
float  delay_sec = 0 
)
inline

Definition at line 877 of file xarm_api.h.

int XArmAPI::set_world_offset ( float  pose_offset[6])

Definition at line 1887 of file xarm_api.cc.

int XArmAPI::shutdown_system ( int  value = 1)

Definition at line 964 of file xarm_api.cc.

int XArmAPI::start_record_trajectory ( void  )

Definition at line 1897 of file xarm_api.cc.

int XArmAPI::stop_record_trajectory ( char *  filename = NULL)

Definition at line 1902 of file xarm_api.cc.

int XArmAPI::vc_set_cartesian_velocity ( fp32  speeds[6],
bool  is_tool_coord = false 
)

Definition at line 2842 of file xarm_api.cc.

int XArmAPI::vc_set_joint_velocity ( fp32  speeds[7],
bool  is_sync = true 
)

Definition at line 2833 of file xarm_api.cc.

Member Data Documentation

fp32* XArmAPI::angles

Definition at line 113 of file xarm_api.h.

bool XArmAPI::arm_type_is_1300_
private

Definition at line 1518 of file xarm_api.h.

int XArmAPI::axis

Definition at line 96 of file xarm_api.h.

int XArmAPI::bio_gripper_error_code_
private

Definition at line 1548 of file xarm_api.h.

bool XArmAPI::bio_gripper_is_enabled_
private

Definition at line 1545 of file xarm_api.h.

int XArmAPI::bio_gripper_speed_
private

Definition at line 1543 of file xarm_api.h.

bool XArmAPI::callback_in_thread_
private

Definition at line 1505 of file xarm_api.h.

int XArmAPI::cgpio_code

Definition at line 145 of file xarm_api.h.

int* XArmAPI::cgpio_input_conf

Definition at line 150 of file xarm_api.h.

int* XArmAPI::cgpio_input_digitals

Definition at line 146 of file xarm_api.h.

fp32* XArmAPI::cgpio_intput_anglogs

Definition at line 148 of file xarm_api.h.

fp32* XArmAPI::cgpio_output_anglogs

Definition at line 149 of file xarm_api.h.

int* XArmAPI::cgpio_output_conf

Definition at line 151 of file xarm_api.h.

int* XArmAPI::cgpio_output_digitals

Definition at line 147 of file xarm_api.h.

int XArmAPI::cgpio_state

Definition at line 144 of file xarm_api.h.

bool XArmAPI::check_cmdnum_limit_
private

Definition at line 1501 of file xarm_api.h.

bool XArmAPI::check_is_pause_
private

Definition at line 1504 of file xarm_api.h.

bool XArmAPI::check_is_ready_
private

Definition at line 1503 of file xarm_api.h.

bool XArmAPI::check_joint_limit_
private

Definition at line 1500 of file xarm_api.h.

bool XArmAPI::check_robot_sn_
private

Definition at line 1502 of file xarm_api.h.

bool XArmAPI::check_tcp_limit_
private

Definition at line 1499 of file xarm_api.h.

int XArmAPI::cmd_num

Definition at line 86 of file xarm_api.h.

fp32 XArmAPI::cmd_timeout_
private

Definition at line 1555 of file xarm_api.h.

std::vector<void(*)(int)> XArmAPI::cmdnum_changed_callbacks_
private

Definition at line 1568 of file xarm_api.h.

fp32* XArmAPI::collision_model_params

Definition at line 143 of file xarm_api.h.

int XArmAPI::collision_sensitivity

Definition at line 93 of file xarm_api.h.

int XArmAPI::collision_tool_type

Definition at line 142 of file xarm_api.h.

std::condition_variable XArmAPI::cond_
private

Definition at line 1510 of file xarm_api.h.

std::vector<void(*)(bool, bool)> XArmAPI::connect_changed_callbacks_
private

Definition at line 1563 of file xarm_api.h.

bool XArmAPI::control_box_type_is_1300_
private

Definition at line 1519 of file xarm_api.h.

UxbusCmd* XArmAPI::core

Definition at line 134 of file xarm_api.h.

int XArmAPI::count

Definition at line 129 of file xarm_api.h.

std::vector<void(*)(int)> XArmAPI::count_changed_callbacks_
private

Definition at line 1570 of file xarm_api.h.

fp32* XArmAPI::currents

Definition at line 139 of file xarm_api.h.

bool XArmAPI::default_is_radian

Definition at line 132 of file xarm_api.h.

int XArmAPI::device_type

Definition at line 95 of file xarm_api.h.

int XArmAPI::error_code

Definition at line 90 of file xarm_api.h.

std::vector<void(*)(int, int)> XArmAPI::error_warn_changed_callbacks_
private

Definition at line 1567 of file xarm_api.h.

unsigned char* XArmAPI::gpio_reset_config

Definition at line 130 of file xarm_api.h.

fp32* XArmAPI::gravity_direction

Definition at line 122 of file xarm_api.h.

bool XArmAPI::gripper_is_enabled_
private

Definition at line 1544 of file xarm_api.h.

int XArmAPI::gripper_version_numbers_[3]
private

Definition at line 1550 of file xarm_api.h.

bool XArmAPI::ignore_error_
private

Definition at line 1516 of file xarm_api.h.

bool XArmAPI::ignore_state_
private

Definition at line 1517 of file xarm_api.h.

int XArmAPI::is_collision_detection

Definition at line 141 of file xarm_api.h.

bool XArmAPI::is_first_report_
private

Definition at line 1514 of file xarm_api.h.

bool XArmAPI::is_old_protocol_
private

Definition at line 1513 of file xarm_api.h.

bool XArmAPI::is_ready_
private

Definition at line 1511 of file xarm_api.h.

int XArmAPI::is_simulation_robot

Definition at line 140 of file xarm_api.h.

bool XArmAPI::is_sync_
private

Definition at line 1515 of file xarm_api.h.

bool XArmAPI::is_tcp_
private

Definition at line 1512 of file xarm_api.h.

fp32* XArmAPI::joint_acc_limit

Definition at line 116 of file xarm_api.h.

fp32 XArmAPI::joint_jerk

Definition at line 105 of file xarm_api.h.

fp32* XArmAPI::joint_speed_limit

Definition at line 115 of file xarm_api.h.

fp32* XArmAPI::joints_torque

Definition at line 87 of file xarm_api.h.

long long XArmAPI::last_report_time_
private

Definition at line 1552 of file xarm_api.h.

fp32* XArmAPI::last_used_angles

Definition at line 114 of file xarm_api.h.

fp32 XArmAPI::last_used_joint_acc

Definition at line 118 of file xarm_api.h.

fp32 XArmAPI::last_used_joint_speed

Definition at line 117 of file xarm_api.h.

fp32* XArmAPI::last_used_position

Definition at line 120 of file xarm_api.h.

fp32 XArmAPI::last_used_tcp_acc

Definition at line 111 of file xarm_api.h.

fp32 XArmAPI::last_used_tcp_speed

Definition at line 110 of file xarm_api.h.

int XArmAPI::major_version_number_
private

Definition at line 1521 of file xarm_api.h.

int XArmAPI::master_id

Definition at line 97 of file xarm_api.h.

int XArmAPI::max_cmdnum_
private

Definition at line 1506 of file xarm_api.h.

fp32 XArmAPI::max_joint_acc_
private

Definition at line 1536 of file xarm_api.h.

fp32 XArmAPI::max_joint_speed_
private

Definition at line 1534 of file xarm_api.h.

long long XArmAPI::max_report_interval_
private

Definition at line 1553 of file xarm_api.h.

fp32 XArmAPI::max_rot_acc

Definition at line 107 of file xarm_api.h.

fp32 XArmAPI::max_tcp_acc_
private

Definition at line 1532 of file xarm_api.h.

fp32 XArmAPI::max_tcp_speed_
private

Definition at line 1530 of file xarm_api.h.

fp32 XArmAPI::min_joint_acc_
private

Definition at line 1535 of file xarm_api.h.

fp32 XArmAPI::min_joint_speed_
private

Definition at line 1533 of file xarm_api.h.

fp32 XArmAPI::min_tcp_acc_
private

Definition at line 1531 of file xarm_api.h.

fp32 XArmAPI::min_tcp_speed_
private

Definition at line 1529 of file xarm_api.h.

int XArmAPI::minor_version_number_
private

Definition at line 1522 of file xarm_api.h.

int XArmAPI::modbus_baud_
private

Definition at line 1542 of file xarm_api.h.

int XArmAPI::mode

Definition at line 85 of file xarm_api.h.

std::vector<void(*)(int)> XArmAPI::mode_changed_callbacks_
private

Definition at line 1565 of file xarm_api.h.

bool* XArmAPI::motor_brake_states

Definition at line 88 of file xarm_api.h.

bool* XArmAPI::motor_enable_states

Definition at line 89 of file xarm_api.h.

int XArmAPI::motor_fid

Definition at line 100 of file xarm_api.h.

int XArmAPI::motor_tid

Definition at line 99 of file xarm_api.h.

int XArmAPI::mt_able_
private

Definition at line 1528 of file xarm_api.h.

int XArmAPI::mt_brake_
private

Definition at line 1527 of file xarm_api.h.

std::vector<void(*)(int, int)> XArmAPI::mtable_mtbrake_changed_callbacks_
private

Definition at line 1566 of file xarm_api.h.

std::mutex XArmAPI::mutex_
private

Definition at line 1509 of file xarm_api.h.

fp32 XArmAPI::p2p_msg_[5]
private

Definition at line 1539 of file xarm_api.h.

ThreadPool XArmAPI::pool
private

Definition at line 1560 of file xarm_api.h.

std::string XArmAPI::port_
private

Definition at line 1498 of file xarm_api.h.

fp32* XArmAPI::position

Definition at line 119 of file xarm_api.h.

fp32* XArmAPI::realtime_joint_speeds

Definition at line 125 of file xarm_api.h.

fp32 XArmAPI::realtime_tcp_speed

Definition at line 124 of file xarm_api.h.

std::vector<void(*)(const fp32*, const fp32*)> XArmAPI::report_location_callbacks_
private

Definition at line 1562 of file xarm_api.h.

std::thread XArmAPI::report_thread_
private

Definition at line 1508 of file xarm_api.h.

int XArmAPI::revision_version_number_
private

Definition at line 1523 of file xarm_api.h.

int XArmAPI::robotiq_error_code_
private

Definition at line 1549 of file xarm_api.h.

bool XArmAPI::robotiq_is_activated_
private

Definition at line 1546 of file xarm_api.h.

struct RobotIqStatus XArmAPI::robotiq_status

Definition at line 136 of file xarm_api.h.

fp32 XArmAPI::rot_jerk

Definition at line 106 of file xarm_api.h.

fp32 XArmAPI::rot_msg_[2]
private

Definition at line 1540 of file xarm_api.h.

int XArmAPI::slave_id

Definition at line 98 of file xarm_api.h.

long long XArmAPI::sleep_finish_time_
private

Definition at line 1525 of file xarm_api.h.

unsigned char XArmAPI::sn[40]

Definition at line 102 of file xarm_api.h.

int XArmAPI::state

Definition at line 84 of file xarm_api.h.

std::vector<void(*)(int)> XArmAPI::state_changed_callbacks_
private

Definition at line 1564 of file xarm_api.h.

SerialPort* XArmAPI::stream_ser_
private

Definition at line 1559 of file xarm_api.h.

SocketPort* XArmAPI::stream_tcp_
private

Definition at line 1557 of file xarm_api.h.

SocketPort* XArmAPI::stream_tcp_report_
private

Definition at line 1558 of file xarm_api.h.

int XArmAPI::sv3msg_[16]
private

Definition at line 1537 of file xarm_api.h.

fp32* XArmAPI::tcp_acc_limit

Definition at line 109 of file xarm_api.h.

fp32 XArmAPI::tcp_jerk

Definition at line 104 of file xarm_api.h.

fp32* XArmAPI::tcp_load

Definition at line 92 of file xarm_api.h.

fp32* XArmAPI::tcp_offset

Definition at line 121 of file xarm_api.h.

fp32* XArmAPI::tcp_speed_limit

Definition at line 108 of file xarm_api.h.

int XArmAPI::teach_sensitivity

Definition at line 94 of file xarm_api.h.

std::vector<void(*)(const fp32*)> XArmAPI::temperature_changed_callbacks_
private

Definition at line 1569 of file xarm_api.h.

fp32* XArmAPI::temperatures

Definition at line 128 of file xarm_api.h.

fp32 XArmAPI::trs_msg_[5]
private

Definition at line 1538 of file xarm_api.h.

unsigned char XArmAPI::version[30]

Definition at line 101 of file xarm_api.h.

int* XArmAPI::version_number

Definition at line 103 of file xarm_api.h.

fp32* XArmAPI::voltages

Definition at line 138 of file xarm_api.h.

int XArmAPI::warn_code

Definition at line 91 of file xarm_api.h.

fp32* XArmAPI::world_offset

Definition at line 127 of file xarm_api.h.

int XArmAPI::xarm_gripper_error_code_
private

Definition at line 1547 of file xarm_api.h.


The documentation for this class was generated from the following files:


xarm_api
Author(s):
autogenerated on Sat May 8 2021 02:51:23