|
|
@ -234,7 +234,8 @@ int32_t IntelligentWindingRobotCtrl::device_reset() { |
|
|
|
m22_scissors_move_reset_pos(); |
|
|
|
m23_laxian_motor_move_to_reset_pos(); |
|
|
|
WAIT_MODULES_IDLE(12, 14, 15, 16, 22, 23); |
|
|
|
|
|
|
|
m22_scissors_move_idle_pos(); |
|
|
|
wait_module_idle(22); |
|
|
|
/**
|
|
|
|
* @brief 优化复位逻辑,超时复位失败,报警 |
|
|
|
*/ |
|
|
@ -284,8 +285,9 @@ int32_t IntelligentWindingRobotCtrl::m16_xianlajin_move_to_cook_lineend_low_pos( |
|
|
|
int32_t IntelligentWindingRobotCtrl::m21_arm_hook_claws_reset() { return m_dm->motor_move_to_zero_backward(21, 0, 0, 0, 0); } |
|
|
|
int32_t IntelligentWindingRobotCtrl::m21_arm_hook_claws_move_to_half_pos() { return m_dm->motor_move_to(21, cfg.m21_arm_hook_claws_half_pos, 0, 0); } |
|
|
|
int32_t IntelligentWindingRobotCtrl::m21_arm_hook_claws_move_to_full_pos() { return m_dm->motor_move_to(21, cfg.m21_arm_hook_claws_full_pos, 0, 0); } |
|
|
|
int32_t IntelligentWindingRobotCtrl::m22_scissors_move_reset_pos() { return 0; } |
|
|
|
int32_t IntelligentWindingRobotCtrl::m22_scissors_cut() { return m_dm->motor_rotate_with_torque(22, 1, 4095); } |
|
|
|
int32_t IntelligentWindingRobotCtrl::m22_scissors_move_reset_pos() { return m_dm->motor_move_to_zero_backward(22, 0, 0, 0, 0); } |
|
|
|
int32_t IntelligentWindingRobotCtrl::m22_scissors_move_idle_pos() { return m_dm->motor_move_to(22, 1250, 0, 0); } |
|
|
|
int32_t IntelligentWindingRobotCtrl::m22_scissors_cut() { return m_dm->motor_move_to(22, 1, 2070); } |
|
|
|
int32_t IntelligentWindingRobotCtrl::m23_laxian_motor_move_to_reset_pos() { return m_dm->motor_move_to_torque(23, 2040, 200, 0); } |
|
|
|
int32_t IntelligentWindingRobotCtrl::m23_laxian_motor_move_to_tight_line_pos() { return m_dm->motor_rotate_with_torque(23, -1, 40); } |
|
|
|
int32_t IntelligentWindingRobotCtrl::m4_zreset() { m_dm->motor_move_to_zero_backward(4, 450, 300, 2000, 0); } |
|
|
@ -303,7 +305,10 @@ int32_t IntelligentWindingRobotCtrl::m4_zmove_to(int32_t pos) { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
int32_t IntelligentWindingRobotCtrl::substep_zaxis_do_bullet_action(take_bullet_pos_type_t zpos, take_bullet_acktion_t take_bullet_acktion, take_bullet_line_acktion_t take_bullet_line_acktion) { |
|
|
|
int32_t IntelligentWindingRobotCtrl::substep_zaxis_do_bullet_action(take_bullet_pos_type_t zpos, //
|
|
|
|
take_bullet_acktion_t take_bullet_acktion, //
|
|
|
|
take_bullet_line_acktion_t take_bullet_line_acktion, //
|
|
|
|
function<void()> bottomoperation) { |
|
|
|
if (take_bullet_line_acktion == kTakeLine) { |
|
|
|
m11_arm_jiaxian_move_to_reset_pos(); |
|
|
|
} else if (take_bullet_line_acktion == kReleaseLine) { |
|
|
@ -334,6 +339,11 @@ int32_t IntelligentWindingRobotCtrl::substep_zaxis_do_bullet_action(take_bullet_ |
|
|
|
m21_arm_hook_claws_reset(); |
|
|
|
} |
|
|
|
WAIT_MODULES_IDLE(11, 21); |
|
|
|
|
|
|
|
if (bottomoperation) { |
|
|
|
bottomoperation(); |
|
|
|
} |
|
|
|
|
|
|
|
m4_zmove_to(0); |
|
|
|
WAIT_MODULES_IDLE(4); |
|
|
|
} |
|
|
@ -623,6 +633,16 @@ mini_servo_move_to 6 1850 600 500 |
|
|
|
m16_xianlajin_move_to_cook_lineend_low_pos(); //
|
|
|
|
} |
|
|
|
|
|
|
|
int32_t IntelligentWindingRobotCtrl::step_winding_take_bullet_from_cooking_to_origin_pos(int bulletindex) { |
|
|
|
/**
|
|
|
|
* @brief |
|
|
|
* |
|
|
|
* 1. 夹住线 |
|
|
|
* 2. |
|
|
|
* |
|
|
|
*/ |
|
|
|
} |
|
|
|
|
|
|
|
int32_t IntelligentWindingRobotCtrl::main_shaft_run() { |
|
|
|
ZLOGI(TAG, "main_shaft_run"); |
|
|
|
DO(m_dm->motor_rotate_acctime(2, 1, 1000, 10000)); |
|
|
|