solve dependencies problem

This commit is contained in:
2025-09-05 15:49:00 +08:00
parent 12a6b47969
commit 21fbd5a323
114 changed files with 11337 additions and 19 deletions

View File

@@ -0,0 +1,20 @@
syntax = "proto3";
package aimdk.protocol;
// 夹爪手部命令
message AgiClawHandCommand {
uint32 cmd = 1;
uint32 pos = 2;
uint32 force = 3;
uint32 clamp_method = 4;
uint32 finger_pos = 5;
}
// 夹爪手部状态
message AgiClawHandState {
uint32 state = 1;
uint32 pos = 2;
uint32 temperature = 3;
uint32 finger_pos = 4;
}

View File

@@ -0,0 +1,28 @@
# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: aimdk/protocol/hal/hand/agi_claw.proto
# Protobuf Python Version: 4.25.1
"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
from google.protobuf import descriptor_pool as _descriptor_pool
from google.protobuf import symbol_database as _symbol_database
from google.protobuf.internal import builder as _builder
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n&aimdk/protocol/hal/hand/agi_claw.proto\x12\x0e\x61imdk.protocol\"g\n\x12\x41giClawHandCommand\x12\x0b\n\x03\x63md\x18\x01 \x01(\r\x12\x0b\n\x03pos\x18\x02 \x01(\r\x12\r\n\x05\x66orce\x18\x03 \x01(\r\x12\x14\n\x0c\x63lamp_method\x18\x04 \x01(\r\x12\x12\n\nfinger_pos\x18\x05 \x01(\r\"W\n\x10\x41giClawHandState\x12\r\n\x05state\x18\x01 \x01(\r\x12\x0b\n\x03pos\x18\x02 \x01(\r\x12\x13\n\x0btemperature\x18\x03 \x01(\r\x12\x12\n\nfinger_pos\x18\x04 \x01(\rb\x06proto3')
_globals = globals()
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'aimdk.protocol.hal.hand.agi_claw_pb2', _globals)
if _descriptor._USE_C_DESCRIPTORS == False:
DESCRIPTOR._options = None
_globals['_AGICLAWHANDCOMMAND']._serialized_start=58
_globals['_AGICLAWHANDCOMMAND']._serialized_end=161
_globals['_AGICLAWHANDSTATE']._serialized_start=163
_globals['_AGICLAWHANDSTATE']._serialized_end=250
# @@protoc_insertion_point(module_scope)

View File

@@ -0,0 +1,25 @@
syntax = "proto3";
package aimdk.protocol;
import public "aimdk/protocol/common/rpc.proto";
import public "aimdk/protocol/common/header.proto";
import public "aimdk/protocol/hal/hand/hand.proto";
// 获取机器人手部状态响应
message HandStateResponse {
ResponseHeader header = 1; // 响应头
HandState data = 2; // 手部状态
}
// 设置机器人手部控制请求
message HandCommandRequest {
RequestHeader header = 1; // 请求头
HandCommand data = 2; // 手部控制
}
// HandService
service HalHandService {
rpc GetHandState(CommonRequest) returns (HandStateResponse);
rpc SetHandCommand(HandCommandRequest) returns (CommonResponse);
}

View File

