Diagnosis service
The diagnosis service provides calling diagnosis related functions and monitoring fault information of each part. DiagnosisManager provides the main API of the diagnosis service, can be obtained through the RobotContext object.
DiagnosisManager diagnosisManager = aRobotContext.getSystemService(DiagnosisManager.SERVICE);
Diagnosis of parts
Cruzr is composed of several parts. The diagnosis service can diagnose one or more parts at the same time. Each item will be described below.
Diagnosis of a single component . Diagnose the head part with the following code:
promise /* [1] */ = diagnosisManager.diagnose("HeadPitch")
.progress(new ProgressCallback<DiagnosisProgress>() {
@Override
public void onProgress(DiagnosisProgress/* [2] */ diagnosisProgress) {
// Callback of diagnostic process
}
})
.done(new DoneCallback<Diagnosis>() {
@Override
public void onDone(Diagnosis/* [3] */ diagnosis) {
// Callback of diagnostic execution completion
}
})
.fail(new FailCallback<DiagnosisException>() {
@Override
public void onFail(DiagnosisException e) {
// Callback of diagnostic execution failed
}
});
[1] The asynchronous object returned by the diagnostic operation, through which the result is obtained and the processing is cancelled. Refer to Promise for specific usage.
[2] The DiagnosisProgress object of the asynchronous callback describes the progress information of the diagnosis, including:
| Constants |
Descriptions |
| DiagnosisProgress.PROGRESS_BEGAN |
Start of diagnosis |
| DiagnosisProgress.PROGRESS_ENDED |
End of diagnosis |
[3] The Diagnosis object of the asynchronous callback describes the diagnosis result information, including:
| Attribute getter |
Descriptions |
| Diagnosis.partId |
Part ID |
| Diagnosis.faulty |
If it is faulty |
| Diagnosis.info |
Diagnosis information |
| Diagnosis.fault |
Fault information |
| Diagnosis.cause |
Reason for fault |
Diagnose multiple parts
ArrayList partIds = new ArrayList<String>();
partIds.add("LShoulderYaw");
partIds.add("RShoulderYaw");
promise = diagnosisManager.diagnose(partIds);
Register listener
DiagnosisListener diagnosisListener = new DiagnosisListener() {
@Override
public void onDiagnosed(Diagnosis/* [1] */ diagnosis) {
// Callback of diagnostic information change
}
};
diagnosisManager.registerListener(diagnosisListener);/* [2] */
diagnosisManager.registerListener(diagnosisListener, partId);/* [3] */
diagnosisManager.registerListener(diagnosisListener, partIds);/* [4] */
[1] The Diagnosis object of the asynchronous callback describes the diagnosis result information. Please refer to Diagnosis
[2] Register listener to listen the diagnosis information of all components
[3] Register listener to listen the diagnosis information of a specific component
[4] Register listener to listen the diagnosis information of multiple components
Unregister listener
diagnosisManager.unregisterListener(diagnosisListener);
Repair the part
If the device has the ability of self-healing, it can call its self-healing function through the diagnostic service when a part is abnormal. The following code is implemented: calling the self-healing function of the head joint
promise /* [1] */ = diagnosisManager.repair("HeadPitch")
.progress(new ProgressCallback<RepairProgress>() {
@Override
public void onProgress(RepairProgress/* [2] */ repairProgress) {
// Callback of repair process
}
})
.done(new DoneCallback<Void>() {
@Override
public void onDone(Void aVoid) {
// Callback of repair execution completion
}
})
.fail(new FailCallback<RepairException>() {
@Override
public void onFail(RepairException e) {
// Callback of repair execution failed
}
});
[1] The asynchronous object returned by the repair operation, through which the result is obtained and the processing is cancelled. Refer to Promise for specific usage.
[2] The RepairProgress object of the asynchronous callback describes the progress information of the diagnosis, including:
| Constants |
Descriptions |
| RepairProgress.PROGRESS_BEGAN |
Start repairs |
| RepairProgress.PROGRESS_ENDED |
End repairs |
Diagnostic items
| Diagnostic items |
Diagnostic code |
Descriptions |
| DIAG_SYS_COMM |
10000 |
System communication |
Identification code
| Information code |
Diagnostic information |
Descriptions |
Identification code (Diagnostic code+Information code) |
Suggested treatment measures |
| 0 |
system_comm_ok |
Normal system communication |
10000 |
|
| 1 |
system_comm_anormaly |
Abnormal system communication |
10001 |
Plug and unplug the network cable or restart by bottom switch |
Diagnostic items
| Diagnostic items |
Diagnostic code |
Descriptions |
| DIAG_MOTOR1 |
20100 |
Motor No. 1 |
| DIAG_MOTOR2 |
20200 |
Motor No. 2 |
| DIAG_MOTOR3 |
20300 |
Motor No. 3 (unique to Cruzr1) |
Identification code
| Information code |
Diagnostic information |
Descriptions |
Identification code (Diagnostic code+Information code) |
Suggested treatment measures |
| 0 |
motor_ok |
The motor works normally |
20100 |
|
| 1 |
motor_overcurrent |
Motor overcurrent |
20101 |
Restart the robot or move to a safe area to wait |
| 2 |
motor_can_error |
Abnormal motor CAN |
20102 |
Restart or contact after sales |
| 3 |
motor_overtension |
Motor overtension |
20103 |
Restart or contact after sales |
| 4 |
motor_uvp |
Motor voltage too low |
20104 |
Restart or contact after sales |
| 5 |
motor_overtemperature |
Motor temperature too high |
20105 |
Restart or contact after sales |
| 6 |
motor_vel_anormaly |
Abnormal motor speed |
20106 |
Restart or contact after sales |
| 7 |
motor_anormaly |
Abnormal sensor and current |
20107 |
Restart or contact after sales |
Diagnostic items
| Diagnostic items |
Diagnostic code |
Descriptions |
| DIAG_SERVO1 |
30100 |
"LShoulderPitch" |
| DIAG_SERVO2 |
30200 |
"LShoulderRoll" |
| DIAG_SERVO3 |
30300 |
"LShoulderYaw" |
| DIAG_SERVO4 |
30400 |
"LElbowRoll" |
| DIAG_SERVO5 |
30500 |
"LElbowYaw" |
| DIAG_SERVO7 |
30700 |
"RShoulderPitch" |
| DIAG_SERVO8 |
30800 |
"RShoulderRoll" |
| DIAG_SERVO9 |
30900 |
"RShoulderYaw" |
| DIAG_SERVO10 |
31000 |
"RElbowRoll" |
| DIAG_SERVO11 |
31100 |
"RElbowYaw" |
| DIAG_SERVO13 |
31300 |
"HeadYaw" (unique to Cruzr1) |
| DIAG_SERVO14 |
31400 |
"HeadPitch" |
| DIAG_SERVO15 |
31500 |
"LHand" |
| DIAG_SERVO16 |
31600 |
"RHand" |
Identification code
| Information code |
Diagnostic information |
Descriptions |
Identification code (Diagnostic code+Information code) |
Suggested treatment measures |
| 0 |
servo_ok |
Servo works normally |
30100 |
|
| 1 |
servo_fail |
Servo does not respond to function operation or response timeout |
30101 |
Restart or contact after sales |
| 2 |
servo_paramerr |
Servo response data error |
30102 |
Restart or contact after sales |
| 3 |
servo_libiniterr |
Servo group structure read / write function not initialized or failed |
30103 |
Restart or contact after sales |
| 4 |
servo_tempraturelowerr |
Low temperature protection of Servo |
30104 |
Restart or contact after sales |
| 5 |
servo_tempraturelowwarn |
Low temperature alarm of Servo |
30105 |
Restart or contact after sales |
| 6 |
servo_tempraturehigherr |
Over temperature protection of Servo |
30106 |
Restart or contact after sales |
| 7 |
servo_tempraturehighwarn |
Over temperature alarm of Servo |
30107 |
Restart or contact after sales |
| 8 |
servo_voltagelowerr |
Low pressure protection of Servo |
30108 |
Restart or contact after sales |
| 9 |
servo_voltagelowwarn |
Low pressure alarm of Servo |
30109 |
Restart or contact after sales |
| 10 |
servo_voltagehigherr |
Over voltage protection of Servo |
30110 |
Restart or contact after sales |
| 11 |
servo_voltagehighwarn |
Over voltage alarm of Servo |
30111 |
Restart or contact after sales |
| 12 |
servo_currentovererr |
Over current protection of Servo |
30112 |
Restart or contact after sales |
| 13 |
servo_currentoverwarn |
Over current alarm of Servo |
30113 |
Restart or contact after sales |
| 14 |
servo_torqueovererr |
Moment protection of Servo |
30114 |
Restart or contact after sales |
| 15 |
servo_torqueoverwarn |
Torque warning of Servo |
30115 |
Restart or contact after sales |
| 16 |
servo_fuseerr |
Servo fuse dislocation protection |
30116 |
Restart or contact after sales |
| 17 |
servo_fusewarn |
Servo fuse dislocation alarm |
30117 |
Restart or contact after sales |
| 18 |
servo_pwmerr |
Locked rotor protection of Servo |
30118 |
Restart or contact after sales |
| 19 |
servo_pwmwarn |
Locked rotor alarm of Servo |
30119 |
Restart or contact after sales |
| 20 |
servo_speederr |
Servo speed deviation fault |
30120 |
Restart or contact after sales |
| 21 |
servo_speedwarn |
Servo speed deviation alarm |
30121 |
Restart or contact after sales |
| 22 |
servo_commuerr |
Communication disconnection protection of Servo |
30122 |
Restart or contact after sales |
| 23 |
servo_commuwarn |
Servo communication disconnection alarm |
30123 |
Restart or contact after sales |
| 24 |
servo_brokenerr |
Damage of Servo |
30124 |
Restart or contact after sales |
| 25 |
servo_brokenwarn |
Servo damage alarm |
30125 |
Restart or contact after sales |
| 26 |
servo_ambtempratureerr |
Ambient temperature fault of Servo |
30126 |
Restart or contact after sales |
| 27 |
servo_ambtempraturewarn |
Ambient temperature warning for Servo |
30127 |
Restart or contact after sales |
| 28 |
servo_poslimupwarn |
Servo position over upper limit alarm |
30128 |
Restart or contact after sales |
| 29 |
servo_poslimdownwarn |
Servo position over lower limit alarm |
30129 |
Restart or contact after sales |
| 30 |
servo_spdlimwarn |
Servo speed overrun alarm |
30130 |
Restart or contact after sales |
| 31 |
servo_torqlimwarn |
Servo current over limit alarm |
30131 |
Restart |
LIDAR Diagnostic items
| Diagnostic items |
Diagnostic code |
Descriptions |
| DIAG_SENSOR_LIDAR |
40100 40200 (unique to Cruzr1s) 40300 (unique to Cruzr1s) 40400 (unique to Cruzr1s) |
Laser radar |
LIDAR Identification code
| Information code |
Diagnostic information |
Descriptions |
Identification code (Diagnostic code+Information code) |
Suggested treatment measures |
| 0 |
lidar_ok |
Lidar works normally |
40100 |
|
| 1 |
lidar_no_device |
No lidar detected |
40101 |
1、Restart the device to check (turn off the bottom power supply and then turn it back on after power failure) 2、Check the radar connection after restart |
| 2 |
lidar_fq_error |
Abnormal frequency of lidar data |
40102 |
1、Restart the devic 2、After restart, if the abnormality still exists, replace the radar |
| 3 |
lidar_initial_error |
Radar node start failed |
40103 |
After restart, if the abnormality still exists,Check hardware connection and radar |
| 4 |
lidar_multi_device |
Multiple radar equipment |
40104 |
After restart, if the abnormality still exists,Whether there are both the radar and the adapter board connected to the x86 |
| 5 |
lidar_no_data |
No data for radar topic |
40105 |
Restart radar |
| 6 |
lidar_zero_data |
Radar data is 0 |
40106 |
|
Ultrasonic Diagnostic items
| Diagnostic items |
Diagnostic code |
Descriptions |
| DIAG_SENSOR_ULTRASONIC1 |
41100 |
Bottom No.1 ultrasonic |
| DIAG_SENSOR_ULTRASONIC2 |
41200 |
Bottom No.2 ultrasonic |
| DIAG_SENSOR_ULTRASONIC3 |
41300 |
Bottom No.3 ultrasonic |
| DIAG_SENSOR_ULTRASONIC4 |
41400 |
Bottom No.4 ultrasonic |
| DIAG_SENSOR_ULTRASONIC5 |
41500 |
Bottom No.5 ultrasonic |
| DIAG_SENSOR_ULTRASONIC6 |
41600 |
Middle No.1 ultrasonic |
| DIAG_SENSOR_ULTRASONIC7 |
41700 |
Middle No.2 ultrasonic |
| DIAG_SENSOR_ULTRASONIC8 |
41800 |
Middle No.3 ultrasonic |
Ultrasonic Identification code
| Information code |
Diagnostic information |
Descriptions |
Identification code (Diagnostic code+Information code) |
Suggested treatment measures |
| 0 |
sensor_ultrasonic_ok |
Ultrasound normal |
41100 |
|
| 1 |
sensor_ultrasonic_no_data |
No ultrasonic data |
41101 |
contact after sales |
Infra-red Diagnostic items
| Diagnostic items |
Diagnostic code |
Descriptions |
| DIAG_SENSOR_PSD_IR1 |
43100 |
Infra-red No.1 |
| DIAG_SENSOR_PSD_IR2 |
43200 |
Infra-red No.2 |
| DIAG_SENSOR_PSD_IR3 |
43300 |
Infra-red No.3 |
| DIAG_SENSOR_PSD_IR4 |
43400 |
Infra-red No.4 |
| DIAG_SENSOR_PSD_IR5 |
43500 |
Infra-red No.5 |
Infra-red Identification code
| Information code |
Diagnostic information |
Descriptions |
Identification code (Diagnostic code+Information code) |
Suggested treatment measures |
| 0 |
sensor_psd_ir_ok |
Infrared normal |
43100 |
|
| 1 |
sensor_psd_ir_no_data |
No data in infrared |
43101 |
contact after sales |
RGBD Diagnostic items
| Diagnostic items |
Diagnostic code |
Descriptions |
| DIAG_SENSOR_RGBD |
44000 |
Depth camera |
RGBDIdentification code
| Information code |
Diagnostic information |
Descriptions |
Identification code (Diagnostic code+Information code) |
Suggested treatment measures |
| 0 |
sensor_rgbd_ok |
Rgbd works normally |
44000 |
|
| 1 |
sensor_rgbd_no_depthdata |
Rgbd has no depth data |
44001 |
contact after sales |
| 2 |
sensor_rgbd_no_rgbdata |
Rgbd has no color data |
44002 |
contact after sales |
| 3 |
sensor_rgbd_no_data |
rgbd has no data |
44003 |
contact after sales |
TOF IR Diagnostic items
| Diagnostic items |
Diagnostic code |
Descriptions |
| DIAG_SENSOR_TOF |
45000 |
TOF IR |
TOF Identification code
| Information code |
Diagnostic information |
Descriptions |
Identification code (Diagnostic code+Information code) |
Suggested treatment measures |
| 0 |
sensor_tof_ok |
TOF works normally |
45000 |
|
| 1 |
sensor_tof_no_data |
TOF has no data |
45001 |
contact after sales |
| 2 |
sensor_tof_zero_data |
TOF data is 0 |
45002 |
contact after sales |
| 3 |
sensor_tof_triggerred |
Trigger TOF |
45003 |
|
Geomagnetism Diagnostic items
| Diagnostic items |
Diagnostic code |
Descriptions |
| DIAG_SENSOR_GEOMAGNETIC |
46000 |
Geomagnetism |
Geomagnetism Identification code
| Information code |
Diagnostic information |
Descriptions |
Identification code (Diagnostic code+Information code) |
Suggested treatment measures |
| 0 |
sensor_geomagnetic_ok |
Geomagnetic normal |
46000 |
|
| 1 |
sensor_geomagnetic_no_data |
Geomagnetic has no data |
46001 |
contact after sales |
Navigation system Diagnostic items
| Diagnostic items |
Diagnostic code |
Descriptions |
| DIAG_NAV_SYS_STATUS |
60000 |
Navigation system |
Navigation system Identification code
| Information code |
Diagnostic information |
Descriptions |
Identification code (Diagnostic code+Information code) |
Suggested treatment measures |
| 0 |
nav_system_ok |
Navigation system OK (connected) |
60000 |
|
| 1 |
nav_system_error |
Abnormal navigation system (not connected) |
60001 |
Restart |
Navigation and location Diagnostic items
| Diagnostic items |
Diagnostic code |
Descriptions |
| DIAG_NAV_SYS_LOCALIZATION |
60100 |
Navigation and location |
Navigation and location Identification code
| Information code |
Diagnostic information |
Descriptions |
Identification code (Diagnostic code+Information code) |
Suggested treatment measures |
| 0 |
nav_localization_ok |
Relocation OK |
60100 |
|
| 1 |
nav_localization_failed |
Relocation failed |
60101 |
Relocation |
| 2 |
nav_localization_timeout |
Relocation timeout |
60102 |
Relocation |
Navigation behavior Diagnostic items
| Diagnostic items |
Diagnostic code |
Descriptions |
| DIAG_NAV_SYS_NAVIGATION |
60200 |
Navigation behavior |
Navigation behavior Identification code
| Information code |
Diagnostic information |
Descriptions |
Identification code (Diagnostic code+Information code) |
Suggested treatment measures |
| 0 |
nav_navigation_sucess |
Successfully navigated to the target point |
60200 |
|
| 1 |
nav_navigation_unreachable |
Target point unreachable |
60201 |
Check target location |
| 2 |
nav_navigation_path_error |
Path not reachable |
60202 |
Check the path for obstructions |
| 3 |
nav_navigation_open_area |
The scene is empty, resulting in location loss |
60203 |
Move the robot to the area with obvious environmental characteristics and relocate it |
| 4 |
nav_navigation_crowed_passengers |
Multiple containment, resulting in location loss |
60204 |
Relocation |
| 5 |
nav_navigation_environment_changed |
Environment changes, resulting in location loss |
60205 |
Relocate. If the exception still exists, it is recommended to update the map |
| 6 |
nav_navigation_lidardata_empty |
No radar data, resulting in location loss |
60206 |
Check lidar diagnostic solutions |
| 7 |
nav_navigation_tof_triggerred |
Trigger TOF |
60207 |
Check for TOF false alarm or cliff |
| 8 |
nav_navigation_geomagnetic_triggerred |
Triggered geomagnetism |
60208 |
Move the robot to a non geomagnetic area and start it up |
| 98 |
nav_navigation_localization_lost |
Loss of location,resulting in location loss |
60298 |
Relocation |
| 99 |
nav_navigation_failed_unknown |
Unknown failure reason |
60299 |
contact after sales |
Navigation map Diagnostic items
| Diagnostic items |
Diagnostic code |
Descriptions |
| DIAG_NAV_SYS_LOAD_MAP |
60300 |
Navigation map |
Navigation map Identification code
| Information code |
Diagnostic information |
Descriptions |
Identification code (Diagnostic code+Information code) |
Suggested treatment measures |
| 0 |
nav_load_map_sucess |
Map loaded successfully |
60300 |
|
| 1 |
nav_load_map_failed |
Failed to load map |
60301 |
1、Check whether the map is the corresponding navigation scheme 2、Check whether the map file is valid 3、Re export the map |
| 2 |
nav_load_map_timeout |
Map timeout |
60302 |
Prompt map is too large, setting timeout |