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,69 @@
syntax = "proto3";
package aimdk.protocol;
import public "aimdk/protocol/common/header.proto";
import public "aimdk/protocol/common/joint.proto";
import public "aimdk/protocol/common/se3_pose.proto";
message JointStatesChannel {
/** 消息头 */
Header header = 1;
/**
* 关节状态,包括角度和速度、扭矩
*/
repeated JointState states = 2;
}
message IKStatus{
repeated string joint_names=1;
repeated double joint_positions=2;
bool isSuccess=3;
}
message JointCommandsChannel {
/** 消息头 */
Header header = 1;
/**
* 关节指令
*/
repeated JointCommand commands = 2;
}
message GetJointReq {
string serial_no = 1;
}
message GetJointRsp {
repeated JointState states = 1;
}
message GetEEPoseReq {
bool is_right = 1;
}
message GetEEPoseRsp {
string prim_path = 1;
SE3RpyPose ee_pose = 2;
}
message GetIKStatusReq {
bool is_right = 1;
repeated SE3RpyPose target_pose = 2;
bool ObsAvoid = 3;
}
message GetIKStatusRsp {
repeated IKStatus IKStatus = 2;
}
message SetJointReq {
repeated JointCommand commands = 1;
bool is_trajectory = 2;
}
message SetJointRsp {
string errmsg = 1;
}
service JointControlService {
rpc GetJointPosition(GetJointReq) returns(GetJointRsp);
rpc SetJointPosition(SetJointReq) returns(SetJointRsp);
rpc GetIKStatus(GetIKStatusReq) returns(GetIKStatusRsp);
rpc GetEEPose(GetEEPoseReq) returns(GetEEPoseRsp);
}

View File

