<<<<<<< HEAD
机械臂异常查看以及处理方法
当机械臂未成功执行运动指令时,可以在python终端中查询到对应的异常信息, 例如
1 读取机器人状态
1.1 状态反馈解析
正常情况下此接口反馈全0,读取机器人状态,左右臂不一致,具体如下:
m.get_robot_status() #读取机器人状态
左臂返回解析:
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]表示:
机器人未在运动,无关节超限,无关节硬件报错、无关节软件报错
各个值完整解析如下:</br> [保留,是否正在运动,J1是否超限,J2是否超限,J3是否超限,J4是否超限,J5是否超限,J6是否超限,J7是否超限,J1是否电机硬件报错,J2是否电机硬件报错,J3是否电机硬件报错,J4是否电机硬件报错,J5是否电机硬件报错,J6是否电机硬件报错,J7是否电机硬件报错,J1是否软件报错,J2是否电机软件报错,J3是否软件报错,J4是否软件报错,J5是否软件报错,J6是否软件报错,J7是否软件报错]
案例如下:
[0,1,0,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0]表示:
机器人在运动时报错,J4报控制错误
[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]表示:
机器人J2超限
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0]表示:
机器人J5线路异常--接收报错
右臂返回解析:
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]表示:
机器人未在运动,无关节超限,无关节硬件报错、无关节软件报错
各个值完整解析如下:</br> [保留,是否正在运动,J1是否超限,J2是否超限,J3是否超限,J4是否超限,J5是否超限,J6是否超限,J7是否超限,J13是否超限,J1是否硬件报错,J2是否硬件报错,J3是否硬件报错,J4是否硬件报错,J5是否硬件报错,J6是否硬件报错,J7是否硬件报错,J13是否硬件报错,J11是否硬件报错,J12是否硬件报错,J1是否软件报错,J2是否电机软件报错,J3是否软件报错,J4是否软件报错,J5是否软件报错,J6是否软件报错,J7是否软件报错,J13是否软件报错]
案例如下:
[0,1,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0]表示:
机器人在运动时报错,J4报控制错误
[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]表示:
机器人J2超限
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0]表示:
机器人J5线路异常--接收报错
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0]表示:
机器人双目、脖子无通信
1.2 异常解决
关节超限
关节超限时,可使用以下解决方法之一:
执行超限回零
m.over_limit_return_zero() #机器人会以较慢速度回到原点
执行关节放松,手动将关节移动到限位内
m.release_all_servo()
关节硬件报错
大部分硬件报错可以使用异常恢复,m.servo_restore(ID),若使用异常恢复或者机器人重启后,仍然频繁出现此问题,请联系我方工程师,具体各关节硬件详细报错见图1:
关节软件报错
软件上的错误反馈主要为:线路异常、can模块异常、编码器异常、掉使能等,当出现掉使能,请使用m.focus_all_servo()上使能再运动,其它异常,请联系我方工程师,具体各关节软件详细报错见图2、图3:
机器人处于运动状态,机器人无法运动
机器人处于运动状态,发送运动点位不响应,请先将机器人运动停止,执行m.stop()、m.resume(),如仍然无法继续运动,请联系我方工程师。
2 查看执行运动指令的反馈
2.1.运动异常
控制机械臂运动到超限位置
form pymycobot import Mercury
m = Mercury('/dev/ttyAMA1')
m.set_joint_max_angles(1,45) #设置1关节限位为45°
m.send_angle(1,50,10) #控制1关节旋转至50°
此时机械臂会在限位处停止运动,并显示以下信息:
错误:关节1临近限位,当前角度为45.535, 角度范围为: -165.0 ~ 45.0
处理方法:根据提示的角度范围避开软件限位
笛卡尔运动
m.send_angles([0.0, 0.0, 0.0, -90.0, 0.0, 89.999, 0.0], 10) #控制机械臂到起始姿态
m.send_coord(1,-200,10) #控制机械臂运动到x=-200的坐标位置
此时可以观测到机械臂执行到中途停止,同时显示以下信息:
错误:关节2临近限位,当前角度为-49.967, 角度范围为: -50.0 ~ 120.0
处理方法:根据提示的角度范围避开软件限位
m.send_coord(3,500,10) #控制机械臂运动到z=500的坐标位置
此时可以观测到机械臂执行到中途停止,同时显示以下信息:
错误:直线运动无相邻解。请检查机器人手臂跨度是否接近极限。当前臂展为370, 最大的臂展为440
处理方法:控制机械臂收缩
m.send_angles([0.0, 0.0, 0.0, -90.0, 0.0, 0, 0.0], 10) #更换初始姿态
m.send_coord(1,200,10) #控制机械臂运动到x=200的坐标位置
此时可以观测到机械臂未响应指令,同时显示以下信息:
错误:奇异位置无解。请使用send_angles()
方法离开该位置。在关节 6 处检测到奇点:0.0 度
处理方法:根据提示离开奇异位置
m.send_angle(6,90,10) #使用关节运动离开奇异位置
m.send_coord(1, 474, 10) #发送一组超出机械臂里程的坐标
此时可以观测到机械臂未响应指令,同时显示以下信息:
错误: 发送的坐标数据超出限位
处理方法:发送限位内坐标值
2.电机异常
固件版本 V1.0电机异常时,机械臂对运动指令无响应,此时终端中会显示对应的错误字,例如:
0x31(49):掉使能;
0x32(50):电机报错
0x33(51):电机编码器报错
出现掉使能错误,请上使能,执行以下程序:
m.focus_all_servos()
出现电机编码器报错,请查看当前跳变角度,执行程序见下方,然后整机断电,若仍然显示编码器异常,请联系我方工程师。
m.get_angles() #查看当前角度
出现电机报错后,执行下列程序
for i in range(1,8):
m.servo_restore(i) #清除电机报错
#重新上下电
m.power_off()
m.power_on()
若运动时仍然显示电机异常,请联系我方工程师。
3 使用注意
左臂执行power_off()后需要先执行power_on(),再右臂执行power_off()、power_on()启动机器人。
Robot Arm Exception Inspection and Handling Methods
When the robot arm fails to execute motion commands successfully, corresponding exception information can be queried in the Python terminal:
1 Check Robot Status
1.1 Status Feedback Analysis
Normally, this interface returns all zeros, indicating no issues. The robot status can be read, with feedback differing between the left and right arms, as detailed below:
Read Robot Status
m.get_robot_status() # Read robot status
Left Arm Status Explanation
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
represents:
The robot is not moving, with no joint limit violations, hardware errors, or software errors.
Each value corresponds to the following explanation.
[Reserved, Movement Status, J1 Limit Violation, J2 Limit Violation, J3 Limit Violation, J4 Limit Violation, J5 Limit Violation, J6 Limit Violation, J7 Limit Violation, J1 Hardware Error, J2 Hardware Error, J3 Hardware Error, J4 Hardware Error, J5 Hardware Error, J6 Hardware Error, J7 Hardware Error, J1 Software Error, J2 Software Error, J3 Software Error, J4 Software Error, J5 Software Error, J6 Software Error, J7 Software Error]
Examples:
[0,1,0,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0]
represents:
The robot encountered a control error on J4 while moving.
[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
represents:
Robot J2 overlimit.
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0]
represents:
Robot J5 circuit anomaly - reception error.
Right Arm Status Explanation
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
represents:
The robot is not moving, no joint overlimit, no joint hardware errors, no joint software errors.
The complete analysis of each value is as follows::
[Reserved, Is moving, J1 overlimit, J2 overlimit, J3 overlimit, J4 overlimit, J5 overlimit, J6 overlimit, J7 overlimit, J13 overlimit, J1 hardware error, J2 hardware error, J3 hardware error, J4 hardware error, J5 hardware error, J6 hardware error, J7 hardware error, J13 hardware error, J11 hardware error, J12 hardware error, J1 software error, J2 motor software error, J3 software error, J4 software error, J5 software error, J6 software error, J7 software error, J13 software error]
Examples:
[0,1,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
represents:
The robot reports an error while moving, J4 reports a control error.
[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
represents:
Robot J2 overlimit.
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0]
represents:
Robot J5 circuit anomaly - reception error.
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0]
represents:
Robot binoculars and neck communication error.
1.2 Error Resolution
Joint Overlimit
When a joint exceeds its limit, one of the following methods can be used to resolve it:
Perform overlimit return to zero:
The robot will return to the origin at a slower speed.
m.over_limit_return_zero()
Release the joint and manually move it back within the limit:
m.release_all_servo()
Joint Hardware Error
Most hardware errors can be recovered using an exception recovery method:
m.servo_restore(ID)
If the issue persists after using exception recovery or rebooting the robot, please contact our engineers. For detailed joint hardware errors, refer to Figure 1:
Joint Software Error
Software errors mainly include: circuit anomalies, CAN module anomalies, encoder anomalies, loss of enable, etc.
When there is a loss of enable, use the following to re-enable the servo before continuing movement:
m.focus_all_servo()
For other anomalies, please contact our engineers. Detailed joint software errors can be found in Figures 2 and 3:
Robot in Motion State, but Unable to Move
If the robot is in a motion state and does not respond to new motion commands, first stop the robot's motion:
m.stop()
m.resume()
If the robot still cannot move, please contact our engineers.
2 Check the feedback of executing motion commands
2.1 Motion Exceptions
Controlling the Robotic Arm to an Out-of-Range Position
form pymycobot import Mercury
m = Mercury('/dev/ttyAMA1')
m.set_joint_max_angles(1,45) # Set joint 1 limit to 45°
m.send_angle(1,50,10) # Control joint 1 to rotate to 50°
At this point, the robotic arm will stop at the limit position and display the following message:
Error: Joint 1 is close to the limit, current angle is 45.535, angle range: -165.0 ~ 45.0
Solution: Avoid software limit by following the indicated angle range.
Cartesian Motion
m.send_angles([0.0, 0.0, 0.0, -90.0, 0.0, 89.999, 0.0], 10) # Move the robotic arm to the initial posture
m.send_coord(1,-200,10) # Move the robotic arm to the coordinate position x = -200
At this point, the robotic arm stops mid-motion and displays the following message:
Error: Joint 2 is close to the limit, current angle is -49.967, angle range: -50.0 ~ 120.0
Solution: Avoid software limit by following the indicated angle range.
m.send_coord(3,500,10) # Move the robotic arm to the coordinate position z = 500
At this point, the robotic arm stops mid-motion and displays the following message:
Error: No adjacent solution for linear motion. Check if the arm span is near the limit. Current arm span is 370, maximum arm span is 440
Solution: Retract the robotic arm.
m.send_angles([0.0, 0.0, 0.0, -90.0, 0.0, 0, 0.0], 10) # Change initial posture
m.send_coord(1,200,10) # Move the robotic arm to the coordinate position x = 200
At this point, the robotic arm does not respond to the command and displays the following message:
Error: Singular position, no solution found. Use send_angles() method to leave this position. Singularity detected at joint 6: 0.0 degrees
Solution: Move out of the singular position as instructed.
m.send_angle(6,90,10) # Use joint motion to move out of the singular position
m.send_coord(1, 474, 10) # Send a set of coordinates that exceed the robotic arm’s range
At this point, the robotic arm does not respond to the command and displays the following message:
Error: Sent coordinate data is out of range
Solution: Send coordinate values within the limit.
2.2 Motion Exceptions
Controlling the Robotic Arm to an Out-of-Range Position
form pymycobot import Mercury
m = Mercury('/dev/ttyAMA1')
m.set_joint_max_angles(1,45) # Set joint 1 limit to 45°
m.send_angle(1,50,10) # Control joint 1 to rotate to 50°
At this point, the robotic arm will stop at the limit position and display the following message:
Error: Joint 1 is close to the limit, current angle is 45.535, angle range: -165.0 ~ 45.0
Solution: Avoid software limit by following the indicated angle range.
Cartesian Motion
m.send_angles([0.0, 0.0, 0.0, -90.0, 0.0, 89.999, 0.0], 10) # Move the robotic arm to the initial posture
m.send_coord(1,-200,10) # Move the robotic arm to the coordinate position x = -200
At this point, the robotic arm stops mid-motion and displays the following message:
Error: Joint 2 is close to the limit, current angle is -49.967, angle range: -50.0 ~ 120.0
Solution: Avoid software limit by following the indicated angle range.
m.send_coord(3,500,10) # Move the robotic arm to the coordinate position z = 500
At this point, the robotic arm stops mid-motion and displays the following message:
Error: No adjacent solution for linear motion. Check if the arm span is near the limit. Current arm span is 370, maximum arm span is 440
Solution: Retract the robotic arm.
m.send_angles([0.0, 0.0, 0.0, -90.0, 0.0, 0, 0.0], 10) # Change initial posture
m.send_coord(1,200,10) # Move the robotic arm to the coordinate position x = 200
At this point, the robotic arm does not respond to the command and displays the following message:
Error: Singular position, no solution found. Use send_angles() method to leave this position. Singularity detected at joint 6: 0.0 degrees
Solution: Move out of the singular position as instructed.
m.send_angle(6,90,10) # Use joint motion to move out of the singular position
m.send_coord(1, 474, 10) # Send a set of coordinates that exceed the robotic arm’s range
At this point, the robotic arm does not respond to the command and displays the following message:
Error: Sent coordinate data is out of range
Solution: Send coordinate values within the limit.
2.2 Motor Exceptions
In firmware version V1.0, when a motor exception occurs, the robotic arm does not respond to motion commands, and corresponding error codes are displayed in the terminal, such as:
0x31(49):Lost enabling;
0x32(50):Motor error;
0x33(51):Motor encoder error.
If the lost enabling error occurs, re-enable by executing the following program:
m.focus_all_servos()
If a motor encoder error occurs, check the current angle, execute the program below, then power off the device. If the encoder error persists, contact our engineers.
m.get_angles() # Check the current angles
After a motor error, run the following program:
for i in range(1,8):
m.servo_restore(i) # Clear motor error
# Power cycle the device
m.power_off()
m.power_on()
If a motor exception continues to display during motion, please contact our engineers.
3 Usage Note
After the left arm executes power_off(), you need to first execute power_on() before performing power_off() and power_on() for the right arm to start the robot.
5673ade8eb00a28794557125b7d1c8cd332434a9