7.12 Light Strip Control Section

7.12 Light Strip Control Section

7.12.1 Overview

The light strip control interface is used to control the color and brightness of the robot's light strip.

The lighting control logic is as follows:

  1. All light strip LEDs are controlled uniformly, and several preset lighting effects such as solid color, flowing lights, and breathing lights can be set. It is not possible to control a specific light strip or LED individually.
  2. The default lighting for the robot is a blue breathing light, which can be overridden by user-defined control commands.
  3. Red flashing warning lights for low battery, joint overheating, etc., have a higher priority than all user-defined control commands and cannot be overridden.

7.12.2 Set Light Mode RPC Interface

Interface Namepb:/aimdk.protocol.HalRgbLightService/SetRgbLightCommand
Function SummarySet light mode
Interface TypeHTTP JSON RPC
URLhttp://192.168.100.110:52893/rpc/aimdk.protocol.HalRgbLightService/SetRgbLightCommand
Input Parameters
text
{}
Output Parameters
text
{
  "cmd": {
    "red": 255,
    "green": 0,
    "blue": 0,
    "effect": 2,
    "control": 1
  }
}
  • red: Red brightness, range: 0~255
  • green: Green brightness, range: 0~255
  • blue: Blue brightness, range: 0~255
  • effect: Lighting mode, range: 0~4, 0 represents off, 1 represents solid color, 2 represents breathing light, 3 represents flashing light, 4 represents flowing light
  • control: Lighting control, 0 represents embedded takeover, 1 represents end-side takeover
Example Scriptexamples/light/SetRgbLightCommand.sh
Notes

7.12.3 Get Light State RPC Interface

Interface Namepb:/aimdk.protocol.HalRgbLightService/GetRgbLightState
Function SummaryGet light state
Interface TypeHTTP JSON RPC
URLhttp://192.168.100.110:52893/rpc/aimdk.protocol.HalRgbLightService/GetRgbLightState
Input Parameters
text
{}
Output Parameters
text
{
  "data": {
    "red": 255,
    "green": 0,
    "blue": 0,
    "effect": 2,
    "control": 1
  }
}
  • red: Red brightness, range: 0~255
  • green: Green brightness, range: 0~255
  • blue: Blue brightness, range: 0~255
  • effect: Lighting mode, range: 0~4, 0 represents off, 1 represents solid color, 2 represents breathing light, 3 represents flashing light, 4 represents flowing light
  • control: Lighting control, 0 represents embedded takeover, 1 represents end-side takeover
The other fields do not need to be concerned with.
Example Scriptexamples/light/GetRgbLightState.sh
Notes