Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions protos/kachaka-api.proto
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,12 @@ message Location {
bool ignore_voice_recognition = 7;
}

message LocationDigest {
string id = 1;
string name = 2;
LocationType type = 3;
}

message ShelfSize {
double width = 1;
double depth = 2;
Expand Down Expand Up @@ -143,6 +149,11 @@ message Shelf {
bool ignore_voice_recognition = 10;
}

message ShelfDigest {
string id = 1;
string name = 2;
}

message RosImu {
RosHeader header = 1;
Quaternion orientation = 2;
Expand Down Expand Up @@ -256,6 +267,7 @@ message Command {
// DockAnyShelfWithRegistrationCommand is available only in Kachaka Pro.
DockAnyShelfWithRegistrationCommand dock_any_shelf_with_registration_command = 18;
LocalizeCommand localize_command = 19;
MoveByVelocityWithMutedSensorsCommand move_by_velocity_with_muted_sensors_command = 22;
}
}

Expand All @@ -278,6 +290,7 @@ message UndockShelfCommand {

message MoveToLocationCommand {
string target_location_id = 1;
string source_location_id = 2;
}

message ReturnHomeCommand {
Expand All @@ -303,6 +316,7 @@ message LockCommand {
message MoveForwardCommand {
double distance_meter = 1;
double speed = 2; // [m/s]
bool mute_sensors = 3;
}

message RotateInPlaceCommand {
Expand All @@ -317,6 +331,11 @@ message DockAnyShelfWithRegistrationCommand {
message LocalizeCommand {
}

message MoveByVelocityWithMutedSensorsCommand {
double signed_velocity = 1; // [m/s]
double move_duration_sec = 2;
}

enum CommandState {
COMMAND_STATE_UNSPECIFIED = 0;
COMMAND_STATE_PENDING = 1; // No command is running. Waiting for requests.
Expand Down Expand Up @@ -505,11 +524,21 @@ message GetLocationsResponse {
string default_location_id = 3;
}

message GetLocationsDigestResponse {
Metadata metadata = 1;
repeated LocationDigest locations = 2;
}

message GetShelvesResponse {
Metadata metadata = 1;
repeated Shelf shelves = 2;
}

message GetShelvesDigestResponse {
Metadata metadata = 1;
repeated ShelfDigest shelves = 2;
}

message GetMovingShelfIdResponse {
Metadata metadata = 1;
string shelf_id = 2; // Empty if no shelf
Expand Down Expand Up @@ -755,8 +784,10 @@ service KachakaApi {
rpc Proceed (EmptyRequest) returns (ProceedResponse);
// Locations
rpc GetLocations (GetRequest) returns (GetLocationsResponse);
rpc GetLocationsDigest (GetRequest) returns (GetLocationsDigestResponse);
// Shelves
rpc GetShelves (GetRequest) returns (GetShelvesResponse);
rpc GetShelvesDigest (GetRequest) returns (GetShelvesDigestResponse);
rpc GetMovingShelfId (GetRequest) returns (GetMovingShelfIdResponse);
rpc ResetShelfPose (ResetShelfPoseRequest) returns (ResetShelfPoseResponse);
// Auto homing
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "kachaka-api"
version = "3.15.1"
version = "3.16.1"
authors = [{name="Preferred Robotics inc."}]
dependencies = [
"grpcio==1.66.1",
Expand Down
472 changes: 241 additions & 231 deletions python/kachaka_api/generated/kachaka_api_pb2.py

Large diffs are not rendered by default.

60 changes: 54 additions & 6 deletions python/kachaka_api/generated/kachaka_api_pb2.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,16 @@ class Location(_message.Message):
ignore_voice_recognition: bool
def __init__(self, id: _Optional[str] = ..., name: _Optional[str] = ..., pose: _Optional[_Union[Pose, _Mapping]] = ..., type: _Optional[_Union[LocationType, str]] = ..., undock_shelf_aligning_to_wall: bool = ..., undock_shelf_avoiding_obstacles: bool = ..., ignore_voice_recognition: bool = ...) -> None: ...

class LocationDigest(_message.Message):
__slots__ = ("id", "name", "type")
ID_FIELD_NUMBER: _ClassVar[int]
NAME_FIELD_NUMBER: _ClassVar[int]
TYPE_FIELD_NUMBER: _ClassVar[int]
id: str
name: str
type: LocationType
def __init__(self, id: _Optional[str] = ..., name: _Optional[str] = ..., type: _Optional[_Union[LocationType, str]] = ...) -> None: ...

class ShelfSize(_message.Message):
__slots__ = ("width", "depth", "height")
WIDTH_FIELD_NUMBER: _ClassVar[int]
Expand Down Expand Up @@ -240,6 +250,14 @@ class Shelf(_message.Message):
ignore_voice_recognition: bool
def __init__(self, id: _Optional[str] = ..., name: _Optional[str] = ..., pose: _Optional[_Union[Pose, _Mapping]] = ..., size: _Optional[_Union[ShelfSize, _Mapping]] = ..., appearance: _Optional[_Union[ShelfAppearance, str]] = ..., recognizable_names: _Optional[_Iterable[_Union[RecognizableName, _Mapping]]] = ..., home_location_id: _Optional[str] = ..., speed_mode: _Optional[_Union[ShelfSpeedMode, str]] = ..., ignore_voice_recognition: bool = ...) -> None: ...

class ShelfDigest(_message.Message):
__slots__ = ("id", "name")
ID_FIELD_NUMBER: _ClassVar[int]
NAME_FIELD_NUMBER: _ClassVar[int]
id: str
name: str
def __init__(self, id: _Optional[str] = ..., name: _Optional[str] = ...) -> None: ...

class RosImu(_message.Message):
__slots__ = ("header", "orientation", "orientation_covariance", "angular_velocity", "angular_velocity_covariance", "linear_acceleration", "linear_acceleration_covariance")
HEADER_FIELD_NUMBER: _ClassVar[int]
Expand Down Expand Up @@ -397,7 +415,7 @@ class ObjectDetectionFeatures(_message.Message):
def __init__(self, name: _Optional[str] = ..., shape: _Optional[_Iterable[int]] = ..., data: _Optional[_Iterable[float]] = ...) -> None: ...

class Command(_message.Message):
__slots__ = ("move_shelf_command", "return_shelf_command", "undock_shelf_command", "move_to_location_command", "return_home_command", "dock_shelf_command", "speak_command", "move_to_pose_command", "lock_command", "move_forward_command", "rotate_in_place_command", "dock_any_shelf_with_registration_command", "localize_command")
__slots__ = ("move_shelf_command", "return_shelf_command", "undock_shelf_command", "move_to_location_command", "return_home_command", "dock_shelf_command", "speak_command", "move_to_pose_command", "lock_command", "move_forward_command", "rotate_in_place_command", "dock_any_shelf_with_registration_command", "localize_command", "move_by_velocity_with_muted_sensors_command")
MOVE_SHELF_COMMAND_FIELD_NUMBER: _ClassVar[int]
RETURN_SHELF_COMMAND_FIELD_NUMBER: _ClassVar[int]
UNDOCK_SHELF_COMMAND_FIELD_NUMBER: _ClassVar[int]
Expand All @@ -411,6 +429,7 @@ class Command(_message.Message):
ROTATE_IN_PLACE_COMMAND_FIELD_NUMBER: _ClassVar[int]
DOCK_ANY_SHELF_WITH_REGISTRATION_COMMAND_FIELD_NUMBER: _ClassVar[int]
LOCALIZE_COMMAND_FIELD_NUMBER: _ClassVar[int]
MOVE_BY_VELOCITY_WITH_MUTED_SENSORS_COMMAND_FIELD_NUMBER: _ClassVar[int]
move_shelf_command: MoveShelfCommand
return_shelf_command: ReturnShelfCommand
undock_shelf_command: UndockShelfCommand
Expand All @@ -424,7 +443,8 @@ class Command(_message.Message):
rotate_in_place_command: RotateInPlaceCommand
dock_any_shelf_with_registration_command: DockAnyShelfWithRegistrationCommand
localize_command: LocalizeCommand
def __init__(self, move_shelf_command: _Optional[_Union[MoveShelfCommand, _Mapping]] = ..., return_shelf_command: _Optional[_Union[ReturnShelfCommand, _Mapping]] = ..., undock_shelf_command: _Optional[_Union[UndockShelfCommand, _Mapping]] = ..., move_to_location_command: _Optional[_Union[MoveToLocationCommand, _Mapping]] = ..., return_home_command: _Optional[_Union[ReturnHomeCommand, _Mapping]] = ..., dock_shelf_command: _Optional[_Union[DockShelfCommand, _Mapping]] = ..., speak_command: _Optional[_Union[SpeakCommand, _Mapping]] = ..., move_to_pose_command: _Optional[_Union[MoveToPoseCommand, _Mapping]] = ..., lock_command: _Optional[_Union[LockCommand, _Mapping]] = ..., move_forward_command: _Optional[_Union[MoveForwardCommand, _Mapping]] = ..., rotate_in_place_command: _Optional[_Union[RotateInPlaceCommand, _Mapping]] = ..., dock_any_shelf_with_registration_command: _Optional[_Union[DockAnyShelfWithRegistrationCommand, _Mapping]] = ..., localize_command: _Optional[_Union[LocalizeCommand, _Mapping]] = ...) -> None: ...
move_by_velocity_with_muted_sensors_command: MoveByVelocityWithMutedSensorsCommand
def __init__(self, move_shelf_command: _Optional[_Union[MoveShelfCommand, _Mapping]] = ..., return_shelf_command: _Optional[_Union[ReturnShelfCommand, _Mapping]] = ..., undock_shelf_command: _Optional[_Union[UndockShelfCommand, _Mapping]] = ..., move_to_location_command: _Optional[_Union[MoveToLocationCommand, _Mapping]] = ..., return_home_command: _Optional[_Union[ReturnHomeCommand, _Mapping]] = ..., dock_shelf_command: _Optional[_Union[DockShelfCommand, _Mapping]] = ..., speak_command: _Optional[_Union[SpeakCommand, _Mapping]] = ..., move_to_pose_command: _Optional[_Union[MoveToPoseCommand, _Mapping]] = ..., lock_command: _Optional[_Union[LockCommand, _Mapping]] = ..., move_forward_command: _Optional[_Union[MoveForwardCommand, _Mapping]] = ..., rotate_in_place_command: _Optional[_Union[RotateInPlaceCommand, _Mapping]] = ..., dock_any_shelf_with_registration_command: _Optional[_Union[DockAnyShelfWithRegistrationCommand, _Mapping]] = ..., localize_command: _Optional[_Union[LocalizeCommand, _Mapping]] = ..., move_by_velocity_with_muted_sensors_command: _Optional[_Union[MoveByVelocityWithMutedSensorsCommand, _Mapping]] = ...) -> None: ...

class MoveShelfCommand(_message.Message):
__slots__ = ("target_shelf_id", "destination_location_id", "undock_on_destination")
Expand All @@ -449,10 +469,12 @@ class UndockShelfCommand(_message.Message):
def __init__(self, target_shelf_id: _Optional[str] = ...) -> None: ...

class MoveToLocationCommand(_message.Message):
__slots__ = ("target_location_id",)
__slots__ = ("target_location_id", "source_location_id")
TARGET_LOCATION_ID_FIELD_NUMBER: _ClassVar[int]
SOURCE_LOCATION_ID_FIELD_NUMBER: _ClassVar[int]
target_location_id: str
def __init__(self, target_location_id: _Optional[str] = ...) -> None: ...
source_location_id: str
def __init__(self, target_location_id: _Optional[str] = ..., source_location_id: _Optional[str] = ...) -> None: ...

class ReturnHomeCommand(_message.Message):
__slots__ = ()
Expand Down Expand Up @@ -485,12 +507,14 @@ class LockCommand(_message.Message):
def __init__(self, duration_sec: _Optional[float] = ...) -> None: ...

class MoveForwardCommand(_message.Message):
__slots__ = ("distance_meter", "speed")
__slots__ = ("distance_meter", "speed", "mute_sensors")
DISTANCE_METER_FIELD_NUMBER: _ClassVar[int]
SPEED_FIELD_NUMBER: _ClassVar[int]
MUTE_SENSORS_FIELD_NUMBER: _ClassVar[int]
distance_meter: float
speed: float
def __init__(self, distance_meter: _Optional[float] = ..., speed: _Optional[float] = ...) -> None: ...
mute_sensors: bool
def __init__(self, distance_meter: _Optional[float] = ..., speed: _Optional[float] = ..., mute_sensors: bool = ...) -> None: ...

class RotateInPlaceCommand(_message.Message):
__slots__ = ("angle_radian",)
Expand All @@ -510,6 +534,14 @@ class LocalizeCommand(_message.Message):
__slots__ = ()
def __init__(self) -> None: ...

class MoveByVelocityWithMutedSensorsCommand(_message.Message):
__slots__ = ("signed_velocity", "move_duration_sec")
SIGNED_VELOCITY_FIELD_NUMBER: _ClassVar[int]
MOVE_DURATION_SEC_FIELD_NUMBER: _ClassVar[int]
signed_velocity: float
move_duration_sec: float
def __init__(self, signed_velocity: _Optional[float] = ..., move_duration_sec: _Optional[float] = ...) -> None: ...

class EmptyRequest(_message.Message):
__slots__ = ()
def __init__(self) -> None: ...
Expand Down Expand Up @@ -802,6 +834,14 @@ class GetLocationsResponse(_message.Message):
default_location_id: str
def __init__(self, metadata: _Optional[_Union[Metadata, _Mapping]] = ..., locations: _Optional[_Iterable[_Union[Location, _Mapping]]] = ..., default_location_id: _Optional[str] = ...) -> None: ...

class GetLocationsDigestResponse(_message.Message):
__slots__ = ("metadata", "locations")
METADATA_FIELD_NUMBER: _ClassVar[int]
LOCATIONS_FIELD_NUMBER: _ClassVar[int]
metadata: Metadata
locations: _containers.RepeatedCompositeFieldContainer[LocationDigest]
def __init__(self, metadata: _Optional[_Union[Metadata, _Mapping]] = ..., locations: _Optional[_Iterable[_Union[LocationDigest, _Mapping]]] = ...) -> None: ...

class GetShelvesResponse(_message.Message):
__slots__ = ("metadata", "shelves")
METADATA_FIELD_NUMBER: _ClassVar[int]
Expand All @@ -810,6 +850,14 @@ class GetShelvesResponse(_message.Message):
shelves: _containers.RepeatedCompositeFieldContainer[Shelf]
def __init__(self, metadata: _Optional[_Union[Metadata, _Mapping]] = ..., shelves: _Optional[_Iterable[_Union[Shelf, _Mapping]]] = ...) -> None: ...

class GetShelvesDigestResponse(_message.Message):
__slots__ = ("metadata", "shelves")
METADATA_FIELD_NUMBER: _ClassVar[int]
SHELVES_FIELD_NUMBER: _ClassVar[int]
metadata: Metadata
shelves: _containers.RepeatedCompositeFieldContainer[ShelfDigest]
def __init__(self, metadata: _Optional[_Union[Metadata, _Mapping]] = ..., shelves: _Optional[_Iterable[_Union[ShelfDigest, _Mapping]]] = ...) -> None: ...

class GetMovingShelfIdResponse(_message.Message):
__slots__ = ("metadata", "shelf_id")
METADATA_FIELD_NUMBER: _ClassVar[int]
Expand Down
86 changes: 86 additions & 0 deletions python/kachaka_api/generated/kachaka_api_pb2_grpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,11 +185,21 @@ def __init__(self, channel: grpc.Channel):
request_serializer=kachaka__api__pb2.GetRequest.SerializeToString,
response_deserializer=kachaka__api__pb2.GetLocationsResponse.FromString,
_registered_method=True)
self.GetLocationsDigest = channel.unary_unary(
'/kachaka_api.KachakaApi/GetLocationsDigest',
request_serializer=kachaka__api__pb2.GetRequest.SerializeToString,
response_deserializer=kachaka__api__pb2.GetLocationsDigestResponse.FromString,
_registered_method=True)
self.GetShelves = channel.unary_unary(
'/kachaka_api.KachakaApi/GetShelves',
request_serializer=kachaka__api__pb2.GetRequest.SerializeToString,
response_deserializer=kachaka__api__pb2.GetShelvesResponse.FromString,
_registered_method=True)
self.GetShelvesDigest = channel.unary_unary(
'/kachaka_api.KachakaApi/GetShelvesDigest',
request_serializer=kachaka__api__pb2.GetRequest.SerializeToString,
response_deserializer=kachaka__api__pb2.GetShelvesDigestResponse.FromString,
_registered_method=True)
self.GetMovingShelfId = channel.unary_unary(
'/kachaka_api.KachakaApi/GetMovingShelfId',
request_serializer=kachaka__api__pb2.GetRequest.SerializeToString,
Expand Down Expand Up @@ -509,13 +519,25 @@ def GetLocations(self, request, context):
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')

def GetLocationsDigest(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 GetShelves(self, request, context):
"""Shelves
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')

def GetShelvesDigest(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 GetMovingShelfId(self, request, context):
"""Missing associated documentation comment in .proto file."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
Expand Down Expand Up @@ -832,11 +854,21 @@ def add_KachakaApiServicer_to_server(servicer, server):
request_deserializer=kachaka__api__pb2.GetRequest.FromString,
response_serializer=kachaka__api__pb2.GetLocationsResponse.SerializeToString,
),
'GetLocationsDigest': grpc.unary_unary_rpc_method_handler(
servicer.GetLocationsDigest,
request_deserializer=kachaka__api__pb2.GetRequest.FromString,
response_serializer=kachaka__api__pb2.GetLocationsDigestResponse.SerializeToString,
),
'GetShelves': grpc.unary_unary_rpc_method_handler(
servicer.GetShelves,
request_deserializer=kachaka__api__pb2.GetRequest.FromString,
response_serializer=kachaka__api__pb2.GetShelvesResponse.SerializeToString,
),
'GetShelvesDigest': grpc.unary_unary_rpc_method_handler(
servicer.GetShelvesDigest,
request_deserializer=kachaka__api__pb2.GetRequest.FromString,
response_serializer=kachaka__api__pb2.GetShelvesDigestResponse.SerializeToString,
),
'GetMovingShelfId': grpc.unary_unary_rpc_method_handler(
servicer.GetMovingShelfId,
request_deserializer=kachaka__api__pb2.GetRequest.FromString,
Expand Down Expand Up @@ -1789,6 +1821,33 @@ def GetLocations(request,
metadata,
_registered_method=True)

@staticmethod
def GetLocationsDigest(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,
'/kachaka_api.KachakaApi/GetLocationsDigest',
kachaka__api__pb2.GetRequest.SerializeToString,
kachaka__api__pb2.GetLocationsDigestResponse.FromString,
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)

@staticmethod
def GetShelves(request,
target,
Expand Down Expand Up @@ -1816,6 +1875,33 @@ def GetShelves(request,
metadata,
_registered_method=True)

@staticmethod
def GetShelvesDigest(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,
'/kachaka_api.KachakaApi/GetShelvesDigest',
kachaka__api__pb2.GetRequest.SerializeToString,
kachaka__api__pb2.GetShelvesDigestResponse.FromString,
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)

@staticmethod
def GetMovingShelfId(request,
target,
Expand Down
Loading