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 |
|---|---|---|
|
|
Retrieve the list of resources on the robot |
|
|
Play the specified LinkCraft action resource |
GetRobotResourcesros2-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
RobotResourceros2-msg @ app_proxy/msg/RobotResource.msgstring resource_key # Unique resource identifier CurrentVersion current_version # Current version info
CurrentVersionros2-msg @ app_proxy/msg/CurrentVersion.msgstring version # Version number string name # Resource name string[] files # Resource file list uint64 download_timestamp_seconds # Resource download timestamp
ExecuteActionResourceros2-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
metafield format:Action Type
meta Value
Full-body action (onnx)
{"resource_type": "BODY_MONTION"}Arm action
{"resource_type": "ARM_MONTION"}When
resource_keycontainsonnx, it is a full-body action; otherwise, it is an arm action.
Programming Examples
For detailed programming examples and code descriptions, see:
Python example: Play Linkcraft Action
C++ example: Play Linkcraft Action
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)