v1

package
v0.1.69 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2023 License: Apache-2.0 Imports: 18 Imported by: 3

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 File_service_slam_v1_slam_proto protoreflect.FileDescriptor
View Source
var SLAMService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "viam.service.slam.v1.SLAMService",
	HandlerType: (*SLAMServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetPosition",
			Handler:    _SLAMService_GetPosition_Handler,
		},
		{
			MethodName: "GetMap",
			Handler:    _SLAMService_GetMap_Handler,
		},
		{
			MethodName: "GetPositionNew",
			Handler:    _SLAMService_GetPositionNew_Handler,
		},
		{
			MethodName: "GetPointCloudMap",
			Handler:    _SLAMService_GetPointCloudMap_Handler,
		},
		{
			MethodName: "GetInternalState",
			Handler:    _SLAMService_GetInternalState_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "service/slam/v1/slam.proto",
}

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

Functions

func RegisterSLAMServiceHandler

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

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

func RegisterSLAMServiceHandlerClient

func RegisterSLAMServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client SLAMServiceClient) error

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

func RegisterSLAMServiceHandlerFromEndpoint

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

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

func RegisterSLAMServiceHandlerServer

func RegisterSLAMServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server SLAMServiceServer) error

RegisterSLAMServiceHandlerServer registers the http handlers for service SLAMService to "mux". UnaryRPC :call SLAMServiceServer 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 RegisterSLAMServiceHandlerFromEndpoint instead.

func RegisterSLAMServiceServer

func RegisterSLAMServiceServer(s grpc.ServiceRegistrar, srv SLAMServiceServer)

Types

type GetInternalStateRequest added in v0.1.42

