5.1.5 LinkCraft Actions

The LinkCraft action interface retrieves the list of LinkCraft action resources deployed on the robot and triggers playback of a specified action.

Interface Description

Service Name

Data Type

Description

/aimdk_5Fmsgs/srv/GetRobotResources

GetRobotResources

Retrieve the list of resources on the robot

/aimdk_5Fmsgs/srv/ExecuteActionResource

ExecuteActionResource

Play the specified LinkCraft action resource

  • GetRobotResources ros2-srv @ app_proxy/srv/GetRobotResources.srv

    # Retrieve the list of resources on the robot
    # Service name: /aimdk_5Fmsgs/srv/GetRobotResources
    
    # Request
    CommonRequest header         # Request header
    
    ---
    
    # Response
    CommonResponse header        # Response header
    RobotResource[] robot_resources  # List of on-robot resources
    
    • RobotResource ros2-msg @ app_proxy/msg/RobotResource.msg

      string resource_key            # Unique resource identifier
      CurrentVersion current_version    # Current version info
      
      • CurrentVersion ros2-msg @ app_proxy/msg/CurrentVersion.msg

        string version               # Version number
        string name                  # Resource name
        string[] files               # Resource file list
        uint64 download_timestamp_seconds         # Resource download timestamp
        
  • ExecuteActionResource ros2-srv @ app_proxy/srv/ExecuteActionResource.srv

    # Play a LinkCraft action
    # Service name: /aimdk_5Fmsgs/srv/ExecuteActionResource
    
    # Request
    CommonRequest header         # Request header
    string resource_key          # Unique resource identifier (from GetRobotResources)
    string resource_version      # Resource version
    SlaveDevice[] slaves         # Slave device list (may be empty)
    string meta                  # Extension parameters in JSON format
    
    ---
    
    CommonResponse header        # Response header; header.header.code == 0 means success
    

    meta field format:

    Action Type

    meta Value

    Full-body action (onnx)

    {"resource_type": "BODY_MONTION"}

    Arm action

    {"resource_type": "ARM_MONTION"}

    When resource_key contains onnx, it is a full-body action; otherwise, it is an arm action.

Programming Examples

For detailed programming examples and code descriptions, see:

Caution

As standard ROS DO NOT handle cross-host service (request-response) well, please refer to SDK examples to use open interfaces in a robust way (with protection mechanisms e.g. exception safety and retransmission)