grpc_client/generated/cmvr/api/humanoid_robot_service_pb2_grpc.py

572 lines
24 KiB
Python
Raw Normal View History

2025-11-13 03:01:00 +08:00
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc
2026-03-16 09:23:56 +08:00
import warnings
2025-11-13 03:01:00 +08:00
from cmvr.api import common_pb2 as cmvr_dot_api_dot_common__pb2
from cmvr.api import humanoid_robot_command_pb2 as cmvr_dot_api_dot_humanoid__robot__command__pb2
2026-03-16 09:23:56 +08:00
GRPC_GENERATED_VERSION = '1.76.0'
GRPC_VERSION = grpc.__version__
_version_not_supported = False
try:
from grpc._utilities import first_version_is_lower
_version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
except ImportError:
_version_not_supported = True
if _version_not_supported:
raise RuntimeError(
f'The grpc package installed is at version {GRPC_VERSION},'
+ ' but the generated code in cmvr/api/humanoid_robot_service_pb2_grpc.py depends on'
+ f' grpcio>={GRPC_GENERATED_VERSION}.'
+ f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
+ f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
)
2025-11-13 03:01:00 +08:00
class HumanoidRobotServiceStub(object):
"""Missing associated documentation comment in .proto file."""
def __init__(self, channel):
"""Constructor.
Args:
channel: A grpc.Channel.
"""
self.torqueOff = channel.unary_unary(
'/cmvr.api.HumanoidRobotService/torqueOff',
request_serializer=cmvr_dot_api_dot_common__pb2.CommandHeader.Request.SerializeToString,
response_deserializer=cmvr_dot_api_dot_common__pb2.CommandHeader.Feedback.FromString,
2026-03-16 09:23:56 +08:00
_registered_method=True)
2025-11-13 03:01:00 +08:00
self.torqueOn = channel.unary_unary(
'/cmvr.api.HumanoidRobotService/torqueOn',
request_serializer=cmvr_dot_api_dot_common__pb2.CommandHeader.Request.SerializeToString,
response_deserializer=cmvr_dot_api_dot_common__pb2.CommandHeader.Feedback.FromString,
2026-03-16 09:23:56 +08:00
_registered_method=True)
2025-11-13 03:01:00 +08:00
self.moveJ = channel.unary_unary(
'/cmvr.api.HumanoidRobotService/moveJ',
request_serializer=cmvr_dot_api_dot_humanoid__robot__command__pb2.MoveJ.Request.SerializeToString,
response_deserializer=cmvr_dot_api_dot_humanoid__robot__command__pb2.MoveJ.Response.FromString,
2026-03-16 09:23:56 +08:00
_registered_method=True)
2025-11-13 03:01:00 +08:00
self.moveL = channel.unary_unary(
'/cmvr.api.HumanoidRobotService/moveL',
request_serializer=cmvr_dot_api_dot_humanoid__robot__command__pb2.MoveL.Request.SerializeToString,
response_deserializer=cmvr_dot_api_dot_humanoid__robot__command__pb2.MoveL.Response.FromString,
2026-03-16 09:23:56 +08:00
_registered_method=True)
2025-11-13 03:01:00 +08:00
self.speedJ = channel.unary_unary(
'/cmvr.api.HumanoidRobotService/speedJ',
request_serializer=cmvr_dot_api_dot_humanoid__robot__command__pb2.SpeedJ.Request.SerializeToString,
response_deserializer=cmvr_dot_api_dot_humanoid__robot__command__pb2.SpeedJ.Response.FromString,
2026-03-16 09:23:56 +08:00
_registered_method=True)
2025-11-13 03:01:00 +08:00
self.speedL = channel.unary_unary(
'/cmvr.api.HumanoidRobotService/speedL',
request_serializer=cmvr_dot_api_dot_humanoid__robot__command__pb2.SpeedL.Request.SerializeToString,
response_deserializer=cmvr_dot_api_dot_humanoid__robot__command__pb2.SpeedL.Response.FromString,
2026-03-16 09:23:56 +08:00
_registered_method=True)
2025-11-13 03:01:00 +08:00
self.getJointState = channel.unary_unary(
'/cmvr.api.HumanoidRobotService/getJointState',
request_serializer=cmvr_dot_api_dot_humanoid__robot__command__pb2.JointRequest.SerializeToString,
response_deserializer=cmvr_dot_api_dot_humanoid__robot__command__pb2.JointResponse.FromString,
2026-03-16 09:23:56 +08:00
_registered_method=True)
2025-11-13 03:01:00 +08:00
self.getPose = channel.unary_unary(
'/cmvr.api.HumanoidRobotService/getPose',
request_serializer=cmvr_dot_api_dot_humanoid__robot__command__pb2.GetPose.Request.SerializeToString,
response_deserializer=cmvr_dot_api_dot_humanoid__robot__command__pb2.GetPose.Response.FromString,
2026-03-16 09:23:56 +08:00
_registered_method=True)
self.calibrateZeroQ = channel.unary_unary(
'/cmvr.api.HumanoidRobotService/calibrateZeroQ',
request_serializer=cmvr_dot_api_dot_humanoid__robot__command__pb2.CalibrateZeroQ.Request.SerializeToString,
response_deserializer=cmvr_dot_api_dot_humanoid__robot__command__pb2.CalibrateZeroQ.Response.FromString,
_registered_method=True)
self.servoJ = channel.unary_unary(
'/cmvr.api.HumanoidRobotService/servoJ',
request_serializer=cmvr_dot_api_dot_humanoid__robot__command__pb2.ServoJ.Request.SerializeToString,
response_deserializer=cmvr_dot_api_dot_humanoid__robot__command__pb2.ServoJ.Response.FromString,
_registered_method=True)
2026-06-17 09:36:26 +08:00
self.getPoseMatrix = channel.unary_unary(
'/cmvr.api.HumanoidRobotService/getPoseMatrix',
request_serializer=cmvr_dot_api_dot_humanoid__robot__command__pb2.GetPoseMatrix.Request.SerializeToString,
response_deserializer=cmvr_dot_api_dot_humanoid__robot__command__pb2.GetPoseMatrix.Response.FromString,
_registered_method=True)
self.computeForwardKinematics = channel.unary_unary(
'/cmvr.api.HumanoidRobotService/computeForwardKinematics',
request_serializer=cmvr_dot_api_dot_humanoid__robot__command__pb2.ComputeForwardKinematics.Request.SerializeToString,
response_deserializer=cmvr_dot_api_dot_humanoid__robot__command__pb2.ComputeForwardKinematics.Response.FromString,
_registered_method=True)
2025-11-13 03:01:00 +08:00
class HumanoidRobotServiceServicer(object):
"""Missing associated documentation comment in .proto file."""
def torqueOff(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 torqueOn(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 moveJ(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 moveL(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 speedJ(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 speedL(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 getJointState(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 getPose(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!')
2026-03-16 09:23:56 +08:00
def calibrateZeroQ(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 servoJ(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!')
2026-06-17 09:36:26 +08:00
def getPoseMatrix(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 computeForwardKinematics(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!')
2025-11-13 03:01:00 +08:00
def add_HumanoidRobotServiceServicer_to_server(servicer, server):
rpc_method_handlers = {
'torqueOff': grpc.unary_unary_rpc_method_handler(
servicer.torqueOff,
request_deserializer=cmvr_dot_api_dot_common__pb2.CommandHeader.Request.FromString,
response_serializer=cmvr_dot_api_dot_common__pb2.CommandHeader.Feedback.SerializeToString,
),
'torqueOn': grpc.unary_unary_rpc_method_handler(
servicer.torqueOn,
request_deserializer=cmvr_dot_api_dot_common__pb2.CommandHeader.Request.FromString,
response_serializer=cmvr_dot_api_dot_common__pb2.CommandHeader.Feedback.SerializeToString,
),
'moveJ': grpc.unary_unary_rpc_method_handler(
servicer.moveJ,
request_deserializer=cmvr_dot_api_dot_humanoid__robot__command__pb2.MoveJ.Request.FromString,
response_serializer=cmvr_dot_api_dot_humanoid__robot__command__pb2.MoveJ.Response.SerializeToString,
),
'moveL': grpc.unary_unary_rpc_method_handler(
servicer.moveL,
request_deserializer=cmvr_dot_api_dot_humanoid__robot__command__pb2.MoveL.Request.FromString,
response_serializer=cmvr_dot_api_dot_humanoid__robot__command__pb2.MoveL.Response.SerializeToString,
),
'speedJ': grpc.unary_unary_rpc_method_handler(
servicer.speedJ,
request_deserializer=cmvr_dot_api_dot_humanoid__robot__command__pb2.SpeedJ.Request.FromString,
response_serializer=cmvr_dot_api_dot_humanoid__robot__command__pb2.SpeedJ.Response.SerializeToString,
),
'speedL': grpc.unary_unary_rpc_method_handler(
servicer.speedL,
request_deserializer=cmvr_dot_api_dot_humanoid__robot__command__pb2.SpeedL.Request.FromString,
response_serializer=cmvr_dot_api_dot_humanoid__robot__command__pb2.SpeedL.Response.SerializeToString,
),
'getJointState': grpc.unary_unary_rpc_method_handler(
servicer.getJointState,
request_deserializer=cmvr_dot_api_dot_humanoid__robot__command__pb2.JointRequest.FromString,
response_serializer=cmvr_dot_api_dot_humanoid__robot__command__pb2.JointResponse.SerializeToString,
),
'getPose': grpc.unary_unary_rpc_method_handler(
servicer.getPose,
request_deserializer=cmvr_dot_api_dot_humanoid__robot__command__pb2.GetPose.Request.FromString,
response_serializer=cmvr_dot_api_dot_humanoid__robot__command__pb2.GetPose.Response.SerializeToString,
),
2026-03-16 09:23:56 +08:00
'calibrateZeroQ': grpc.unary_unary_rpc_method_handler(
servicer.calibrateZeroQ,
request_deserializer=cmvr_dot_api_dot_humanoid__robot__command__pb2.CalibrateZeroQ.Request.FromString,
response_serializer=cmvr_dot_api_dot_humanoid__robot__command__pb2.CalibrateZeroQ.Response.SerializeToString,
),
'servoJ': grpc.unary_unary_rpc_method_handler(
servicer.servoJ,
request_deserializer=cmvr_dot_api_dot_humanoid__robot__command__pb2.ServoJ.Request.FromString,
response_serializer=cmvr_dot_api_dot_humanoid__robot__command__pb2.ServoJ.Response.SerializeToString,
),
2026-06-17 09:36:26 +08:00
'getPoseMatrix': grpc.unary_unary_rpc_method_handler(
servicer.getPoseMatrix,
request_deserializer=cmvr_dot_api_dot_humanoid__robot__command__pb2.GetPoseMatrix.Request.FromString,
response_serializer=cmvr_dot_api_dot_humanoid__robot__command__pb2.GetPoseMatrix.Response.SerializeToString,
),
'computeForwardKinematics': grpc.unary_unary_rpc_method_handler(
servicer.computeForwardKinematics,
request_deserializer=cmvr_dot_api_dot_humanoid__robot__command__pb2.ComputeForwardKinematics.Request.FromString,
response_serializer=cmvr_dot_api_dot_humanoid__robot__command__pb2.ComputeForwardKinematics.Response.SerializeToString,
),
2025-11-13 03:01:00 +08:00
}
generic_handler = grpc.method_handlers_generic_handler(
'cmvr.api.HumanoidRobotService', rpc_method_handlers)
server.add_generic_rpc_handlers((generic_handler,))
2026-03-16 09:23:56 +08:00
server.add_registered_method_handlers('cmvr.api.HumanoidRobotService', rpc_method_handlers)
2025-11-13 03:01:00 +08:00
# This class is part of an EXPERIMENTAL API.
class HumanoidRobotService(object):
"""Missing associated documentation comment in .proto file."""
@staticmethod
def torqueOff(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
2026-03-16 09:23:56 +08:00
return grpc.experimental.unary_unary(
request,
target,
'/cmvr.api.HumanoidRobotService/torqueOff',
2025-11-13 03:01:00 +08:00
cmvr_dot_api_dot_common__pb2.CommandHeader.Request.SerializeToString,
cmvr_dot_api_dot_common__pb2.CommandHeader.Feedback.FromString,
2026-03-16 09:23:56 +08:00
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)
2025-11-13 03:01:00 +08:00
@staticmethod
def torqueOn(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
2026-03-16 09:23:56 +08:00
return grpc.experimental.unary_unary(
request,
target,
'/cmvr.api.HumanoidRobotService/torqueOn',
2025-11-13 03:01:00 +08:00
cmvr_dot_api_dot_common__pb2.CommandHeader.Request.SerializeToString,
cmvr_dot_api_dot_common__pb2.CommandHeader.Feedback.FromString,
2026-03-16 09:23:56 +08:00
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)
2025-11-13 03:01:00 +08:00
@staticmethod
def moveJ(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
2026-03-16 09:23:56 +08:00
return grpc.experimental.unary_unary(
request,
target,
'/cmvr.api.HumanoidRobotService/moveJ',
2025-11-13 03:01:00 +08:00
cmvr_dot_api_dot_humanoid__robot__command__pb2.MoveJ.Request.SerializeToString,
cmvr_dot_api_dot_humanoid__robot__command__pb2.MoveJ.Response.FromString,
2026-03-16 09:23:56 +08:00
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)
2025-11-13 03:01:00 +08:00
@staticmethod
def moveL(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
2026-03-16 09:23:56 +08:00
return grpc.experimental.unary_unary(
request,
target,
'/cmvr.api.HumanoidRobotService/moveL',
2025-11-13 03:01:00 +08:00
cmvr_dot_api_dot_humanoid__robot__command__pb2.MoveL.Request.SerializeToString,
cmvr_dot_api_dot_humanoid__robot__command__pb2.MoveL.Response.FromString,
2026-03-16 09:23:56 +08:00
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)
2025-11-13 03:01:00 +08:00
@staticmethod
def speedJ(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
2026-03-16 09:23:56 +08:00
return grpc.experimental.unary_unary(
request,
target,
'/cmvr.api.HumanoidRobotService/speedJ',
2025-11-13 03:01:00 +08:00
cmvr_dot_api_dot_humanoid__robot__command__pb2.SpeedJ.Request.SerializeToString,
cmvr_dot_api_dot_humanoid__robot__command__pb2.SpeedJ.Response.FromString,
2026-03-16 09:23:56 +08:00
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)
2025-11-13 03:01:00 +08:00
@staticmethod
def speedL(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
2026-03-16 09:23:56 +08:00
return grpc.experimental.unary_unary(
request,
target,
'/cmvr.api.HumanoidRobotService/speedL',
2025-11-13 03:01:00 +08:00
cmvr_dot_api_dot_humanoid__robot__command__pb2.SpeedL.Request.SerializeToString,
cmvr_dot_api_dot_humanoid__robot__command__pb2.SpeedL.Response.FromString,
2026-03-16 09:23:56 +08:00
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)
2025-11-13 03:01:00 +08:00
@staticmethod
def getJointState(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
2026-03-16 09:23:56 +08:00
return grpc.experimental.unary_unary(
request,
target,
'/cmvr.api.HumanoidRobotService/getJointState',
2025-11-13 03:01:00 +08:00
cmvr_dot_api_dot_humanoid__robot__command__pb2.JointRequest.SerializeToString,
cmvr_dot_api_dot_humanoid__robot__command__pb2.JointResponse.FromString,
2026-03-16 09:23:56 +08:00
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)
2025-11-13 03:01:00 +08:00
@staticmethod
def getPose(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
2026-03-16 09:23:56 +08:00
return grpc.experimental.unary_unary(
request,
target,
'/cmvr.api.HumanoidRobotService/getPose',
2025-11-13 03:01:00 +08:00
cmvr_dot_api_dot_humanoid__robot__command__pb2.GetPose.Request.SerializeToString,
cmvr_dot_api_dot_humanoid__robot__command__pb2.GetPose.Response.FromString,
2026-03-16 09:23:56 +08:00
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)
@staticmethod
def calibrateZeroQ(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,
'/cmvr.api.HumanoidRobotService/calibrateZeroQ',
cmvr_dot_api_dot_humanoid__robot__command__pb2.CalibrateZeroQ.Request.SerializeToString,
cmvr_dot_api_dot_humanoid__robot__command__pb2.CalibrateZeroQ.Response.FromString,
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)
@staticmethod
def servoJ(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,
'/cmvr.api.HumanoidRobotService/servoJ',
cmvr_dot_api_dot_humanoid__robot__command__pb2.ServoJ.Request.SerializeToString,
cmvr_dot_api_dot_humanoid__robot__command__pb2.ServoJ.Response.FromString,
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)
2026-06-17 09:36:26 +08:00
@staticmethod
def getPoseMatrix(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,
'/cmvr.api.HumanoidRobotService/getPoseMatrix',
cmvr_dot_api_dot_humanoid__robot__command__pb2.GetPoseMatrix.Request.SerializeToString,
cmvr_dot_api_dot_humanoid__robot__command__pb2.GetPoseMatrix.Response.FromString,
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)
@staticmethod
def computeForwardKinematics(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,
'/cmvr.api.HumanoidRobotService/computeForwardKinematics',
cmvr_dot_api_dot_humanoid__robot__command__pb2.ComputeForwardKinematics.Request.SerializeToString,
cmvr_dot_api_dot_humanoid__robot__command__pb2.ComputeForwardKinematics.Response.FromString,
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)