@@ -0,0 +1,66 @@
# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: aimdk/protocol/hal/joint/joint_channel.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.common import joint_pb2 as aimdk_dot_protocol_dot_common_dot_joint__pb2
from aimdk.protocol.common import se3_pose_pb2 as aimdk_dot_protocol_dot_common_dot_se3__pose__pb2
try:
aimdk_dot_protocol_dot_common_dot_vec3__pb2 = aimdk_dot_protocol_dot_common_dot_se3__pose__pb2.aimdk_dot_protocol_dot_common_dot_vec3__pb2
except AttributeError:
aimdk_dot_protocol_dot_common_dot_vec3__pb2 = aimdk_dot_protocol_dot_common_dot_se3__pose__pb2.aimdk.protocol.common.vec3_pb2
try:
aimdk_dot_protocol_dot_common_dot_quaternion__pb2 = aimdk_dot_protocol_dot_common_dot_se3__pose__pb2.aimdk_dot_protocol_dot_common_dot_quaternion__pb2
except AttributeError:
aimdk_dot_protocol_dot_common_dot_quaternion__pb2 = aimdk_dot_protocol_dot_common_dot_se3__pose__pb2.aimdk.protocol.common.quaternion_pb2
try:
aimdk_dot_protocol_dot_common_dot_rpy__pb2 = aimdk_dot_protocol_dot_common_dot_se3__pose__pb2.aimdk_dot_protocol_dot_common_dot_rpy__pb2
except AttributeError:
aimdk_dot_protocol_dot_common_dot_rpy__pb2 = aimdk_dot_protocol_dot_common_dot_se3__pose__pb2.aimdk.protocol.common.rpy_pb2
from aimdk.protocol.common.header_pb2 import *
from aimdk.protocol.common.joint_pb2 import *
from aimdk.protocol.common.se3_pose_pb2 import *
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n,aimdk/protocol/hal/joint/joint_channel.proto\x12\x0e\x61imdk.protocol\x1a\"aimdk/protocol/common/header.proto\x1a!aimdk/protocol/common/joint.proto\x1a$aimdk/protocol/common/se3_pose.proto\"h\n\x12JointStatesChannel\x12&\n\x06header\x18\x01 \x01(\x0b\x32\x16.aimdk.protocol.Header\x12*\n\x06states\x18\x02 \x03(\x0b\x32\x1a.aimdk.protocol.JointState\"K\n\x08IKStatus\x12\x13\n\x0bjoint_names\x18\x01 \x03(\t\x12\x17\n\x0fjoint_positions\x18\x02 \x03(\x01\x12\x11\n\tisSuccess\x18\x03 \x01(\x08\"n\n\x14JointCommandsChannel\x12&\n\x06header\x18\x01 \x01(\x0b\x32\x16.aimdk.protocol.Header\x12.\n\x08\x63ommands\x18\x02 \x03(\x0b\x32\x1c.aimdk.protocol.JointCommand\" \n\x0bGetJointReq\x12\x11\n\tserial_no\x18\x01 \x01(\t\"9\n\x0bGetJointRsp\x12*\n\x06states\x18\x01 \x03(\x0b\x32\x1a.aimdk.protocol.JointState\" \n\x0cGetEEPoseReq\x12\x10\n\x08is_right\x18\x01 \x01(\x08\"N\n\x0cGetEEPoseRsp\x12\x11\n\tprim_path\x18\x01 \x01(\t\x12+\n\x07\x65\x65_pose\x18\x02 \x01(\x0b\x32\x1a.aimdk.protocol.SE3RpyPose\"e\n\x0eGetIKStatusReq\x12\x10\n\x08is_right\x18\x01 \x01(\x08\x12/\n\x0btarget_pose\x18\x02 \x03(\x0b\x32\x1a.aimdk.protocol.SE3RpyPose\x12\x10\n\x08ObsAvoid\x18\x03 \x01(\x08\"<\n\x0eGetIKStatusRsp\x12*\n\x08IKStatus\x18\x02 \x03(\x0b\x32\x18.aimdk.protocol.IKStatus\"T\n\x0bSetJointReq\x12.\n\x08\x63ommands\x18\x01 \x03(\x0b\x32\x1c.aimdk.protocol.JointCommand\x12\x15\n\ris_trajectory\x18\x02 \x01(\x08\"\x1d\n\x0bSetJointRsp\x12\x0e\n\x06\x65rrmsg\x18\x01 \x01(\t2\xc9\x02\n\x13JointControlService\x12L\n\x10GetJointPosition\x12\x1b.aimdk.protocol.GetJointReq\x1a\x1b.aimdk.protocol.GetJointRsp\x12L\n\x10SetJointPosition\x12\x1b.aimdk.protocol.SetJointReq\x1a\x1b.aimdk.protocol.SetJointRsp\x12M\n\x0bGetIKStatus\x12\x1e.aimdk.protocol.GetIKStatusReq\x1a\x1e.aimdk.protocol.GetIKStatusRsp\x12G\n\tGetEEPose\x12\x1c.aimdk.protocol.GetEEPoseReq\x1a\x1c.aimdk.protocol.GetEEPoseRspP\x00P\x01P\x02\x62\x06proto3')
_globals = globals()
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'aimdk.protocol.hal.joint.joint_channel_pb2', _globals)
if _descriptor._USE_C_DESCRIPTORS == False:
DESCRIPTOR._options = None
_globals['_JOINTSTATESCHANNEL']._serialized_start=173
_globals['_JOINTSTATESCHANNEL']._serialized_end=277
_globals['_IKSTATUS']._serialized_start=279
_globals['_IKSTATUS']._serialized_end=354
_globals['_JOINTCOMMANDSCHANNEL']._serialized_start=356
_globals['_JOINTCOMMANDSCHANNEL']._serialized_end=466
_globals['_GETJOINTREQ']._serialized_start=468
_globals['_GETJOINTREQ']._serialized_end=500
_globals['_GETJOINTRSP']._serialized_start=502
_globals['_GETJOINTRSP']._serialized_end=559
_globals['_GETEEPOSEREQ']._serialized_start=561
_globals['_GETEEPOSEREQ']._serialized_end=593
_globals['_GETEEPOSERSP']._serialized_start=595
_globals['_GETEEPOSERSP']._serialized_end=673
_globals['_GETIKSTATUSREQ']._serialized_start=675
_globals['_GETIKSTATUSREQ']._serialized_end=776
_globals['_GETIKSTATUSRSP']._serialized_start=778
_globals['_GETIKSTATUSRSP']._serialized_end=838
_globals['_SETJOINTREQ']._serialized_start=840
_globals['_SETJOINTREQ']._serialized_end=924
_globals['_SETJOINTRSP']._serialized_start=926
_globals['_SETJOINTRSP']._serialized_end=955
_globals['_JOINTCONTROLSERVICE']._serialized_start=958
_globals['_JOINTCONTROLSERVICE']._serialized_end=1287
# @@protoc_insertion_point(module_scope)

View File

