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_command_pb2 as bosdyn_dot_api_dot_robot__command__pb2
class RobotCommandServiceStub(object):
"""The robot command service allows a client application to control and move the robot.
"""
def __init__(self, channel):
"""Constructor.
Args:
channel: A grpc.Channel.
"""
self.RobotCommand = channel.unary_unary(
'/bosdyn.api.RobotCommandService/RobotCommand',
request_serializer=bosdyn_dot_api_dot_robot__command__pb2.RobotCommandRequest.SerializeToString,
response_deserializer=bosdyn_dot_api_dot_robot__command__pb2.RobotCommandResponse.FromString,
)
self.RobotCommandFeedback = channel.unary_unary(
'/bosdyn.api.RobotCommandService/RobotCommandFeedback',
request_serializer=bosdyn_dot_api_dot_robot__command__pb2.RobotCommandFeedbackRequest.SerializeToString,
response_deserializer=bosdyn_dot_api_dot_robot__command__pb2.RobotCommandFeedbackResponse.FromString,
)
self.ClearBehaviorFault = channel.unary_unary(
'/bosdyn.api.RobotCommandService/ClearBehaviorFault',
request_serializer=bosdyn_dot_api_dot_robot__command__pb2.ClearBehaviorFaultRequest.SerializeToString,
response_deserializer=bosdyn_dot_api_dot_robot__command__pb2.ClearBehaviorFaultResponse.FromString,
)
class RobotCommandServiceServicer(object):
"""The robot command service allows a client application to control and move the robot.
"""
def RobotCommand(self, request, context):
"""Starts a behavior command on the robot. Issuing a new command overrides the active command.
Each command is issued a UID for feedback retrieval.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def RobotCommandFeedback(self, request, context):
"""A client queries this RPC to determine a robot's progress towards completion of a command.
This updates the client with metrics like "distance to goal."
The client should use this feedback to determine whether the current command has
succeeded or failed, and thus send the next command.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def ClearBehaviorFault(self, request, context):
"""Clear robot behavior fault.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def add_RobotCommandServiceServicer_to_server(servicer, server):
rpc_method_handlers = {
'RobotCommand': grpc.unary_unary_rpc_method_handler(
servicer.RobotCommand,
request_deserializer=bosdyn_dot_api_dot_robot__command__pb2.RobotCommandRequest.FromString,
response_serializer=bosdyn_dot_api_dot_robot__command__pb2.RobotCommandResponse.SerializeToString,
),
'RobotCommandFeedback': grpc.unary_unary_rpc_method_handler(
servicer.RobotCommandFeedback,
request_deserializer=bosdyn_dot_api_dot_robot__command__pb2.RobotCommandFeedbackRequest.FromString,
response_serializer=bosdyn_dot_api_dot_robot__command__pb2.RobotCommandFeedbackResponse.SerializeToString,
),
'ClearBehaviorFault': grpc.unary_unary_rpc_method_handler(
servicer.ClearBehaviorFault,
request_deserializer=bosdyn_dot_api_dot_robot__command__pb2.ClearBehaviorFaultRequest.FromString,
response_serializer=bosdyn_dot_api_dot_robot__command__pb2.ClearBehaviorFaultResponse.SerializeToString,
),
}
generic_handler = grpc.method_handlers_generic_handler(
'bosdyn.api.RobotCommandService', rpc_method_handlers)
server.add_generic_rpc_handlers((generic_handler,))
# This class is part of an EXPERIMENTAL API.
class RobotCommandService(object):
"""The robot command service allows a client application to control and move the robot.
"""
@staticmethod
def RobotCommand(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.RobotCommandService/RobotCommand',
bosdyn_dot_api_dot_robot__command__pb2.RobotCommandRequest.SerializeToString,
bosdyn_dot_api_dot_robot__command__pb2.RobotCommandResponse.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@staticmethod
def RobotCommandFeedback(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.RobotCommandService/RobotCommandFeedback',
bosdyn_dot_api_dot_robot__command__pb2.RobotCommandFeedbackRequest.SerializeToString,
bosdyn_dot_api_dot_robot__command__pb2.RobotCommandFeedbackResponse.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@staticmethod
def ClearBehaviorFault(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.RobotCommandService/ClearBehaviorFault',
bosdyn_dot_api_dot_robot__command__pb2.ClearBehaviorFaultRequest.SerializeToString,
bosdyn_dot_api_dot_robot__command__pb2.ClearBehaviorFaultResponse.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
class RobotCommandStreamingServiceStub(object):
"""This service is used to stream high rate commands to the robot once they have been activated
using RobotCommandService.RobotCommand
This service is in BETA and may undergo changes in future releases.
"""
def __init__(self, channel):
"""Constructor.
Args:
channel: A grpc.Channel.
"""
self.JointControlStream = channel.stream_unary(
'/bosdyn.api.RobotCommandStreamingService/JointControlStream',
request_serializer=bosdyn_dot_api_dot_robot__command__pb2.JointControlStreamRequest.SerializeToString,
response_deserializer=bosdyn_dot_api_dot_robot__command__pb2.JointControlStreamResponse.FromString,
)
class RobotCommandStreamingServiceServicer(object):
"""This service is used to stream high rate commands to the robot once they have been activated
using RobotCommandService.RobotCommand
This service is in BETA and may undergo changes in future releases.
"""
def JointControlStream(self, request_iterator, context):
"""Command updates for joint control
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def add_RobotCommandStreamingServiceServicer_to_server(servicer, server):
rpc_method_handlers = {
'JointControlStream': grpc.stream_unary_rpc_method_handler(
servicer.JointControlStream,
request_deserializer=bosdyn_dot_api_dot_robot__command__pb2.JointControlStreamRequest.FromString,
response_serializer=bosdyn_dot_api_dot_robot__command__pb2.JointControlStreamResponse.SerializeToString,
),
}
generic_handler = grpc.method_handlers_generic_handler(
'bosdyn.api.RobotCommandStreamingService', rpc_method_handlers)
server.add_generic_rpc_handlers((generic_handler,))
# This class is part of an EXPERIMENTAL API.
class RobotCommandStreamingService(object):
"""This service is used to stream high rate commands to the robot once they have been activated
using RobotCommandService.RobotCommand
This service is in BETA and may undergo changes in future releases.
"""
@staticmethod
def JointControlStream(request_iterator,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.stream_unary(request_iterator, target, '/bosdyn.api.RobotCommandStreamingService/JointControlStream',
bosdyn_dot_api_dot_robot__command__pb2.JointControlStreamRequest.SerializeToString,
bosdyn_dot_api_dot_robot__command__pb2.JointControlStreamResponse.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)