Skip to content

7.4 Fault Diagnosis Section

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

There are two basic concepts in fault diagnosis: Alert and Exception. An Alert is a cluster of Exceptions. An Alert represents 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 can be numerous and less intuitive. If you need to continuously monitor the robot’s abnormal state, it is recommended to query the current alert list at regular intervals (not too frequently, a frequency of 0.2 Hz or lower is recommended).

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

7.4.2 Get Current Alert List RPC Interface

Section titled “7.4.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://127.0.0.1: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: In alert
    • 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 module where the exception occurred

  • 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 potential hazards
    • AlertLevel_STATUS: The current system has status-related alerts
  • manual_clear: Whether manual clearing is supported

  • show_type: The type of alert display

    • 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.4.3 Attempt to Clear Alert RPC Interface

Section titled “7.4.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://127.0.0.1:50587/rpc/aimdk.protocol.HDSService/ClearAlert
Input Parameters
{
  "id": "c92f2fdd-cea5-4209-b02f-d0eb62ae18ce"
}
  • id: You need to 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 current clearing was successful, a code of 0 indicates 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. The emergency stop must be manually released before it can be cleared.
  • 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.