7.13 Resource Manager Section
7.13.1 Overall Introduction
Section titled “7.13.1 Overall Introduction”A2 flagship edition’s local resource management feature opens access to six categories of resources: actions, expressions, audio, skills, maps, and creative works.
Users can perform management operations on the above resource types, including creation, deletion, retrieval, import, and export, to meet robot capability configuration and content customization needs.For detailed supported features, please refer to the resource overview.
The following sections will provide a detailed explanation of each resource module and its corresponding functions.
Operation procedure:
Creation and storage: Users must first place the data in the temporary directory /agibot/data/resources/tmp under the Orin node and trigger the synchronization operation via the RPC interface. The system will automatically identify the resource source and persist it by category into one of the following directories:
User-created resource directory: /agibot/data/resources/custom
Default resource directory: /agibot/data/resources/default
Please note that the /agibot/data/resources/tmp temporary directory will be automatically cleared after the robot restarts (including any .gz files generated during export). Ensure that all important resources have been successfully synchronized and persisted.
Retrieval and maintenance: The system supports real-time queries of resources, including resource lists and detailed resource information. It also provides deletion interfaces, allowing users to promptly remove unused resources and keep the resource space organized and manageable.
Distribution and migration: The system supports fast export and import of created resources via the RPC interface, suitable for the following scenarios:
Rapid resource backup
Batch migration across devices
Efficient reuse of configured resources
Resource overview:
| resource type | function description | create/delete | import/export | get information | update | display position |
|---|---|---|---|---|---|---|
| motion | head LED display animation | ✔ | ✔ | ✔ | ✔ | AimMaster → Skills → Expressions |
| emoticon | mostly upper limb actions such as raising hand, making a heart, or thumbs up | ✔ | ✔ | ✔ | Only resource_name can be modified. | AimMaster → Skills → Motions |
| audio | robot voice resources | ✔ | ✖ | ✔ | ✖ | AimMaster → Skills → Voice |
| skill | robot full-body dance | ✖ | ✖ | ✔ | ✖ | AimMaster → Skills → Talents |
| Work Creation | Through coordinated orchestration of the expression, action, audio, and skill modules, complex and coherent full-body dance performances or upper-limb motion sequences can be achieved. | ✔ | ✔ | ✔ | ✖ | AimMaster → Skills → My Creations |
| Maps | Maps used for robot navigation and positioning | ✖ | ✔ | ✔ | ✖ | AimMaster → Maps |
all of the above resources are stored under orin; x86 only contains built-in resource information and no user-added resource data. users can use them with AimMaster when using the RPC interfaces.
7.13.2 Partial Parameter Declarations
Section titled “7.13.2 Partial Parameter Declarations”resource_type categories:
RESOURCE_TYPE_MOTION = 1; // motion RESOURCE_TYPE_EMOTICON = 2; // emoticon RESOURCE_TYPE_AUDIO = 3; // audio RESOURCE_TYPE_SKILL = 6; // skill RESOURCE_TYPE_MAP = 7; // maps RESOURCE_TYPE_OFFRING_WORK = 8; // Work Creationxxx_extra_info declaration:
// tmp/xxx indicates the creation path is /agibot/data/resources/tmp// Motion resources are created using the x86 path, only for parsing and generating resources// Other resources are created using the Orin path// Variables indicate when they can be used. For example, variables marked for creation must be included when creating a resource.// Variables without creation functionality do not need to be included during creation
/** * @brief Additional information for emoticons */// resource_type = RESOURCE_TYPE_EMOTICON"emoticon_extra_info" { "display_name" { "zh_CN": "右手比心", "en_US": "Finger heart_right hand", }, // Display names in Chinese and English, format: map<string, string> (retrieval) "emoticon_file_url": "tmp/e.mp4", // Emoticon file URL (create/retrieve/update) "thumbnail_file_url": "tmp/t.mp4", // Thumbnail file URL (create/retrieve/update) "cover_file_url": "tmp/1.png", // Cover image URL (create/retrieve/update)}
/** * @brief Additional information for motion */// resource_type = RESOURCE_TYPE_MOTION// Motion resource metadata must be provided on x86 during creation"motion_extra_info": { "record_file_path": "/agibot/data/home/agi/测试/点赞右手_长", // Recording file path (x86 path), folder name is "测试", .macp file is "点赞右手_长" (creation only) "display_name" { "zh_CN": "右手比心", "en_US": "Finger heart_right hand", }, // Display names in Chinese and English (retrieval) "cover_file_url": "", // Preview image URL (retrieval) "preview_video_url": "" // Preview video URL (retrieval)}
/** * @brief Additional information for audio */// resource_type = RESOURCE_TYPE_AUDIO"audio_extra_info": { "audio_file_url": "", // Audio file URL (create/retrieve) "display_name": { "zh_CN": "", "en_US": "", }, // Display names in Chinese and English (retrieval) "cover_file_url": "" // Preview image URL (retrieval)}
/** * @brief Additional information for creative works */// resource_type = RESOURCE_TYPE_OFFRING_WORK"offring_work_extra_info": { "cover_file_url": "", // Cover file URL (retrieval) "preview_video_url": "", // Preview video URL (retrieval) "display_name": { "display_name_zh": "测试创作作品", "display_name_en": "Test Creative Work" }, // Display names in Chinese and English (retrieval) "motions": [ { // When motions.resources contains motion resources, use "NormalMotion" // When motions.resources contains talent resources, use "WholeBodyDance" "type": "NormalMotion", "resources": [ { "source_type": 1, // 1 = local resource, 2 = skill package resource "path": "/agibot/data/resources/custom/motion/摆拍_我是大力士/摆拍_我是大力士.mcap" // Orin resource file path } ] } ], "emoticons": [ { "resources": [ { "source_type": 1, "path": "/agibot/data/resources/custom/emoticon/emoticon_guiding/emoticon.mp4" } ] } ], "audios": [ { "resources": [ { "source_type": 1, "path": "/agibot/data/resources/custom/audio/测试/test.wav" } ] } ]}
/** * @brief Additional information for maps */// resource_type = RESOURCE_TYPE_MAP"map_extra_info": { "map_info": { "index": 2, "map_path": "/agibot/data/var/MapManagerModule/1762584133656/", "width": 1216.0, // Map width in pixels "height": 1262.0, // Map height in pixels "resolution": 20.0, // Each pixel represents 20 mm "origin": { "u": 524, // Column index of world coordinate origin "v": 594 // Row index of world coordinate origin } }, "topology_info": [ // Topology info, stores robot navigation points (matches AimMaster → Map → Points settings) { "topo_msg": { "cur_path_id": 0, "cur_point_id": 1, "cur_region_id": 0, "hr_points": null, "navi_points": [ { "id": 1, "name": "Navigation Point 1", "pose": { "x": 7.85, // meters "y": -2.15, "theta": -2.503741636798901 // radians }, "type": 1 } ], "paths": null, "qr_points": null, "regions": null, "rotate_angle": 6.001279822735171, "user_name": "", "user_sn": 0 }, "user_name": "" } ]}7.13.3 Create Resource
Section titled “7.13.3 Create Resource”| Interface Name | pb:/aimdk.protocol.ResourceService/CreateResource |
|---|---|
| Function Summary | Create Resource |
| Interface Type | HTTP JSON RPC |
| URL | http://192.168.100.110:51049/rpc/aimdk.protocol.ResourceService/CreateResource |
| Input Parameters |
|
| Output Parameters |
|
| Example Script | examples/resource_manager/CreateResource.py |
| Notes |
|
7.13.4 Delete Resource
Section titled “7.13.4 Delete Resource”| Interface Name | pb:/aimdk.protocol.ResourceService/DeleteResource |
|---|---|
| Function Summary | Delete a Resource |
| Interface Type | HTTP JSON RPC |
| URL | http://192.168.100.110:51049/rpc/aimdk.protocol.ResourceService/DeleteResource |
| Input Parameters |
|
| Output Parameters |
|
| Example Script | examples/resource_manager/DeleteResource.py |
| Notes |
|
7.13.5 Resource Update
Section titled “7.13.5 Resource Update”| Interface Name | pb:/aimdk.protocol.ResourceService/UpdateResource |
|---|---|
| Function Summary | Emoticon Resource Update |
| Interface Type | HTTP JSON RPC |
| URL | http://192.168.100.110:51049/rpc/aimdk.protocol.ResourceService/UpdateResource |
| Input Parameters |
|
| Output Parameters |
|
| Example Script | examples/resource_manager/UpdateResource.py |
| Notes |
7.13.6 Get Resource List
Section titled “7.13.6 Get Resource List”| Interface Name | pb:/aimdk.protocol.ResourceService/GetResourceList |
|---|---|
| Function Summary | Get Resource List |
| Interface Type | HTTP JSON RPC |
| URL | http://192.168.100.110:51049/rpc/aimdk.protocol.ResourceService/GetResourceList |
| Input Parameters |
|
| Output Parameters |
|
| Example Script | examples/resource_manager/GetResourceList.py |
| Notes |
7.13.7 Get Resource Details
Section titled “7.13.7 Get Resource Details”| Interface Name | pb:/aimdk.protocol.ResourceService/GetResource |
|---|---|
| Function Summary | Get Resource Details |
| Interface Type | HTTP JSON RPC |
| URL | http://192.168.100.110:51049/rpc/aimdk.protocol.ResourceService/GetResource |
| Input Parameters |
|
| Output Parameters |
|
| Example Script | examples/resource_manager/GetResource.py |
| Notes |
7.13.8 Migrate Resource Out
Section titled “7.13.8 Migrate Resource Out”| Interface Name | pb:/aimdk.protocol.ResourceService/ResourceMigrationOut |
|---|---|
| Function Summary | Migrate Resource Out |
| Interface Type | HTTP JSON RPC |
| URL | http://192.168.100.110:51049/rpc/aimdk.protocol.ResourceService/ResourceMigrationOut |
| Input Parameters |
|
| Output Parameters |
|
| Example Script | examples/resource_manager/ResourceMigrationOut.py |
| Notes |
7.13.9 Migrate In Resource
Section titled “7.13.9 Migrate In Resource”| Interface Name | pb:/aimdk.protocol.ResourceService/ResourceMigrationIn |
|---|---|
| Function Summary | Migrate In Resource |
| Interface Type | HTTP JSON RPC |
| URL | http://192.168.100.110:51049/rpc/aimdk.protocol.ResourceService/ResourceMigrationIn |
| Input Parameters |
|
| Output Parameters |
|
| Example Script | examples/resource_manager/ResourceMigrationIn.py |
| Notes |
7.13.10 Migration Status
Section titled “7.13.10 Migration Status”| Interface Name | pb:/aimdk.protocol.ResourceService/GetResourceMigrationTaskStatus |
|---|---|
| Function Summary | Migration Status |
| Interface Type | HTTP JSON RPC |
| URL | http://192.168.100.110:51049/rpc/aimdk.protocol.ResourceService/GetResourceMigrationTaskStatus |
| Input Parameters |
|
| Output Parameters |
|
| Example Script | examples/resource_manager/GetResourceMigrationTaskStatus.py |
| Notes |