v1

package
v0.0.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 9, 2022 License: AGPL-3.0 Imports: 18 Imported by: 0

Documentation

Overview

Package v1 is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var ArmService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "proto.api.component.arm.v1.ArmService",
	HandlerType: (*ArmServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetEndPosition",
			Handler:    _ArmService_GetEndPosition_Handler,
		},
		{
			MethodName: "MoveToPosition",
			Handler:    _ArmService_MoveToPosition_Handler,
		},
		{
			MethodName: "GetJointPositions",
			Handler:    _ArmService_GetJointPositions_Handler,
		},
		{
			MethodName: "MoveToJointPositions",
			Handler:    _ArmService_MoveToJointPositions_Handler,
		},
		{
			MethodName: "Stop",
			Handler:    _ArmService_Stop_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "proto/api/component/arm/v1/arm.proto",
}

ArmService_ServiceDesc is the grpc.ServiceDesc for ArmService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var File_proto_api_component_arm_v1_arm_proto protoreflect.FileDescriptor

Functions

func RegisterArmServiceHandler

func RegisterArmServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterArmServiceHandler registers the http handlers for service ArmService to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterArmServiceHandlerClient

func RegisterArmServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ArmServiceClient) error

RegisterArmServiceHandlerClient registers the http handlers for service ArmService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ArmServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ArmServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "ArmServiceClient" to call the correct interceptors.

func RegisterArmServiceHandlerFromEndpoint

func RegisterArmServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterArmServiceHandlerFromEndpoint is same as RegisterArmServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterArmServiceHandlerServer

func RegisterArmServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ArmServiceServer) error

RegisterArmServiceHandlerServer registers the http handlers for service ArmService to "mux". UnaryRPC :call ArmServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterArmServiceHandlerFromEndpoint instead.

func RegisterArmServiceServer

func RegisterArmServiceServer(s grpc.ServiceRegistrar, srv ArmServiceServer)

Types

type ArmServiceClient

type ArmServiceClient interface {
	// GetEndPosition gets the current position the end of the robot's arm expressed as X,Y,Z,ox,oy,oz,theta
	GetEndPosition(ctx context.Context, in *GetEndPositionRequest, opts ...grpc.CallOption) (*GetEndPositionResponse, error)
	// MoveToPosition moves the mount point of the robot's end effector to the requested position.
	// This will block until done or a new operation cancels this one
	MoveToPosition(ctx context.Context, in *MoveToPositionRequest, opts ...grpc.CallOption) (*MoveToPositionResponse, error)
	// GetJointPositions lists the joint positions (in degrees) of every joint on a robot
	GetJointPositions(ctx context.Context, in *GetJointPositionsRequest, opts ...grpc.CallOption) (*GetJointPositionsResponse, error)
	// MoveToJointPositions moves every joint on a robot's arm to specified angles which are expressed in degrees
	// This will block until done or a new operation cancels this one
	MoveToJointPositions(ctx context.Context, in *MoveToJointPositionsRequest, opts ...grpc.CallOption) (*MoveToJointPositionsResponse, error)
	// Stop stops a robot's arm
	Stop(ctx context.Context, in *StopRequest, opts ...grpc.CallOption) (*StopResponse, error)
}

ArmServiceClient is the client API for ArmService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewArmServiceClient

func NewArmServiceClient(cc grpc.ClientConnInterface) ArmServiceClient

type ArmServiceServer

type ArmServiceServer interface {
	// GetEndPosition gets the current position the end of the robot's arm expressed as X,Y,Z,ox,oy,oz,theta
	GetEndPosition(context.Context, *GetEndPositionRequest) (*GetEndPositionResponse, error)
	// MoveToPosition moves the mount point of the robot's end effector to the requested position.
	// This will block until done or a new operation cancels this one
	MoveToPosition(context.Context, *MoveToPositionRequest) (*MoveToPositionResponse, error)
	// GetJointPositions lists the joint positions (in degrees) of every joint on a robot
	GetJointPositions(context.Context, *GetJointPositionsRequest) (*GetJointPositionsResponse, error)
	// MoveToJointPositions moves every joint on a robot's arm to specified angles which are expressed in degrees
	// This will block until done or a new operation cancels this one
	MoveToJointPositions(context.Context, *MoveToJointPositionsRequest) (*MoveToJointPositionsResponse, error)
	// Stop stops a robot's arm
	Stop(context.Context, *StopRequest) (*StopResponse, error)
	// contains filtered or unexported methods
}

