Repository URL to install this package:
|
Version:
4.1.0 ▾
|
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc
from bosdyn.api import robot_state_pb2 as bosdyn_dot_api_dot_robot__state__pb2
class RobotStateServiceStub(object):
"""The robot state service tracks all information about the measured and computed states of the
robot at the current time.
"""
def __init__(self, channel):
"""Constructor.
Args:
channel: A grpc.Channel.
"""
self.GetRobotState = channel.unary_unary(
'/bosdyn.api.RobotStateService/GetRobotState',
request_serializer=bosdyn_dot_api_dot_robot__state__pb2.RobotStateRequest.SerializeToString,
response_deserializer=bosdyn_dot_api_dot_robot__state__pb2.RobotStateResponse.FromString,
)
self.GetRobotMetrics = channel.unary_unary(
'/bosdyn.api.RobotStateService/GetRobotMetrics',
request_serializer=bosdyn_dot_api_dot_robot__state__pb2.RobotMetricsRequest.SerializeToString,
response_deserializer=bosdyn_dot_api_dot_robot__state__pb2.RobotMetricsResponse.FromString,
)
self.GetRobotHardwareConfiguration = channel.unary_unary(
'/bosdyn.api.RobotStateService/GetRobotHardwareConfiguration',
request_serializer=bosdyn_dot_api_dot_robot__state__pb2.RobotHardwareConfigurationRequest.SerializeToString,
response_deserializer=bosdyn_dot_api_dot_robot__state__pb2.RobotHardwareConfigurationResponse.FromString,
)
self.GetRobotLinkModel = channel.unary_unary(
'/bosdyn.api.RobotStateService/GetRobotLinkModel',
request_serializer=bosdyn_dot_api_dot_robot__state__pb2.RobotLinkModelRequest.SerializeToString,
response_deserializer=bosdyn_dot_api_dot_robot__state__pb2.RobotLinkModelResponse.FromString,
)
class RobotStateServiceServicer(object):
"""The robot state service tracks all information about the measured and computed states of the
robot at the current time.
"""
def GetRobotState(self, request, context):
"""Get robot state information (such as kinematic state, power state, or faults).
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def GetRobotMetrics(self, request, context):
"""Get different robot metrics and parameters from the robot.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def GetRobotHardwareConfiguration(self, request, context):
"""Get the hardware configuration of the robot, which describes the robot skeleton and urdf.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def GetRobotLinkModel(self, request, context):
"""Returns the OBJ file for a specific robot link. Intended to be called after
GetRobotHardwareConfiguration, using the link names returned by that call.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def add_RobotStateServiceServicer_to_server(servicer, server):
rpc_method_handlers = {
'GetRobotState': grpc.unary_unary_rpc_method_handler(
servicer.GetRobotState,
request_deserializer=bosdyn_dot_api_dot_robot__state__pb2.RobotStateRequest.FromString,
response_serializer=bosdyn_dot_api_dot_robot__state__pb2.RobotStateResponse.SerializeToString,
),
'GetRobotMetrics': grpc.unary_unary_rpc_method_handler(
servicer.GetRobotMetrics,
request_deserializer=bosdyn_dot_api_dot_robot__state__pb2.RobotMetricsRequest.FromString,
response_serializer=bosdyn_dot_api_dot_robot__state__pb2.RobotMetricsResponse.SerializeToString,
),
'GetRobotHardwareConfiguration': grpc.unary_unary_rpc_method_handler(
servicer.GetRobotHardwareConfiguration,
request_deserializer=bosdyn_dot_api_dot_robot__state__pb2.RobotHardwareConfigurationRequest.FromString,
response_serializer=bosdyn_dot_api_dot_robot__state__pb2.RobotHardwareConfigurationResponse.SerializeToString,
),
'GetRobotLinkModel': grpc.unary_unary_rpc_method_handler(
servicer.GetRobotLinkModel,
request_deserializer=bosdyn_dot_api_dot_robot__state__pb2.RobotLinkModelRequest.FromString,
response_serializer=bosdyn_dot_api_dot_robot__state__pb2.RobotLinkModelResponse.SerializeToString,
),
}
generic_handler = grpc.method_handlers_generic_handler(
'bosdyn.api.RobotStateService', rpc_method_handlers)
server.add_generic_rpc_handlers((generic_handler,))
# This class is part of an EXPERIMENTAL API.
class RobotStateService(object):
"""The robot state service tracks all information about the measured and computed states of the
robot at the current time.
"""
@staticmethod
def GetRobotState(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, '/bosdyn.api.RobotStateService/GetRobotState',
bosdyn_dot_api_dot_robot__state__pb2.RobotStateRequest.SerializeToString,
bosdyn_dot_api_dot_robot__state__pb2.RobotStateResponse.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@staticmethod
def GetRobotMetrics(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, '/bosdyn.api.RobotStateService/GetRobotMetrics',
bosdyn_dot_api_dot_robot__state__pb2.RobotMetricsRequest.SerializeToString,
bosdyn_dot_api_dot_robot__state__pb2.RobotMetricsResponse.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@staticmethod
def GetRobotHardwareConfiguration(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, '/bosdyn.api.RobotStateService/GetRobotHardwareConfiguration',
bosdyn_dot_api_dot_robot__state__pb2.RobotHardwareConfigurationRequest.SerializeToString,
bosdyn_dot_api_dot_robot__state__pb2.RobotHardwareConfigurationResponse.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@staticmethod
def GetRobotLinkModel(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, '/bosdyn.api.RobotStateService/GetRobotLinkModel',
bosdyn_dot_api_dot_robot__state__pb2.RobotLinkModelRequest.SerializeToString,
bosdyn_dot_api_dot_robot__state__pb2.RobotLinkModelResponse.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
class RobotStateStreamingServiceStub(object):
"""This service is in BETA and may undergo changes in future releases.
"""
def __init__(self, channel):
"""Constructor.
Args:
channel: A grpc.Channel.
"""
self.GetRobotStateStream = channel.unary_stream(
'/bosdyn.api.RobotStateStreamingService/GetRobotStateStream',
request_serializer=bosdyn_dot_api_dot_robot__state__pb2.RobotStateStreamRequest.SerializeToString,
response_deserializer=bosdyn_dot_api_dot_robot__state__pb2.RobotStateStreamResponse.FromString,
)
class RobotStateStreamingServiceServicer(object):
"""This service is in BETA and may undergo changes in future releases.
"""
def GetRobotStateStream(self, request, context):
"""Lightweight Streaming version of RobotState
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def add_RobotStateStreamingServiceServicer_to_server(servicer, server):
rpc_method_handlers = {
'GetRobotStateStream': grpc.unary_stream_rpc_method_handler(
servicer.GetRobotStateStream,
request_deserializer=bosdyn_dot_api_dot_robot__state__pb2.RobotStateStreamRequest.FromString,
response_serializer=bosdyn_dot_api_dot_robot__state__pb2.RobotStateStreamResponse.SerializeToString,
),
}
generic_handler = grpc.method_handlers_generic_handler(
'bosdyn.api.RobotStateStreamingService', rpc_method_handlers)
server.add_generic_rpc_handlers((generic_handler,))
# This class is part of an EXPERIMENTAL API.
class RobotStateStreamingService(object):
"""This service is in BETA and may undergo changes in future releases.
"""
@staticmethod
def GetRobotStateStream(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_stream(request, target, '/bosdyn.api.RobotStateStreamingService/GetRobotStateStream',
bosdyn_dot_api_dot_robot__state__pb2.RobotStateStreamRequest.SerializeToString,
bosdyn_dot_api_dot_robot__state__pb2.RobotStateStreamResponse.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)