@@ -0,0 +1,165 @@
# 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.hal.joint import joint_channel_pb2 as aimdk_dot_protocol_dot_hal_dot_joint_dot_joint__channel__pb2
class JointControlServiceStub(object):
"""Missing associated documentation comment in .proto file."""
def __init__(self, channel):
"""Constructor.
Args:
channel: A grpc.Channel.
"""
self.GetJointPosition = channel.unary_unary(
'/aimdk.protocol.JointControlService/GetJointPosition',
request_serializer=aimdk_dot_protocol_dot_hal_dot_joint_dot_joint__channel__pb2.GetJointReq.SerializeToString,
response_deserializer=aimdk_dot_protocol_dot_hal_dot_joint_dot_joint__channel__pb2.GetJointRsp.FromString,
)
self.SetJointPosition = channel.unary_unary(
'/aimdk.protocol.JointControlService/SetJointPosition',
request_serializer=aimdk_dot_protocol_dot_hal_dot_joint_dot_joint__channel__pb2.SetJointReq.SerializeToString,
response_deserializer=aimdk_dot_protocol_dot_hal_dot_joint_dot_joint__channel__pb2.SetJointRsp.FromString,
)
self.GetIKStatus = channel.unary_unary(
'/aimdk.protocol.JointControlService/GetIKStatus',
request_serializer=aimdk_dot_protocol_dot_hal_dot_joint_dot_joint__channel__pb2.GetIKStatusReq.SerializeToString,
response_deserializer=aimdk_dot_protocol_dot_hal_dot_joint_dot_joint__channel__pb2.GetIKStatusRsp.FromString,
)
self.GetEEPose = channel.unary_unary(
'/aimdk.protocol.JointControlService/GetEEPose',
request_serializer=aimdk_dot_protocol_dot_hal_dot_joint_dot_joint__channel__pb2.GetEEPoseReq.SerializeToString,
response_deserializer=aimdk_dot_protocol_dot_hal_dot_joint_dot_joint__channel__pb2.GetEEPoseRsp.FromString,
)
class JointControlServiceServicer(object):
"""Missing associated documentation comment in .proto file."""
def GetJointPosition(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 SetJointPosition(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 GetIKStatus(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 GetEEPose(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_JointControlServiceServicer_to_server(servicer, server):
rpc_method_handlers = {
'GetJointPosition': grpc.unary_unary_rpc_method_handler(
servicer.GetJointPosition,
request_deserializer=aimdk_dot_protocol_dot_hal_dot_joint_dot_joint__channel__pb2.GetJointReq.FromString,
response_serializer=aimdk_dot_protocol_dot_hal_dot_joint_dot_joint__channel__pb2.GetJointRsp.SerializeToString,
),
'SetJointPosition': grpc.unary_unary_rpc_method_handler(
servicer.SetJointPosition,
request_deserializer=aimdk_dot_protocol_dot_hal_dot_joint_dot_joint__channel__pb2.SetJointReq.FromString,
response_serializer=aimdk_dot_protocol_dot_hal_dot_joint_dot_joint__channel__pb2.SetJointRsp.SerializeToString,
),
'GetIKStatus': grpc.unary_unary_rpc_method_handler(
servicer.GetIKStatus,
request_deserializer=aimdk_dot_protocol_dot_hal_dot_joint_dot_joint__channel__pb2.GetIKStatusReq.FromString,
response_serializer=aimdk_dot_protocol_dot_hal_dot_joint_dot_joint__channel__pb2.GetIKStatusRsp.SerializeToString,
),
'GetEEPose': grpc.unary_unary_rpc_method_handler(
servicer.GetEEPose,
request_deserializer=aimdk_dot_protocol_dot_hal_dot_joint_dot_joint__channel__pb2.GetEEPoseReq.FromString,
response_serializer=aimdk_dot_protocol_dot_hal_dot_joint_dot_joint__channel__pb2.GetEEPoseRsp.SerializeToString,
),
}
generic_handler = grpc.method_handlers_generic_handler(
'aimdk.protocol.JointControlService', rpc_method_handlers)
server.add_generic_rpc_handlers((generic_handler,))
# This class is part of an EXPERIMENTAL API.
class JointControlService(object):
"""Missing associated documentation comment in .proto file."""
@staticmethod
def GetJointPosition(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.JointControlService/GetJointPosition',
aimdk_dot_protocol_dot_hal_dot_joint_dot_joint__channel__pb2.GetJointReq.SerializeToString,
aimdk_dot_protocol_dot_hal_dot_joint_dot_joint__channel__pb2.GetJointRsp.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@staticmethod
def SetJointPosition(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.JointControlService/SetJointPosition',
aimdk_dot_protocol_dot_hal_dot_joint_dot_joint__channel__pb2.SetJointReq.SerializeToString,
aimdk_dot_protocol_dot_hal_dot_joint_dot_joint__channel__pb2.SetJointRsp.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@staticmethod
def GetIKStatus(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.JointControlService/GetIKStatus',
aimdk_dot_protocol_dot_hal_dot_joint_dot_joint__channel__pb2.GetIKStatusReq.SerializeToString,
aimdk_dot_protocol_dot_hal_dot_joint_dot_joint__channel__pb2.GetIKStatusRsp.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@staticmethod
def GetEEPose(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.JointControlService/GetEEPose',
aimdk_dot_protocol_dot_hal_dot_joint_dot_joint__channel__pb2.GetEEPoseReq.SerializeToString,
aimdk_dot_protocol_dot_hal_dot_joint_dot_joint__channel__pb2.GetEEPoseRsp.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

View File

@@ -0,0 +1,7 @@
string name
uint32 sequence
float64 position
float64 velocity
float64 effort
float64 stiffness
float64 damping

View File

@@ -0,0 +1,3 @@
std_msgs/Header header
Command[] joints

View File

@@ -0,0 +1,3 @@
std_msgs/Header header
State[] joints

View File

@@ -0,0 +1,5 @@
string name
uint32 sequence
float64 position
float64 velocity
float64 effort