@@ -0,0 +1,60 @@
# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: aimdk/protocol/hal/hand/hal_hand_service.proto
# Protobuf Python Version: 4.25.1
"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
from google.protobuf import descriptor_pool as _descriptor_pool
from google.protobuf import symbol_database as _symbol_database
from google.protobuf.internal import builder as _builder
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
from aimdk.protocol.common import rpc_pb2 as aimdk_dot_protocol_dot_common_dot_rpc__pb2
try:
aimdk_dot_protocol_dot_common_dot_timestamp__pb2 = aimdk_dot_protocol_dot_common_dot_rpc__pb2.aimdk_dot_protocol_dot_common_dot_timestamp__pb2
except AttributeError:
aimdk_dot_protocol_dot_common_dot_timestamp__pb2 = aimdk_dot_protocol_dot_common_dot_rpc__pb2.aimdk.protocol.common.timestamp_pb2
try:
aimdk_dot_protocol_dot_common_dot_header__pb2 = aimdk_dot_protocol_dot_common_dot_rpc__pb2.aimdk_dot_protocol_dot_common_dot_header__pb2
except AttributeError:
aimdk_dot_protocol_dot_common_dot_header__pb2 = aimdk_dot_protocol_dot_common_dot_rpc__pb2.aimdk.protocol.common.header_pb2
from aimdk.protocol.common import header_pb2 as aimdk_dot_protocol_dot_common_dot_header__pb2
from aimdk.protocol.hal.hand import hand_pb2 as aimdk_dot_protocol_dot_hal_dot_hand_dot_hand__pb2
try:
aimdk_dot_protocol_dot_common_dot_header__pb2 = aimdk_dot_protocol_dot_hal_dot_hand_dot_hand__pb2.aimdk_dot_protocol_dot_common_dot_header__pb2
except AttributeError:
aimdk_dot_protocol_dot_common_dot_header__pb2 = aimdk_dot_protocol_dot_hal_dot_hand_dot_hand__pb2.aimdk.protocol.common.header_pb2
try:
aimdk_dot_protocol_dot_hal_dot_hand_dot_inspire__pb2 = aimdk_dot_protocol_dot_hal_dot_hand_dot_hand__pb2.aimdk_dot_protocol_dot_hal_dot_hand_dot_inspire__pb2
except AttributeError:
aimdk_dot_protocol_dot_hal_dot_hand_dot_inspire__pb2 = aimdk_dot_protocol_dot_hal_dot_hand_dot_hand__pb2.aimdk.protocol.hal.hand.inspire_pb2
try:
aimdk_dot_protocol_dot_hal_dot_hand_dot_jodell__pb2 = aimdk_dot_protocol_dot_hal_dot_hand_dot_hand__pb2.aimdk_dot_protocol_dot_hal_dot_hand_dot_jodell__pb2
except AttributeError:
aimdk_dot_protocol_dot_hal_dot_hand_dot_jodell__pb2 = aimdk_dot_protocol_dot_hal_dot_hand_dot_hand__pb2.aimdk.protocol.hal.hand.jodell_pb2
try:
aimdk_dot_protocol_dot_hal_dot_hand_dot_agi__claw__pb2 = aimdk_dot_protocol_dot_hal_dot_hand_dot_hand__pb2.aimdk_dot_protocol_dot_hal_dot_hand_dot_agi__claw__pb2
except AttributeError:
aimdk_dot_protocol_dot_hal_dot_hand_dot_agi__claw__pb2 = aimdk_dot_protocol_dot_hal_dot_hand_dot_hand__pb2.aimdk.protocol.hal.hand.agi_claw_pb2
from aimdk.protocol.common.rpc_pb2 import *
from aimdk.protocol.common.header_pb2 import *
from aimdk.protocol.hal.hand.hand_pb2 import *
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n.aimdk/protocol/hal/hand/hal_hand_service.proto\x12\x0e\x61imdk.protocol\x1a\x1f\x61imdk/protocol/common/rpc.proto\x1a\"aimdk/protocol/common/header.proto\x1a\"aimdk/protocol/hal/hand/hand.proto\"l\n\x11HandStateResponse\x12.\n\x06header\x18\x01 \x01(\x0b\x32\x1e.aimdk.protocol.ResponseHeader\x12\'\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\x19.aimdk.protocol.HandState\"n\n\x12HandCommandRequest\x12-\n\x06header\x18\x01 \x01(\x0b\x32\x1d.aimdk.protocol.RequestHeader\x12)\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\x1b.aimdk.protocol.HandCommand2\xb8\x01\n\x0eHalHandService\x12P\n\x0cGetHandState\x12\x1d.aimdk.protocol.CommonRequest\x1a!.aimdk.protocol.HandStateResponse\x12T\n\x0eSetHandCommand\x12\".aimdk.protocol.HandCommandRequest\x1a\x1e.aimdk.protocol.CommonResponseP\x00P\x01P\x02\x62\x06proto3')
_globals = globals()
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'aimdk.protocol.hal.hand.hal_hand_service_pb2', _globals)
if _descriptor._USE_C_DESCRIPTORS == False:
DESCRIPTOR._options = None
_globals['_HANDSTATERESPONSE']._serialized_start=171
_globals['_HANDSTATERESPONSE']._serialized_end=279
_globals['_HANDCOMMANDREQUEST']._serialized_start=281
_globals['_HANDCOMMANDREQUEST']._serialized_end=391
_globals['_HALHANDSERVICE']._serialized_start=394
_globals['_HALHANDSERVICE']._serialized_end=578
# @@protoc_insertion_point(module_scope)

View File

@@ -0,0 +1,103 @@
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc
from aimdk.protocol.common import rpc_pb2 as aimdk_dot_protocol_dot_common_dot_rpc__pb2
from aimdk.protocol.hal.hand import hal_hand_service_pb2 as aimdk_dot_protocol_dot_hal_dot_hand_dot_hal__hand__service__pb2
class HalHandServiceStub(object):
"""HandService
"""
def __init__(self, channel):
"""Constructor.
Args:
channel: A grpc.Channel.
"""
self.GetHandState = channel.unary_unary(
'/aimdk.protocol.HalHandService/GetHandState',
request_serializer=aimdk_dot_protocol_dot_common_dot_rpc__pb2.CommonRequest.SerializeToString,
response_deserializer=aimdk_dot_protocol_dot_hal_dot_hand_dot_hal__hand__service__pb2.HandStateResponse.FromString,
)
self.SetHandCommand = channel.unary_unary(
'/aimdk.protocol.HalHandService/SetHandCommand',
request_serializer=aimdk_dot_protocol_dot_hal_dot_hand_dot_hal__hand__service__pb2.HandCommandRequest.SerializeToString,
response_deserializer=aimdk_dot_protocol_dot_common_dot_rpc__pb2.CommonResponse.FromString,
)
class HalHandServiceServicer(object):
"""HandService
"""
def GetHandState(self, request, context):
"""Missing associated documentation comment in .proto file."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def SetHandCommand(self, request, context):
"""Missing associated documentation comment in .proto file."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def add_HalHandServiceServicer_to_server(servicer, server):
rpc_method_handlers = {
'GetHandState': grpc.unary_unary_rpc_method_handler(
servicer.GetHandState,
request_deserializer=aimdk_dot_protocol_dot_common_dot_rpc__pb2.CommonRequest.FromString,
response_serializer=aimdk_dot_protocol_dot_hal_dot_hand_dot_hal__hand__service__pb2.HandStateResponse.SerializeToString,
),
'SetHandCommand': grpc.unary_unary_rpc_method_handler(
servicer.SetHandCommand,
request_deserializer=aimdk_dot_protocol_dot_hal_dot_hand_dot_hal__hand__service__pb2.HandCommandRequest.FromString,
response_serializer=aimdk_dot_protocol_dot_common_dot_rpc__pb2.CommonResponse.SerializeToString,
),
}
generic_handler = grpc.method_handlers_generic_handler(
'aimdk.protocol.HalHandService', rpc_method_handlers)
server.add_generic_rpc_handlers((generic_handler,))
# This class is part of an EXPERIMENTAL API.
class HalHandService(object):
"""HandService
"""
@staticmethod
def GetHandState(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(request, target, '/aimdk.protocol.HalHandService/GetHandState',
aimdk_dot_protocol_dot_common_dot_rpc__pb2.CommonRequest.SerializeToString,
aimdk_dot_protocol_dot_hal_dot_hand_dot_hal__hand__service__pb2.HandStateResponse.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@staticmethod
def SetHandCommand(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(request, target, '/aimdk.protocol.HalHandService/SetHandCommand',
aimdk_dot_protocol_dot_hal_dot_hand_dot_hal__hand__service__pb2.HandCommandRequest.SerializeToString,
aimdk_dot_protocol_dot_common_dot_rpc__pb2.CommonResponse.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

View File

@@ -0,0 +1,35 @@
syntax = "proto3";
package aimdk.protocol;
import public "aimdk/protocol/common/header.proto";
import public "aimdk/protocol/hal/hand/inspire.proto";
import public "aimdk/protocol/hal/hand/jodell.proto";
import public "aimdk/protocol/hal/hand/agi_claw.proto";
message SingleHandState {
oneof hand {
InspireHand inspire = 1; // 因时手
ClawHand claw = 2; // jodell夹爪手
AgiClawHandState agi_claw_state = 3; // agi自研夹爪状态
}
}
message SingleHandCommand {
oneof hand {
InspireHand inspire = 1; // 因时手
ClawHand claw = 2; // jodell夹爪手
AgiClawHandCommand agi_claw_cmd = 3; // agi自研夹爪命令
}
}
message HandState {
SingleHandState left = 2; // 左手状态
SingleHandState right = 3; // 右手状态
}
message HandCommand {
SingleHandCommand left = 2; // 左手指令
SingleHandCommand right = 3; // 右手指令
}

View File

@@ -0,0 +1,18 @@
syntax = "proto3";
package aimdk.protocol;
import public "aimdk/protocol/common/header.proto";
import public "aimdk/protocol/hal/hand/hand.proto";
// 机器人手部状态
message HandStateChannel {
Header header = 1; // 消息头
HandState data = 2; // 手部状态
}
// 机器人手部指令
message HandCommandChannel {
Header header = 1; // 消息头
HandCommand data = 2; // 手部指令
}

View File

@@ -0,0 +1,40 @@
# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: aimdk/protocol/hal/hand/hand.proto
# Protobuf Python Version: 4.25.1
"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
from google.protobuf import descriptor_pool as _descriptor_pool
from google.protobuf import symbol_database as _symbol_database
from google.protobuf.internal import builder as _builder
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
from aimdk.protocol.common import header_pb2 as aimdk_dot_protocol_dot_common_dot_header__pb2
from aimdk.protocol.hal.hand import inspire_pb2 as aimdk_dot_protocol_dot_hal_dot_hand_dot_inspire__pb2
from aimdk.protocol.hal.hand import jodell_pb2 as aimdk_dot_protocol_dot_hal_dot_hand_dot_jodell__pb2
from aimdk.protocol.hal.hand import agi_claw_pb2 as aimdk_dot_protocol_dot_hal_dot_hand_dot_agi__claw__pb2
from aimdk.protocol.common.header_pb2 import *
from aimdk.protocol.hal.hand.inspire_pb2 import *
from aimdk.protocol.hal.hand.jodell_pb2 import *
from aimdk.protocol.hal.hand.agi_claw_pb2 import *
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\"aimdk/protocol/hal/hand/hand.proto\x12\x0e\x61imdk.protocol\x1a\"aimdk/protocol/common/header.proto\x1a%aimdk/protocol/hal/hand/inspire.proto\x1a$aimdk/protocol/hal/hand/jodell.proto\x1a&aimdk/protocol/hal/hand/agi_claw.proto\"\xaf\x01\n\x0fSingleHandState\x12.\n\x07inspire\x18\x01 \x01(\x0b\x32\x1b.aimdk.protocol.InspireHandH\x00\x12(\n\x04\x63law\x18\x02 \x01(\x0b\x32\x18.aimdk.protocol.ClawHandH\x00\x12:\n\x0e\x61gi_claw_state\x18\x03 \x01(\x0b\x32 .aimdk.protocol.AgiClawHandStateH\x00\x42\x06\n\x04hand\"\xb1\x01\n\x11SingleHandCommand\x12.\n\x07inspire\x18\x01 \x01(\x0b\x32\x1b.aimdk.protocol.InspireHandH\x00\x12(\n\x04\x63law\x18\x02 \x01(\x0b\x32\x18.aimdk.protocol.ClawHandH\x00\x12:\n\x0c\x61gi_claw_cmd\x18\x03 \x01(\x0b\x32\".aimdk.protocol.AgiClawHandCommandH\x00\x42\x06\n\x04hand\"j\n\tHandState\x12-\n\x04left\x18\x02 \x01(\x0b\x32\x1f.aimdk.protocol.SingleHandState\x12.\n\x05right\x18\x03 \x01(\x0b\x32\x1f.aimdk.protocol.SingleHandState\"p\n\x0bHandCommand\x12/\n\x04left\x18\x02 \x01(\x0b\x32!.aimdk.protocol.SingleHandCommand\x12\x30\n\x05right\x18\x03 \x01(\x0b\x32!.aimdk.protocol.SingleHandCommandP\x00P\x01P\x02P\x03\x62\x06proto3')
_globals = globals()
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'aimdk.protocol.hal.hand.hand_pb2', _globals)
if _descriptor._USE_C_DESCRIPTORS == False:
DESCRIPTOR._options = None
_globals['_SINGLEHANDSTATE']._serialized_start=208
_globals['_SINGLEHANDSTATE']._serialized_end=383
_globals['_SINGLEHANDCOMMAND']._serialized_start=386
_globals['_SINGLEHANDCOMMAND']._serialized_end=563
_globals['_HANDSTATE']._serialized_start=565
_globals['_HANDSTATE']._serialized_end=671
_globals['_HANDCOMMAND']._serialized_start=673
_globals['_HANDCOMMAND']._serialized_end=785
# @@protoc_insertion_point(module_scope)

View File

@@ -0,0 +1,25 @@
syntax = "proto3";
package aimdk.protocol;
// 手指
message Finger {
int32 thumb_pos_0 = 1; // 拇指第一关节
int32 thumb_pos_1 = 2; // 拇指第二关节
int32 index_pos = 3; // 食指
int32 middle_pos = 4; // 中指
int32 ring_pos = 5; // 无名指
int32 pinky_pos = 6; // 小指
}
// 手腕
message Wrist {
int32 x = 1; // x轴
int32 y = 2; // y轴
}
// Inspire手部
message InspireHand {
Finger finger = 1; // 手指
Wrist wrist = 2; // 手腕
}

View File

@@ -0,0 +1,30 @@
# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: aimdk/protocol/hal/hand/inspire.proto
# Protobuf Python Version: 4.25.1
"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
from google.protobuf import descriptor_pool as _descriptor_pool
from google.protobuf import symbol_database as _symbol_database
from google.protobuf.internal import builder as _builder
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n%aimdk/protocol/hal/hand/inspire.proto\x12\x0e\x61imdk.protocol\"~\n\x06\x46inger\x12\x13\n\x0bthumb_pos_0\x18\x01 \x01(\x05\x12\x13\n\x0bthumb_pos_1\x18\x02 \x01(\x05\x12\x11\n\tindex_pos\x18\x03 \x01(\x05\x12\x12\n\nmiddle_pos\x18\x04 \x01(\x05\x12\x10\n\x08ring_pos\x18\x05 \x01(\x05\x12\x11\n\tpinky_pos\x18\x06 \x01(\x05\"\x1d\n\x05Wrist\x12\t\n\x01x\x18\x01 \x01(\x05\x12\t\n\x01y\x18\x02 \x01(\x05\"[\n\x0bInspireHand\x12&\n\x06\x66inger\x18\x01 \x01(\x0b\x32\x16.aimdk.protocol.Finger\x12$\n\x05wrist\x18\x02 \x01(\x0b\x32\x15.aimdk.protocol.Wristb\x06proto3')
_globals = globals()
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'aimdk.protocol.hal.hand.inspire_pb2', _globals)
if _descriptor._USE_C_DESCRIPTORS == False:
DESCRIPTOR._options = None
_globals['_FINGER']._serialized_start=57
_globals['_FINGER']._serialized_end=183
_globals['_WRIST']._serialized_start=185
_globals['_WRIST']._serialized_end=214
_globals['_INSPIREHAND']._serialized_start=216
_globals['_INSPIREHAND']._serialized_end=307
# @@protoc_insertion_point(module_scope)

View File

@@ -0,0 +1,10 @@
syntax = "proto3";
package aimdk.protocol;
// 夹爪手部
message ClawHand {
uint32 position = 1;
uint32 velocity = 2;
uint32 force = 3;
}

View File

@@ -0,0 +1,26 @@
# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: aimdk/protocol/hal/hand/jodell.proto
# Protobuf Python Version: 4.25.1
"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
from google.protobuf import descriptor_pool as _descriptor_pool
from google.protobuf import symbol_database as _symbol_database
from google.protobuf.internal import builder as _builder
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n$aimdk/protocol/hal/hand/jodell.proto\x12\x0e\x61imdk.protocol\"=\n\x08\x43lawHand\x12\x10\n\x08position\x18\x01 \x01(\r\x12\x10\n\x08velocity\x18\x02 \x01(\r\x12\r\n\x05\x66orce\x18\x03 \x01(\rb\x06proto3')
_globals = globals()
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'aimdk.protocol.hal.hand.jodell_pb2', _globals)
if _descriptor._USE_C_DESCRIPTORS == False:
DESCRIPTOR._options = None
_globals['_CLAWHAND']._serialized_start=56
_globals['_CLAWHAND']._serialized_end=117
# @@protoc_insertion_point(module_scope)