type GetInternalStateRequest struct {

	// Name of slam service
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

func (*GetInternalStateRequest) Descriptor deprecated added in v0.1.42

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

Deprecated: Use GetInternalStateRequest.ProtoReflect.Descriptor instead.

func (*GetInternalStateRequest) GetName added in v0.1.42

func (x *GetInternalStateRequest) GetName() string

func (*GetInternalStateRequest) ProtoMessage added in v0.1.42

func (*GetInternalStateRequest) ProtoMessage()

func (*GetInternalStateRequest) ProtoReflect added in v0.1.42

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

func (*GetInternalStateRequest) Reset added in v0.1.42

func (x *GetInternalStateRequest) Reset()

func (*GetInternalStateRequest) String added in v0.1.42

func (x *GetInternalStateRequest) String() string

type GetInternalStateResponse added in v0.1.42

type GetInternalStateResponse struct {

	// Internal state of the SLAM algorithm required to continue mapping/localization
	InternalState []byte `protobuf:"bytes,1,opt,name=internal_state,json=internalState,proto3" json:"internal_state,omitempty"`
	// contains filtered or unexported fields
}

func (*GetInternalStateResponse) Descriptor deprecated added in v0.1.42

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

Deprecated: Use GetInternalStateResponse.ProtoReflect.Descriptor instead.

func (*GetInternalStateResponse) GetInternalState added in v0.1.42

func (x *GetInternalStateResponse) GetInternalState() []byte

func (*GetInternalStateResponse) ProtoMessage added in v0.1.42

func (*GetInternalStateResponse) ProtoMessage()

func (*GetInternalStateResponse) ProtoReflect added in v0.1.42

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

func (*GetInternalStateResponse) Reset added in v0.1.42

func (x *GetInternalStateResponse) Reset()

func (*GetInternalStateResponse) String added in v0.1.42

func (x *GetInternalStateResponse) String() string

type GetMapRequest

type GetMapRequest struct {

	// Name of slam service
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Requested MIME type of response (image/jpeg or image/pcd)
	MimeType string `protobuf:"bytes,2,opt,name=mime_type,json=mimeType,proto3" json:"mime_type,omitempty"`
	// Optional parameter for image/jpeg mime_type, used to project point
	// cloud into a 2D image.
	CameraPosition *v1.Pose `protobuf:"bytes,3,opt,name=camera_position,json=cameraPosition,proto3,oneof" json:"camera_position,omitempty"`
	// Optional parameter for image/jpeg mime_type, defaults to false.
	// Tells us whether to include the robot position on the 2D image.
	IncludeRobotMarker bool `protobuf:"varint,4,opt,name=include_robot_marker,json=includeRobotMarker,proto3" json:"include_robot_marker,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 (*GetMapRequest) Descriptor deprecated

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

Deprecated: Use GetMapRequest.ProtoReflect.Descriptor instead.

func (*GetMapRequest) GetCameraPosition

func (x *GetMapRequest) GetCameraPosition() *v1.Pose

func (*GetMapRequest) GetExtra added in v0.1.6

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

func (*GetMapRequest) GetIncludeRobotMarker

func (x *GetMapRequest) GetIncludeRobotMarker() bool

func (*GetMapRequest) GetMimeType

func (x *GetMapRequest) GetMimeType() string

func (*GetMapRequest) GetName

func (x *GetMapRequest) GetName() string

func (*GetMapRequest) ProtoMessage

func (*GetMapRequest) ProtoMessage()

func (*GetMapRequest) ProtoReflect

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

func (*GetMapRequest) Reset

func (x *GetMapRequest) Reset()

func (*GetMapRequest) String

func (x *GetMapRequest) String() string

type GetMapResponse

type GetMapResponse struct {

	// Image or point cloud of mime_type.
	//
	// Types that are assignable to Map:
	//
	//	*GetMapResponse_PointCloud
	//	*GetMapResponse_Image
	Map isGetMapResponse_Map `protobuf_oneof:"map"`
	// Actual MIME type of response (image/jpeg or image/pcd)
	MimeType string `protobuf:"bytes,3,opt,name=mime_type,json=mimeType,proto3" json:"mime_type,omitempty"`
	// contains filtered or unexported fields
}

func (*GetMapResponse) Descriptor deprecated

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

Deprecated: Use GetMapResponse.ProtoReflect.Descriptor instead.

func (*GetMapResponse) GetImage

func (x *GetMapResponse) GetImage() []byte

func (*GetMapResponse) GetMap

func (m *GetMapResponse) GetMap() isGetMapResponse_Map

func (*GetMapResponse) GetMimeType

func (x *GetMapResponse) GetMimeType() string

func (*GetMapResponse) GetPointCloud

func (x *GetMapResponse) GetPointCloud() *v1.PointCloudObject

func (*GetMapResponse) ProtoMessage

func (*GetMapResponse) ProtoMessage()

func (*GetMapResponse) ProtoReflect

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

func (*GetMapResponse) Reset

func (x *GetMapResponse) Reset()

func (*GetMapResponse) String

func (x *GetMapResponse) String() string

type GetMapResponse_Image

type GetMapResponse_Image struct {
	Image []byte `protobuf:"bytes,2,opt,name=image,proto3,oneof"`
}

type GetMapResponse_PointCloud

type GetMapResponse_PointCloud struct {
	PointCloud *v1.PointCloudObject `protobuf:"bytes,1,opt,name=point_cloud,json=pointCloud,proto3,oneof"`
}

type GetPointCloudMapRequest added in v0.1.42

type GetPointCloudMapRequest struct {

	// Name of slam service
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

func (*GetPointCloudMapRequest) Descriptor deprecated added in v0.1.42

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

Deprecated: Use GetPointCloudMapRequest.ProtoReflect.Descriptor instead.

func (*GetPointCloudMapRequest) GetName added in v0.1.42

func (x *GetPointCloudMapRequest) GetName() string

func (*GetPointCloudMapRequest) ProtoMessage added in v0.1.42

func (*GetPointCloudMapRequest) ProtoMessage()

func (*GetPointCloudMapRequest) ProtoReflect added in v0.1.42

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

func (*GetPointCloudMapRequest) Reset added in v0.1.42

func (x *GetPointCloudMapRequest) Reset()

func (*GetPointCloudMapRequest) String added in v0.1.42

func (x *GetPointCloudMapRequest) String() string

type GetPointCloudMapResponse added in v0.1.42

type GetPointCloudMapResponse struct {

	// pointclouds are returned as a set of bytes in the standard PCD format
	// https://pointclouds.org/documentation/tutorials/pcd_file_format.html
	PointCloudPcd []byte `protobuf:"bytes,1,opt,name=point_cloud_pcd,json=pointCloudPcd,proto3" json:"point_cloud_pcd,omitempty"`
	// contains filtered or unexported fields
}

func (*GetPointCloudMapResponse) Descriptor deprecated added in v0.1.42

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

Deprecated: Use GetPointCloudMapResponse.ProtoReflect.Descriptor instead.

func (*GetPointCloudMapResponse) GetPointCloudPcd added in v0.1.42

func (x *GetPointCloudMapResponse) GetPointCloudPcd() []byte

func (*GetPointCloudMapResponse) ProtoMessage added in v0.1.42

func (*GetPointCloudMapResponse) ProtoMessage()

func (*GetPointCloudMapResponse) ProtoReflect added in v0.1.42

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

func (*GetPointCloudMapResponse) Reset added in v0.1.42

func (x *GetPointCloudMapResponse) Reset()

func (*GetPointCloudMapResponse) String added in v0.1.42

func (x *GetPointCloudMapResponse) String() string

type GetPositionNewRequest added in v0.1.42

type GetPositionNewRequest struct {

	// Name of slam service
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

func (*GetPositionNewRequest) Descriptor deprecated added in v0.1.42

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

Deprecated: Use GetPositionNewRequest.ProtoReflect.Descriptor instead.

func (*GetPositionNewRequest) GetName added in v0.1.42

func (x *GetPositionNewRequest) GetName() string

func (*GetPositionNewRequest) ProtoMessage added in v0.1.42

func (*GetPositionNewRequest) ProtoMessage()

func (*GetPositionNewRequest) ProtoReflect added in v0.1.42

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

func (*GetPositionNewRequest) Reset added in v0.1.42

func (x *GetPositionNewRequest) Reset()

func (*GetPositionNewRequest) String added in v0.1.42

func (x *GetPositionNewRequest) String() string

type GetPositionNewResponse added in v0.1.42

type GetPositionNewResponse struct {

	// Current position of the specified component in the SLAM Map
	Pose *v1.Pose `protobuf:"bytes,1,opt,name=pose,proto3" json:"pose,omitempty"`
	// This is usually the name of the camera that is in the SLAM config
	ComponentReference string `protobuf:"bytes,2,opt,name=component_reference,json=componentReference,proto3" json:"component_reference,omitempty"`
	// Additional information in the response
	Extra *structpb.Struct `protobuf:"bytes,99,opt,name=extra,proto3" json:"extra,omitempty"`
	// contains filtered or unexported fields
}

func (*GetPositionNewResponse) Descriptor deprecated added in v0.1.42

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

Deprecated: Use GetPositionNewResponse.ProtoReflect.Descriptor instead.

func (*GetPositionNewResponse) GetComponentReference added in v0.1.42

func (x *GetPositionNewResponse) GetComponentReference() string

func (*GetPositionNewResponse) GetExtra added in v0.1.42

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

func (*GetPositionNewResponse) GetPose added in v0.1.42

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

func (*GetPositionNewResponse) ProtoMessage added in v0.1.42

func (*GetPositionNewResponse) ProtoMessage()

func (*GetPositionNewResponse) ProtoReflect added in v0.1.42

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

func (*GetPositionNewResponse) Reset added in v0.1.42

func (x *GetPositionNewResponse) Reset()

func (*GetPositionNewResponse) String added in v0.1.42

func (x *GetPositionNewResponse) String() string

type GetPositionRequest

type GetPositionRequest struct {

	// Name of slam service
	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 (*GetPositionRequest) Descriptor deprecated

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

Deprecated: Use GetPositionRequest.ProtoReflect.Descriptor instead.

func (*GetPositionRequest) GetExtra added in v0.1.6

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

func (*GetPositionRequest) GetName

func (x *GetPositionRequest) GetName() string

func (*GetPositionRequest) ProtoMessage

func (*GetPositionRequest) ProtoMessage()

func (*GetPositionRequest) ProtoReflect

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

func (*GetPositionRequest) Reset

func (x *GetPositionRequest) Reset()

func (*GetPositionRequest) String

func (x *GetPositionRequest) String() string

type GetPositionResponse

type GetPositionResponse struct {

	// Current position of the robot within the World frame.
	Pose *v1.PoseInFrame `protobuf:"bytes,1,opt,name=pose,proto3" json:"pose,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 (*GetPositionResponse) Descriptor deprecated

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

Deprecated: Use GetPositionResponse.ProtoReflect.Descriptor instead.

func (*GetPositionResponse) GetExtra added in v0.1.1

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

func (*GetPositionResponse) GetPose

func (x *GetPositionResponse) GetPose() *v1.PoseInFrame

func (*GetPositionResponse) ProtoMessage

func (*GetPositionResponse) ProtoMessage()

func (*GetPositionResponse) ProtoReflect

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

func (*GetPositionResponse) Reset

func (x *GetPositionResponse) Reset()

func (*GetPositionResponse) String

func (x *GetPositionResponse) String() string

type SLAMServiceClient

type SLAMServiceClient interface {
	// GetPosition returns the current estimated position of the robot with
	// respect to the "origin" of the map.
	GetPosition(ctx context.Context, in *GetPositionRequest, opts ...grpc.CallOption) (*GetPositionResponse, error)
	// GetMap returns the latest map image or point cloud generated by the
	// SLAM library
	GetMap(ctx context.Context, in *GetMapRequest, opts ...grpc.CallOption) (*GetMapResponse, error)
	// GetPositionNew returns the current estimated position of the robot with
	// respect to a returned component reference. Note: this function will be
	// renamed to GetPosition and replace the existing one in the near future
	GetPositionNew(ctx context.Context, in *GetPositionNewRequest, opts ...grpc.CallOption) (*GetPositionNewResponse, error)
	// GetPointCloudMap returns the latest point cloud map generated by the
	// SLAM library
	GetPointCloudMap(ctx context.Context, in *GetPointCloudMapRequest, opts ...grpc.CallOption) (*GetPointCloudMapResponse, error)
	// GetInternalState returns the internal map as defined by the specified slam
	// algorithm required to continue mapping/localizing. This endpoint is not
	// intended for end user usage
	GetInternalState(ctx context.Context, in *GetInternalStateRequest, opts ...grpc.CallOption) (*GetInternalStateResponse, error)
}

SLAMServiceClient is the client API for SLAMService 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.

type SLAMServiceServer

type SLAMServiceServer interface {
	// GetPosition returns the current estimated position of the robot with
	// respect to the "origin" of the map.
	GetPosition(context.Context, *GetPositionRequest) (*GetPositionResponse, error)
	// GetMap returns the latest map image or point cloud generated by the
	// SLAM library
	GetMap(context.Context, *GetMapRequest) (*GetMapResponse, error)
	// GetPositionNew returns the current estimated position of the robot with
	// respect to a returned component reference. Note: this function will be
	// renamed to GetPosition and replace the existing one in the near future
	GetPositionNew(context.Context, *GetPositionNewRequest) (*GetPositionNewResponse, error)
	// GetPointCloudMap returns the latest point cloud map generated by the
	// SLAM library
	GetPointCloudMap(context.Context, *GetPointCloudMapRequest) (*GetPointCloudMapResponse, error)
	// GetInternalState returns the internal map as defined by the specified slam
	// algorithm required to continue mapping/localizing. This endpoint is not
	// intended for end user usage
	GetInternalState(context.Context, *GetInternalStateRequest) (*GetInternalStateResponse, error)
	// contains filtered or unexported methods
}

SLAMServiceServer is the server API for SLAMService service. All implementations must embed UnimplementedSLAMServiceServer for forward compatibility

type UnimplementedSLAMServiceServer

type UnimplementedSLAMServiceServer struct {
}

UnimplementedSLAMServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedSLAMServiceServer) GetInternalState added in v0.1.42

func (UnimplementedSLAMServiceServer) GetMap

func (UnimplementedSLAMServiceServer) GetPointCloudMap added in v0.1.42

func (UnimplementedSLAMServiceServer) GetPosition

func (UnimplementedSLAMServiceServer) GetPositionNew added in v0.1.42

type UnsafeSLAMServiceServer

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

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

Jump to

Keyboard shortcuts

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