Skip to content

7.10 Fault Diagnosis Section

The robot itself provides basic fault diagnosis and health monitoring capabilities, capable of monitoring some fundamental anomalies and faults, such as joint overheating, sensor failure, system occupancy consistently too high, and low battery power.

There are two basic concepts in fault diagnosis: Alert and Exception. Alerts are clusters of Exceptions. An Alert refers to a broad category of faults, while an Exception is a specific fault. For example, repositioning failure is an Alert, which corresponds to many different failure reasons, each being a specific Exception. AimMaster generally displays Alerts, as Exceptions are more numerous and less intuitive. If you need to continuously monitor the robot’s abnormal state, it is recommended to query the current alert list periodically (the frequency should not be too high, recommended 0.2 Hz or lower).

The full list of alerts can be found in the /agibot/software/v0/config/hds_master/database/alert_info.yaml file on the orin machine.

7.10.2 Get Current Alert List RPC Interface

Section titled “7.10.2 Get Current Alert List RPC Interface”
Interface Name pb:/aimdk.protocol.HDSService/GetAlertList
Function Summary Get the current alert list
Interface Type HTTP JSON RPC
URL http://192.168.100.110:50587/rpc/aimdk.protocol.HDSService/GetAlertList
Input Parameters
{}
Output Parameters
{
  "data": {
    "alerts": [
      {
        "id": "c39f6ccc-85d9-4976-a2e9-08f2906cc237",
        "appeared_timestamp": "1762933137153",
        "disappeared_timestamp": "0",
        "alert_code": "A2000003",
        "state": "AlertState_ACTIVE",
        "exception_list": [
          {
            "type": "ExceptionType_Normal",
            "module_id": 81,
            "code": 100,
            "info": "Emergency stop pressed",
            "module_name": "Health Management HDS"
          }
        ],
        "description": "Emergency stop pressed",
        "level": "AlertLevel_HIDDEN_DANGERS",
        "manual_clear": true,
        "show_type": "AlertShowType_Normal",
        "solution_list": [
          {
            "type": "txt",
            "content": "Please rotate the emergency stop button counterclockwise to release the emergency stop state."
          }
        ]
      }
    ]
  }
}
  • id: The ID of this alert

  • appeared_timestamp: The timestamp when the alert appeared

  • disappeared_timestamp: The timestamp when the alert disappeared

  • alert_code: The alert code

  • state: The alert state

    • AlertState_UNDEFINED: Unknown
    • AlertState_ACTIVE: Alert active
    • AlertState_CLEARED: Cleared
    • AlertState_ExceptionChanged: Alert with changed exception
    • AlertState_Recovering: Recovering
  • exception_list: The list of exceptions

  • exception_list[i].type: The type of exception

    • ExceptionType_Normal: Normal type, this type of exception needs to be reported periodically
    • ExceptionType_Trigger_Appear: Triggered exception (reported once when the exception occurs) set this exception to the occurrence state
    • ExceptionType_Trigger_Disappear: Triggered exception (reported once when the exception disappears) set this exception to the disappearance state
  • exception_list[i].module_id: The ID of the exception module

  • exception_list[i].code: The module exception code

  • exception_list[i].info: The exception information

  • exception_list[i].module_name: The name of the module

  • description: The alert description

  • level: The alert level

    • AlertLevel_UNDEFINED: No alert
    • AlertLevel_FATAL: Fatal alert
    • AlertLevel_SERIOUS: Serious alert
    • AlertLevel_WARNING: Warning alert
    • AlertLevel_HIDDEN_DANGERS: The current system has hidden dangers
    • AlertLevel_STATUS: The current system has status-related alerts
  • manual_clear: Whether manual clearing is supported

  • show_type: The alert display type

    • AlertShowType_Normal
    • AlertShowType_Toast
  • solution_list: The list of solutions

  • solution_list[i].type: The type of solution

  • solution_list[i].content: The content of the solution

Example Script examples/hds/get_alert_list.sh
Notes

7.10.3 Attempt to Clear Alert RPC Interface

Section titled “7.10.3 Attempt to Clear Alert RPC Interface”
Interface Name pb:/aimdk.protocol.HDSService/ClearAlert
Function Summary Attempt to clear an alert, requiring the alert ID to be passed in
Interface Type HTTP JSON RPC
URL http://192.168.100.110:50587/rpc/aimdk.protocol.HDSService/ClearAlert
Input Parameters
{
  "id": "c92f2fdd-cea5-4209-b02f-d0eb62ae18ce"
}
  • id: Fill in the specific alert ID, which can be obtained through the GetAlertList interface
Output Parameters
{
  "header": {
    "code": "1",
    "msg": "clear alert failed!",
    "trace_id": "",
    "domin": ""
  },
  "data": {
    "data": "c92f2fdd-cea5-4209-b02f-d0eb62ae18ce"
  }
}
  • data: The alert ID passed in
  • The header returns information about whether the clearance was successful, with code 0 indicating success
Example Script examples/hds/clear_alert.sh
Notes
  • Although the emergency stop alert has manual_clear set to true, it will still fail to clear. You need to manually release the emergency stop before clearing it.
  • In general, do not call this interface to clear alerts. Please fully understand the meaning of the alert before considering using this interface to clear it.

In addition to the GetAlertList and ClearAlert interfaces, the following interfaces are also available:

  1. GetTotalAlertList: Get all alerts in the system, including historical information
  2. GetAlertCount: Get the number of all current alerts in the system
  3. GetExceptionEvent: Get the fault events in the system
  4. SetShieldAlertLevel: Shield all alerts at a certain level and below

However, these interfaces provide too much information or are inconvenient to use. It is recommended to use only the GetAlertList and ClearAlert interfaces for basic alert information retrieval and clearing operations. Examples for each of these open interfaces are located in the examples/hds directory and are not detailed here.