62 ROS_ERROR(
"Failed to call service motion_ctrl");
78 ROS_ERROR(
"Failed to call service set_state");
93 ROS_ERROR(
"Failed to call service set_mode");
108 ROS_ERROR(
"Failed to call service clear_err");
123 ROS_ERROR(
"Failed to call service get_err");
143 ROS_ERROR(
"Failed to call service move_servoj");
163 ROS_ERROR(
"Failed to call service move_servo_cart");
170 if(tcp_offset.size() != 6)
172 ROS_ERROR(
"Set tcp offset service parameter should be 6-element Cartesian offset!");
189 ROS_ERROR(
"Failed to call service set_tcp_offset");
208 ROS_ERROR(
"Failed to call service set_load");
225 ROS_ERROR(
"Failed to call service go_home");
243 ROS_ERROR(
"Failed to call service move_joint");
261 ROS_ERROR(
"Failed to call service move_line");
266 int XArmROSClient::moveLineB(
int num_of_pnts,
const std::vector<float> cart_cmds[],
float cart_vel_mm,
float cart_acc_mm,
float radii)
273 for(
int i=0; i<num_of_pnts; i++)
284 ROS_ERROR(
"Failed to call service move_lineb");
302 ROS_ERROR(
"Failed to call service config_tool_modbus");
309 for(
int i=0; i<send_len; i++)
320 for(
int j=0; j<recv_len; j++)
333 ROS_ERROR(
"Failed to call service send_tool_modbus");
345 ROS_INFO(
"gripper_move: %f\n", pulse);
350 ROS_ERROR(
"Failed to call service gripper_move");
366 ROS_ERROR(
"Failed to call service gripper_move");
382 ROS_ERROR(
"Failed to call service gripper_move");
399 ROS_ERROR(
"Failed to call service velo_move_joint");
415 ROS_ERROR(
"Failed to call service velo_move_line");
int setState(short state)
ServiceClient serviceClient(const std::string &service_name, bool persistent=false, const M_string &header_values=M_string())
ros::ServiceClient move_joint_client_
xarm_msgs::SetToolModbus set_modbus_msg_
int setServoCartisian(const std::vector< float > &cart_cmd)
xarm_msgs::ConfigToolModbus cfg_modbus_msg_
ros::ServiceClient move_line_client_
ros::ServiceClient set_state_client_
xarm_msgs::SetAxis set_axis_srv_
ros::ServiceClient move_servoj_client_
ros::ServiceClient velo_move_line_client_
ros::ServiceClient motion_ctrl_client_
int motionEnable(short en)
xarm_msgs::MoveVelo move_velo_srv_
bool call(MReq &req, MRes &res)
ros::ServiceClient config_modbus_client_
xarm_msgs::Move servo_cart_msg_
int veloMoveLine(const std::vector< float > &line_v, bool is_tool_coord=false)
xarm_msgs::SetInt16 set_int16_srv_
xarm_msgs::GripperState gripper_state_msg_
xarm_msgs::GetErr get_err_srv_
int moveJoint(const std::vector< float > &joint_cmd, float jnt_vel_rad, float jnt_acc_rad=15)
ros::ServiceClient gripper_state_client_
xarm_msgs::ClearErr clear_err_srv_
int config_tool_modbus(int baud_rate, int time_out_ms)
ros::ServiceClient move_lineb_client_
int gripperConfig(float pulse_vel)
xarm_msgs::Move move_srv_
xarm_msgs::TCPOffset offset_srv_
ros::ServiceClient set_load_client_
ros::ServiceClient gripper_config_client_
const std::string & getNamespace() const
xarm_msgs::Move servoj_msg_
xarm_msgs::SetLoad set_load_srv_
ros::ServiceClient set_mode_client_
int veloMoveJoint(const std::vector< float > &jnt_v, bool is_sync=true)
ros::ServiceClient move_servo_cart_client_
int goHome(float jnt_vel_rad, float jnt_acc_rad=15)
ros::ServiceClient gripper_move_client_
int send_tool_modbus(unsigned char *data, int send_len, unsigned char *recv_data=NULL, int recv_len=0)
int moveLineB(int num_of_pnts, const std::vector< float > cart_cmds[], float cart_vel_mm, float cart_acc_mm=500, float radii=0)
xarm_msgs::GripperMove gripper_move_msg_
int setLoad(float mass, const std::vector< float > ¢er_of_mass)
int getGripperState(float *curr_pulse, int *curr_err)
ros::ServiceClient send_modbus_client_
void init(ros::NodeHandle &nh)
ros::ServiceClient set_tcp_offset_client_
ros::ServiceClient clear_err_client_
int setTCPOffset(const std::vector< float > &tcp_offset)
int gripperMove(float pulse)
ros::ServiceClient go_home_client_
ros::ServiceClient get_err_client_
ros::ServiceClient velo_move_joint_client_
int moveLine(const std::vector< float > &cart_cmd, float cart_vel_mm, float cart_acc_mm=500)
ROSCPP_DECL bool waitForService(const std::string &service_name, int32_t timeout)
int setServoJ(const std::vector< float > &joint_cmd)
xarm_msgs::GripperConfig gripper_config_msg_