ArmServiceServer is the server API for ArmService service. All implementations must embed UnimplementedArmServiceServer for forward compatibility

type GetEndPositionRequest

type GetEndPositionRequest struct {

	// Name of an arm
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Additional arguments to the method
	Extra *structpb.Struct `protobuf:"bytes,99,opt,name=extra,proto3" json:"extra,omitempty"`
	// contains filtered or unexported fields
}

func (*GetEndPositionRequest) Descriptor deprecated

func (*GetEndPositionRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetEndPositionRequest.ProtoReflect.Descriptor instead.

func (*GetEndPositionRequest) GetExtra

func (x *GetEndPositionRequest) GetExtra() *structpb.Struct

func (*GetEndPositionRequest) GetName

func (x *GetEndPositionRequest) GetName() string

func (*GetEndPositionRequest) ProtoMessage

func (*GetEndPositionRequest) ProtoMessage()

func (*GetEndPositionRequest) ProtoReflect

func (x *GetEndPositionRequest) ProtoReflect() protoreflect.Message

func (*GetEndPositionRequest) Reset

func (x *GetEndPositionRequest) Reset()

func (*GetEndPositionRequest) String

func (x *GetEndPositionRequest) String() string

type GetEndPositionResponse

type GetEndPositionResponse struct {

	// Returns 6d pose of the end effector relative to the base, represented by X,Y,Z coordinates which express
	// millimeters and theta, ox, oy, oz coordinates which express an orientation vector
	Pose *v1.Pose `protobuf:"bytes,1,opt,name=pose,proto3" json:"pose,omitempty"`
	// contains filtered or unexported fields
}

func (*GetEndPositionResponse) Descriptor deprecated

func (*GetEndPositionResponse) Descriptor() ([]byte, []int)

Deprecated: Use GetEndPositionResponse.ProtoReflect.Descriptor instead.

func (*GetEndPositionResponse) GetPose

func (x *GetEndPositionResponse) GetPose() *v1.Pose

func (*GetEndPositionResponse) ProtoMessage

func (*GetEndPositionResponse) ProtoMessage()

func (*GetEndPositionResponse) ProtoReflect

func (x *GetEndPositionResponse) ProtoReflect() protoreflect.Message

func (*GetEndPositionResponse) Reset

func (x *GetEndPositionResponse) Reset()

func (*GetEndPositionResponse) String

func (x *GetEndPositionResponse) String() string

type GetJointPositionsRequest

type GetJointPositionsRequest struct {

	// Name of an arm
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Additional arguments to the method
	Extra *structpb.Struct `protobuf:"bytes,99,opt,name=extra,proto3" json:"extra,omitempty"`
	// contains filtered or unexported fields
}

func (*GetJointPositionsRequest) Descriptor deprecated

func (*GetJointPositionsRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetJointPositionsRequest.ProtoReflect.Descriptor instead.

func (*GetJointPositionsRequest) GetExtra

func (x *GetJointPositionsRequest) GetExtra() *structpb.Struct

func (*GetJointPositionsRequest) GetName

func (x *GetJointPositionsRequest) GetName() string

func (*GetJointPositionsRequest) ProtoMessage

func (*GetJointPositionsRequest) ProtoMessage()

func (*GetJointPositionsRequest) ProtoReflect

func (x *GetJointPositionsRequest) ProtoReflect() protoreflect.Message

func (*GetJointPositionsRequest) Reset

func (x *GetJointPositionsRequest) Reset()

func (*GetJointPositionsRequest) String

func (x *GetJointPositionsRequest) String() string

type GetJointPositionsResponse

type GetJointPositionsResponse struct {

	//a list JointPositions
	Positions *JointPositions `protobuf:"bytes,1,opt,name=positions,proto3" json:"positions,omitempty"`
	// contains filtered or unexported fields
}

func (*GetJointPositionsResponse) Descriptor deprecated

func (*GetJointPositionsResponse) Descriptor() ([]byte, []int)

Deprecated: Use GetJointPositionsResponse.ProtoReflect.Descriptor instead.

func (*GetJointPositionsResponse) GetPositions

func (x *GetJointPositionsResponse) GetPositions() *JointPositions

func (*GetJointPositionsResponse) ProtoMessage

func (*GetJointPositionsResponse) ProtoMessage()

func (*GetJointPositionsResponse) ProtoReflect

func (*GetJointPositionsResponse) Reset

func (x *GetJointPositionsResponse) Reset()

func (*GetJointPositionsResponse) String

func (x *GetJointPositionsResponse) String() string

type JointPositions

type JointPositions struct {

	// A list of joint positions. Rotations values are in degrees, translational values in mm.
	// The numbers are ordered spatially from the base toward the end effector
	// This is used in GetJointPositionsResponse and MoveToJointPositionsRequest
	Values []float64 `protobuf:"fixed64,1,rep,packed,name=values,proto3" json:"values,omitempty"`
	// contains filtered or unexported fields
}

func (*JointPositions) Descriptor deprecated

func (*JointPositions) Descriptor() ([]byte, []int)

Deprecated: Use JointPositions.ProtoReflect.Descriptor instead.

func (*JointPositions) GetValues

func (x *JointPositions) GetValues() []float64

func (*JointPositions) ProtoMessage

func (*JointPositions) ProtoMessage()

func (*JointPositions) ProtoReflect

func (x *JointPositions) ProtoReflect() protoreflect.Message

func (*JointPositions) Reset

func (x *JointPositions) Reset()

func (*JointPositions) String

func (x *JointPositions) String() string

type MoveToJointPositionsRequest

type MoveToJointPositionsRequest struct {

	// Name of an arm
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// A list of joint positions
	// There should be 1 entry in the list per joint DOF, ordered spatially from the base toward the end effector
	Positions *JointPositions `protobuf:"bytes,2,opt,name=positions,proto3" json:"positions,omitempty"`
	// Additional arguments to the method
	Extra *structpb.Struct `protobuf:"bytes,99,opt,name=extra,proto3" json:"extra,omitempty"`
	// contains filtered or unexported fields
}

func (*MoveToJointPositionsRequest) Descriptor deprecated

func (*MoveToJointPositionsRequest) Descriptor() ([]byte, []int)

Deprecated: Use MoveToJointPositionsRequest.ProtoReflect.Descriptor instead.

func (*MoveToJointPositionsRequest) GetExtra

func (*MoveToJointPositionsRequest) GetName

func (x *MoveToJointPositionsRequest) GetName() string

func (*MoveToJointPositionsRequest) GetPositions

func (x *MoveToJointPositionsRequest) GetPositions() *JointPositions

func (*MoveToJointPositionsRequest) ProtoMessage

func (*MoveToJointPositionsRequest) ProtoMessage()

func (*MoveToJointPositionsRequest) ProtoReflect

func (*MoveToJointPositionsRequest) Reset

func (x *MoveToJointPositionsRequest) Reset()

func (*MoveToJointPositionsRequest) String

func (x *MoveToJointPositionsRequest) String() string

type MoveToJointPositionsResponse

type MoveToJointPositionsResponse struct {
	// contains filtered or unexported fields
}

func (*MoveToJointPositionsResponse) Descriptor deprecated

func (*MoveToJointPositionsResponse) Descriptor() ([]byte, []int)

Deprecated: Use MoveToJointPositionsResponse.ProtoReflect.Descriptor instead.

func (*MoveToJointPositionsResponse) ProtoMessage

func (*MoveToJointPositionsResponse) ProtoMessage()

func (*MoveToJointPositionsResponse) ProtoReflect

func (*MoveToJointPositionsResponse) Reset

func (x *MoveToJointPositionsResponse) Reset()

func (*MoveToJointPositionsResponse) String

type MoveToPositionRequest

type MoveToPositionRequest struct {

	// Name of an arm
	Name       string         `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	To         *v1.Pose       `protobuf:"bytes,2,opt,name=to,proto3" json:"to,omitempty"`
	WorldState *v1.WorldState `protobuf:"bytes,3,opt,name=world_state,json=worldState,proto3,oneof" json:"world_state,omitempty"`
	// Additional arguments to the method
	Extra *structpb.Struct `protobuf:"bytes,99,opt,name=extra,proto3" json:"extra,omitempty"`
	// contains filtered or unexported fields
}

func (*MoveToPositionRequest) Descriptor deprecated

func (*MoveToPositionRequest) Descriptor() ([]byte, []int)

Deprecated: Use MoveToPositionRequest.ProtoReflect.Descriptor instead.

func (*MoveToPositionRequest) GetExtra

func (x *MoveToPositionRequest) GetExtra() *structpb.Struct

func (*MoveToPositionRequest) GetName

func (x *MoveToPositionRequest) GetName() string

func (*MoveToPositionRequest) GetTo

func (x *MoveToPositionRequest) GetTo() *v1.Pose

func (*MoveToPositionRequest) GetWorldState

func (x *MoveToPositionRequest) GetWorldState() *v1.WorldState

func (*MoveToPositionRequest) ProtoMessage

func (*MoveToPositionRequest) ProtoMessage()

func (*MoveToPositionRequest) ProtoReflect

func (x *MoveToPositionRequest) ProtoReflect() protoreflect.Message

func (*MoveToPositionRequest) Reset

func (x *MoveToPositionRequest) Reset()

func (*MoveToPositionRequest) String

func (x *MoveToPositionRequest) String() string

type MoveToPositionResponse

type MoveToPositionResponse struct {
	// contains filtered or unexported fields
}

func (*MoveToPositionResponse) Descriptor deprecated

func (*MoveToPositionResponse) Descriptor() ([]byte, []int)

Deprecated: Use MoveToPositionResponse.ProtoReflect.Descriptor instead.

func (*MoveToPositionResponse) ProtoMessage

func (*MoveToPositionResponse) ProtoMessage()

func (*MoveToPositionResponse) ProtoReflect

func (x *MoveToPositionResponse) ProtoReflect() protoreflect.Message

func (*MoveToPositionResponse) Reset

func (x *MoveToPositionResponse) Reset()

func (*MoveToPositionResponse) String

func (x *MoveToPositionResponse) String() string

type Status

type Status struct {
	EndPosition    *v1.Pose        `protobuf:"bytes,1,opt,name=end_position,json=endPosition,proto3" json:"end_position,omitempty"`
	JointPositions *JointPositions `protobuf:"bytes,2,opt,name=joint_positions,json=jointPositions,proto3" json:"joint_positions,omitempty"`
	IsMoving       bool            `protobuf:"varint,3,opt,name=is_moving,json=isMoving,proto3" json:"is_moving,omitempty"`
	// contains filtered or unexported fields
}

func (*Status) Descriptor deprecated

func (*Status) Descriptor() ([]byte, []int)

Deprecated: Use Status.ProtoReflect.Descriptor instead.

func (*Status) GetEndPosition

func (x *Status) GetEndPosition() *v1.Pose

func (*Status) GetIsMoving

func (x *Status) GetIsMoving() bool

func (*Status) GetJointPositions

func (x *Status) GetJointPositions() *JointPositions

func (*Status) ProtoMessage

func (*Status) ProtoMessage()

func (*Status) ProtoReflect

func (x *Status) ProtoReflect() protoreflect.Message

func (*Status) Reset

func (x *Status) Reset()

func (*Status) String

func (x *Status) String() string

type StopRequest

type StopRequest struct {

	// Name of an arm
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Additional arguments to the method
	Extra *structpb.Struct `protobuf:"bytes,99,opt,name=extra,proto3" json:"extra,omitempty"`
	// contains filtered or unexported fields
}

func (*StopRequest) Descriptor deprecated

func (*StopRequest) Descriptor() ([]byte, []int)

Deprecated: Use StopRequest.ProtoReflect.Descriptor instead.

func (*StopRequest) GetExtra

func (x *StopRequest) GetExtra() *structpb.Struct

func (*StopRequest) GetName

func (x *StopRequest) GetName() string

func (*StopRequest) ProtoMessage

func (*StopRequest) ProtoMessage()

func (*StopRequest) ProtoReflect

func (x *StopRequest) ProtoReflect() protoreflect.Message

func (*StopRequest) Reset

func (x *StopRequest) Reset()

func (*StopRequest) String

func (x *StopRequest) String() string

type StopResponse

type StopResponse struct {
	// contains filtered or unexported fields
}

func (*StopResponse) Descriptor deprecated

func (*StopResponse) Descriptor() ([]byte, []int)

Deprecated: Use StopResponse.ProtoReflect.Descriptor instead.

func (*StopResponse) ProtoMessage

func (*StopResponse) ProtoMessage()

func (*StopResponse) ProtoReflect

func (x *StopResponse) ProtoReflect() protoreflect.Message

func (*StopResponse) Reset

func (x *StopResponse) Reset()

func (*StopResponse) String

func (x *StopResponse) String() string

type UnimplementedArmServiceServer

type UnimplementedArmServiceServer struct {
}

UnimplementedArmServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedArmServiceServer) GetEndPosition

func (UnimplementedArmServiceServer) GetJointPositions

func (UnimplementedArmServiceServer) MoveToPosition

func (UnimplementedArmServiceServer) Stop

type UnsafeArmServiceServer

type UnsafeArmServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeArmServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ArmServiceServer will result in compilation errors.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL