diff --git a/src/viam/components/arm/service.py b/src/viam/components/arm/service.py index 77661b8ce..56e903daf 100644 --- a/src/viam/components/arm/service.py +++ b/src/viam/components/arm/service.py @@ -109,7 +109,7 @@ async def GetKinematics(self, stream: Stream[GetKinematicsRequest, GetKinematics assert request is not None arm = self.get_resource(request.name) timeout = stream.deadline.time_remaining() if stream.deadline else None - format, kinematics_data = await arm.get_kinematics(extra=struct_to_dict(request.extra), timeout=timeout) + format, kinematics_data = await arm.get_kinematics(extra=struct_to_dict(request.extra), timeout=timeout, metadata=stream.metadata) response = GetKinematicsResponse(format=format, kinematics_data=kinematics_data) await stream.send_message(response) diff --git a/src/viam/components/gantry/client.py b/src/viam/components/gantry/client.py index 525a5ae05..1d300bbf9 100644 --- a/src/viam/components/gantry/client.py +++ b/src/viam/components/gantry/client.py @@ -1,8 +1,15 @@ -from typing import Any, Dict, List, Mapping, Optional +from typing import Any, Dict, List, Mapping, Optional, Tuple from grpclib.client import Channel -from viam.proto.common import DoCommandRequest, DoCommandResponse, Geometry +from viam.proto.common import ( + DoCommandRequest, + DoCommandResponse, + Geometry, + GetKinematicsRequest, + GetKinematicsResponse, + KinematicsFileFormat, +) from viam.proto.component.gantry import ( GantryServiceStub, GetLengthsRequest, @@ -110,6 +117,14 @@ async def do_command( response: DoCommandResponse = await self.client.DoCommand(request, timeout=timeout, metadata=md) return struct_to_dict(response.result) + async def get_kinematics( + self, *, extra: Optional[Dict[str, Any]] = None, timeout: Optional[float] = None, **kwargs + ) -> Tuple[KinematicsFileFormat.ValueType, bytes]: + md = kwargs.get("metadata", self.Metadata()).proto + request = GetKinematicsRequest(name=self.name, extra=dict_to_struct(extra)) + response: GetKinematicsResponse = await self.client.GetKinematics(request, timeout=timeout, metadata=md) + return (response.format, response.kinematics_data) + async def get_geometries(self, *, extra: Optional[Dict[str, Any]] = None, timeout: Optional[float] = None, **kwargs) -> List[Geometry]: md = kwargs.get("metadata", self.Metadata()) return await get_geometries(self.client, self.name, extra, timeout, md) diff --git a/src/viam/components/gantry/gantry.py b/src/viam/components/gantry/gantry.py index 865b09e91..6d552fbe5 100644 --- a/src/viam/components/gantry/gantry.py +++ b/src/viam/components/gantry/gantry.py @@ -1,6 +1,7 @@ import abc -from typing import Any, Dict, Final, List, Optional +from typing import Any, Dict, Final, List, Optional, Tuple +from viam.components.arm import KinematicsFileFormat from viam.resource.types import API, RESOURCE_NAMESPACE_RDK, RESOURCE_TYPE_COMPONENT from ..component_base import ComponentBase @@ -154,3 +155,33 @@ async def is_moving(self) -> bool: For more information, see `Gantry component `_. """ ... + + @abc.abstractmethod + async def get_kinematics( + self, *, extra: Optional[Dict[str, Any]] = None, timeout: Optional[float] = None, **kwargs + ) -> Tuple[KinematicsFileFormat.ValueType, bytes]: + """ + Get the kinematics information associated with the gantry. + + :: + + my_gantry = Gantry.from_robot(robot=machine, name="my_gantry") + + # Get the kinematics information associated with the gantry. + kinematics = await my_gantry.get_kinematics() + + # Get the format of the kinematics file. + k_file = kinematics[0] + + # Get the byte contents of the file. + k_bytes = kinematics[1] + + Returns: + Tuple[KinematicsFileFormat.ValueType, bytes]: A tuple containing two values; the first [0] value represents the format of the + file, either in URDF format (``KinematicsFileFormat.KINEMATICS_FILE_FORMAT_URDF``) or + Viam's kinematic parameter format (spatial vector algebra) (``KinematicsFileFormat.KINEMATICS_FILE_FORMAT_SVA``), + and the second [1] value represents the byte contents of the file. + + For more information, see `Arm component `_. + """ + ... diff --git a/src/viam/components/gantry/service.py b/src/viam/components/gantry/service.py index 8828f3496..7036a0517 100644 --- a/src/viam/components/gantry/service.py +++ b/src/viam/components/gantry/service.py @@ -1,8 +1,14 @@ from grpclib.server import Stream -from viam.proto.common import DoCommandRequest, DoCommandResponse, GetGeometriesRequest, GetGeometriesResponse +from viam.proto.common import ( + DoCommandRequest, + DoCommandResponse, + GetGeometriesRequest, + GetGeometriesResponse, + GetKinematicsRequest, + GetKinematicsResponse, +) from viam.proto.component.gantry import ( - GantryServiceBase, GetLengthsRequest, GetLengthsResponse, GetPositionRequest, @@ -15,6 +21,7 @@ MoveToPositionResponse, StopRequest, StopResponse, + UnimplementedGantryServiceBase, ) from viam.resource.rpc_service_base import ResourceRPCServiceBase from viam.utils import dict_to_struct, struct_to_dict @@ -22,7 +29,7 @@ from .gantry import Gantry -class GantryRPCService(GantryServiceBase, ResourceRPCServiceBase[Gantry]): +class GantryRPCService(UnimplementedGantryServiceBase, ResourceRPCServiceBase[Gantry]): """ gRPC Service for a Gantry """ @@ -103,11 +110,20 @@ async def DoCommand(self, stream: Stream[DoCommandRequest, DoCommandResponse]) - response = DoCommandResponse(result=dict_to_struct(result)) await stream.send_message(response) + async def GetKinematics(self, stream: Stream[GetKinematicsRequest, GetKinematicsResponse]) -> None: + request = await stream.recv_message() + assert request is not None + gantry = self.get_resource(request.name) + timeout = stream.deadline.time_remaining() if stream.deadline else None + format, data = await gantry.get_kinematics(extra=struct_to_dict(request.extra), timeout=timeout, metadata=stream.metadata) + response = GetKinematicsResponse(format=format, kinematics_data=data) + await stream.send_message(response) + async def GetGeometries(self, stream: Stream[GetGeometriesRequest, GetGeometriesResponse]) -> None: request = await stream.recv_message() assert request is not None - arm = self.get_resource(request.name) + gantry = self.get_resource(request.name) timeout = stream.deadline.time_remaining() if stream.deadline else None - geometries = await arm.get_geometries(extra=struct_to_dict(request.extra), timeout=timeout) + geometries = await gantry.get_geometries(extra=struct_to_dict(request.extra), timeout=timeout) response = GetGeometriesResponse(geometries=geometries) await stream.send_message(response) diff --git a/src/viam/gen/app/v1/robot_pb2.py b/src/viam/gen/app/v1/robot_pb2.py index 294070348..c25c7b4d2 100644 --- a/src/viam/gen/app/v1/robot_pb2.py +++ b/src/viam/gen/app/v1/robot_pb2.py @@ -10,7 +10,7 @@ from google.protobuf import duration_pb2 as google_dot_protobuf_dot_duration__pb2 from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2 from ...tagger.v1 import tagger_pb2 as tagger_dot_v1_dot_tagger__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x12app/v1/robot.proto\x12\x0bviam.app.v1\x1a\x16common/v1/common.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x16tagger/v1/tagger.proto"\xa1\x08\n\x0bRobotConfig\x12.\n\x05cloud\x18\x01 \x01(\x0b2\x18.viam.app.v1.CloudConfigR\x05cloud\x123\n\x07remotes\x18\x02 \x03(\x0b2\x19.viam.app.v1.RemoteConfigR\x07remotes\x12<\n\ncomponents\x18\x03 \x03(\x0b2\x1c.viam.app.v1.ComponentConfigR\ncomponents\x128\n\tprocesses\x18\x04 \x03(\x0b2\x1a.viam.app.v1.ProcessConfigR\tprocesses\x126\n\x08services\x18\x05 \x03(\x0b2\x1a.viam.app.v1.ServiceConfigR\x08services\x129\n\x07network\x18\x06 \x01(\x0b2\x1a.viam.app.v1.NetworkConfigH\x00R\x07network\x88\x01\x01\x120\n\x04auth\x18\x07 \x01(\x0b2\x17.viam.app.v1.AuthConfigH\x01R\x04auth\x88\x01\x01\x12\x19\n\x05debug\x18\x08 \x01(\x08H\x02R\x05debug\x88\x01\x01\x123\n\x07modules\x18\t \x03(\x0b2\x19.viam.app.v1.ModuleConfigR\x07modules\x127\n\x15disable_partial_start\x18\n \x01(\x08H\x03R\x13disablePartialStart\x88\x01\x01\x126\n\x08packages\x18\x0b \x03(\x0b2\x1a.viam.app.v1.PackageConfigR\x08packages\x12\\\n\x19overwrite_fragment_status\x18\x0c \x03(\x0b2 .viam.app.v1.AppValidationStatusR\x17overwriteFragmentStatus\x12,\n\x12enable_web_profile\x18\r \x01(\x08R\x10enableWebProfile\x12/\n\x03log\x18\x0e \x03(\x0b2\x1d.viam.app.v1.LogPatternConfigR\x03log\x12\x1a\n\x08revision\x18\x0f \x01(\tR\x08revision\x12E\n\x0bmaintenance\x18\x10 \x01(\x0b2\x1e.viam.app.v1.MaintenanceConfigH\x04R\x0bmaintenance\x88\x01\x01\x12:\n\x19disable_log_deduplication\x18\x11 \x01(\x08R\x17disableLogDeduplication\x12*\n\x04jobs\x18\x12 \x03(\x0b2\x16.viam.app.v1.JobConfigR\x04jobsB\n\n\x08_networkB\x07\n\x05_authB\x08\n\x06_debugB\x18\n\x16_disable_partial_startB\x0e\n\x0c_maintenance"B\n\x10LogPatternConfig\x12\x18\n\x07pattern\x18\x01 \x01(\tR\x07pattern\x12\x14\n\x05level\x18\x02 \x01(\tR\x05level"\xa2\x01\n\tJobConfig\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12\x1a\n\x08schedule\x18\x02 \x01(\tR\x08schedule\x12\x1a\n\x08resource\x18\x03 \x01(\tR\x08resource\x12\x16\n\x06method\x18\x04 \x01(\tR\x06method\x121\n\x07command\x18\x05 \x01(\x0b2\x17.google.protobuf.StructR\x07command"8\n\x0eLocationSecret\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x16\n\x06secret\x18\x02 \x01(\tR\x06secret"+\n\x13AppValidationStatus\x12\x14\n\x05error\x18\x01 \x01(\tR\x05error"\xbe\x03\n\x0bCloudConfig\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04fqdn\x18\x02 \x01(\tR\x04fqdn\x12\x1d\n\nlocal_fqdn\x18\x03 \x01(\tR\tlocalFqdn\x12\x1d\n\nmanaged_by\x18\x04 \x01(\tR\tmanagedBy\x12+\n\x11signaling_address\x18\x05 \x01(\tR\x10signalingAddress\x12-\n\x12signaling_insecure\x18\x06 \x01(\x08R\x11signalingInsecure\x12+\n\x0flocation_secret\x18\x07 \x01(\tB\x02\x18\x01R\x0elocationSecret\x12\x16\n\x06secret\x18\x08 \x01(\tR\x06secret\x12F\n\x10location_secrets\x18\t \x03(\x0b2\x1b.viam.app.v1.LocationSecretR\x0flocationSecrets\x12$\n\x0eprimary_org_id\x18\n \x01(\tR\x0cprimaryOrgId\x12\x1f\n\x0blocation_id\x18\x0b \x01(\tR\nlocationId\x12\x1d\n\nmachine_id\x18\x0c \x01(\tR\tmachineId"\xbb\x03\n\x0fComponentConfig\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12\x1c\n\tnamespace\x18\x02 \x01(\tR\tnamespace\x12\x12\n\x04type\x18\x03 \x01(\tR\x04type\x12\x14\n\x05model\x18\x04 \x01(\tR\x05model\x12(\n\x05frame\x18\x05 \x01(\x0b2\x12.viam.app.v1.FrameR\x05frame\x12\x1d\n\ndepends_on\x18\x06 \x03(\tR\tdependsOn\x12l\n\x0fservice_configs\x18\x07 \x03(\x0b2\'.viam.app.v1.ResourceLevelServiceConfigB\x1a\x9a\x84\x9e\x03\x15json:"service_config"R\x0eserviceConfigs\x127\n\nattributes\x18\x08 \x01(\x0b2\x17.google.protobuf.StructR\nattributes\x12\x10\n\x03api\x18\t \x01(\tR\x03api\x12J\n\x11log_configuration\x18\n \x01(\x0b2\x1d.viam.app.v1.LogConfigurationR\x10logConfiguration"i\n\x1aResourceLevelServiceConfig\x12\x12\n\x04type\x18\x01 \x01(\tR\x04type\x127\n\nattributes\x18\x02 \x01(\x0b2\x17.google.protobuf.StructR\nattributes"\xf0\x02\n\rProcessConfig\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12\x12\n\x04args\x18\x03 \x03(\tR\x04args\x12\x10\n\x03cwd\x18\x04 \x01(\tR\x03cwd\x12\x19\n\x08one_shot\x18\x05 \x01(\x08R\x07oneShot\x12\x10\n\x03log\x18\x06 \x01(\x08R\x03log\x12\x1f\n\x0bstop_signal\x18\x07 \x01(\x05R\nstopSignal\x12<\n\x0cstop_timeout\x18\x08 \x01(\x0b2\x19.google.protobuf.DurationR\x0bstopTimeout\x125\n\x03env\x18\t \x03(\x0b2#.viam.app.v1.ProcessConfig.EnvEntryR\x03env\x12\x1a\n\x08username\x18\n \x01(\tR\x08username\x1a6\n\x08EnvEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x028\x01"\x8f\x03\n\rServiceConfig\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12\x1c\n\tnamespace\x18\x02 \x01(\tR\tnamespace\x12\x12\n\x04type\x18\x03 \x01(\tR\x04type\x127\n\nattributes\x18\x04 \x01(\x0b2\x17.google.protobuf.StructR\nattributes\x12\x1d\n\ndepends_on\x18\x05 \x03(\tR\tdependsOn\x12\x14\n\x05model\x18\x06 \x01(\tR\x05model\x12\x10\n\x03api\x18\t \x01(\tR\x03api\x12l\n\x0fservice_configs\x18\n \x03(\x0b2\'.viam.app.v1.ResourceLevelServiceConfigB\x1a\x9a\x84\x9e\x03\x15json:"service_config"R\x0eserviceConfigs\x12J\n\x11log_configuration\x18\x0b \x01(\x0b2\x1d.viam.app.v1.LogConfigurationR\x10logConfiguration"\xba\x02\n\rNetworkConfig\x12\x12\n\x04fqdn\x18\x01 \x01(\tR\x04fqdn\x12!\n\x0cbind_address\x18\x02 \x01(\tR\x0bbindAddress\x12"\n\rtls_cert_file\x18\x03 \x01(\tR\x0btlsCertFile\x12 \n\x0ctls_key_file\x18\x04 \x01(\tR\ntlsKeyFile\x127\n\x08sessions\x18\x05 \x01(\x0b2\x1b.viam.app.v1.SessionsConfigR\x08sessions\x12\\\n\x18traffic_tunnel_endpoints\x18\x06 \x03(\x0b2".viam.app.v1.TrafficTunnelEndpointR\x16trafficTunnelEndpoints\x12\x15\n\x06no_tls\x18\x07 \x01(\x08R\x05noTls"V\n\x0eSessionsConfig\x12D\n\x10heartbeat_window\x18\x01 \x01(\x0b2\x19.google.protobuf.DurationR\x0fheartbeatWindow"u\n\x15TrafficTunnelEndpoint\x12\x12\n\x04port\x18\x01 \x01(\x05R\x04port\x12H\n\x12connection_timeout\x18\x02 \x01(\x0b2\x19.google.protobuf.DurationR\x11connectionTimeout"\xe5\x01\n\nAuthConfig\x12:\n\x08handlers\x18\x01 \x03(\x0b2\x1e.viam.app.v1.AuthHandlerConfigR\x08handlers\x12*\n\x11tls_auth_entities\x18\x02 \x03(\tR\x0ftlsAuthEntities\x12V\n\x14external_auth_config\x18\x03 \x01(\x0b2\x1f.viam.app.v1.ExternalAuthConfigH\x00R\x12externalAuthConfig\x88\x01\x01B\x17\n\x15_external_auth_config"7\n\x08JWKSFile\x12+\n\x04json\x18\x01 \x01(\x0b2\x17.google.protobuf.StructR\x04json"?\n\x12ExternalAuthConfig\x12)\n\x04jwks\x18\x01 \x01(\x0b2\x15.viam.app.v1.JWKSFileR\x04jwks"v\n\x11AuthHandlerConfig\x120\n\x04type\x18\x01 \x01(\x0e2\x1c.viam.app.v1.CredentialsTypeR\x04type\x12/\n\x06config\x18\x05 \x01(\x0b2\x17.google.protobuf.StructR\x06config"\xcd\x01\n\x05Frame\x12\x16\n\x06parent\x18\x01 \x01(\tR\x06parent\x12:\n\x0btranslation\x18\x02 \x01(\x0b2\x18.viam.app.v1.TranslationR\x0btranslation\x12:\n\x0borientation\x18\x03 \x01(\x0b2\x18.viam.app.v1.OrientationR\x0borientation\x124\n\x08geometry\x18\x04 \x01(\x0b2\x18.viam.common.v1.GeometryR\x08geometry"(\n\x10LogConfiguration\x12\x14\n\x05level\x18\x01 \x01(\tR\x05level"7\n\x0bTranslation\x12\x0c\n\x01x\x18\x01 \x01(\x01R\x01x\x12\x0c\n\x01y\x18\x02 \x01(\x01R\x01y\x12\x0c\n\x01z\x18\x03 \x01(\x01R\x01z"\xd0\x07\n\x0bOrientation\x12O\n\x0eno_orientation\x18\x01 \x01(\x0b2&.viam.app.v1.Orientation.NoOrientationH\x00R\rnoOrientation\x12Z\n\x0evector_radians\x18\x02 \x01(\x0b21.viam.app.v1.Orientation.OrientationVectorRadiansH\x00R\rvectorRadians\x12Z\n\x0evector_degrees\x18\x03 \x01(\x0b21.viam.app.v1.Orientation.OrientationVectorDegreesH\x00R\rvectorDegrees\x12I\n\x0ceuler_angles\x18\x04 \x01(\x0b2$.viam.app.v1.Orientation.EulerAnglesH\x00R\x0beulerAngles\x12F\n\x0baxis_angles\x18\x05 \x01(\x0b2#.viam.app.v1.Orientation.AxisAnglesH\x00R\naxisAngles\x12E\n\nquaternion\x18\x06 \x01(\x0b2#.viam.app.v1.Orientation.QuaternionH\x00R\nquaternion\x1a\x0f\n\rNoOrientation\x1aj\n\x18OrientationVectorRadians\x12$\n\x05theta\x18\x01 \x01(\x01B\x0e\x9a\x84\x9e\x03\tjson:"th"R\x05theta\x12\x0c\n\x01x\x18\x02 \x01(\x01R\x01x\x12\x0c\n\x01y\x18\x03 \x01(\x01R\x01y\x12\x0c\n\x01z\x18\x04 \x01(\x01R\x01z\x1aj\n\x18OrientationVectorDegrees\x12$\n\x05theta\x18\x01 \x01(\x01B\x0e\x9a\x84\x9e\x03\tjson:"th"R\x05theta\x12\x0c\n\x01x\x18\x02 \x01(\x01R\x01x\x12\x0c\n\x01y\x18\x03 \x01(\x01R\x01y\x12\x0c\n\x01z\x18\x04 \x01(\x01R\x01z\x1aI\n\x0bEulerAngles\x12\x12\n\x04roll\x18\x01 \x01(\x01R\x04roll\x12\x14\n\x05pitch\x18\x02 \x01(\x01R\x05pitch\x12\x10\n\x03yaw\x18\x03 \x01(\x01R\x03yaw\x1a\\\n\nAxisAngles\x12$\n\x05theta\x18\x01 \x01(\x01B\x0e\x9a\x84\x9e\x03\tjson:"th"R\x05theta\x12\x0c\n\x01x\x18\x02 \x01(\x01R\x01x\x12\x0c\n\x01y\x18\x03 \x01(\x01R\x01y\x12\x0c\n\x01z\x18\x04 \x01(\x01R\x01z\x1aD\n\nQuaternion\x12\x0c\n\x01w\x18\x01 \x01(\x01R\x01w\x12\x0c\n\x01x\x18\x02 \x01(\x01R\x01x\x12\x0c\n\x01y\x18\x03 \x01(\x01R\x01y\x12\x0c\n\x01z\x18\x04 \x01(\x01R\x01zB\x06\n\x04type"\x8d\x04\n\x0cRemoteConfig\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12\x18\n\x07address\x18\x02 \x01(\tR\x07address\x12(\n\x05frame\x18\x03 \x01(\x0b2\x12.viam.app.v1.FrameR\x05frame\x12+\n\x04auth\x18\x04 \x01(\x0b2\x17.viam.app.v1.RemoteAuthR\x04auth\x12\x1d\n\nmanaged_by\x18\x05 \x01(\tR\tmanagedBy\x12\x1a\n\x08insecure\x18\x06 \x01(\x08R\x08insecure\x12U\n\x19connection_check_interval\x18\x07 \x01(\x0b2\x19.google.protobuf.DurationR\x17connectionCheckInterval\x12H\n\x12reconnect_interval\x18\x08 \x01(\x0b2\x19.google.protobuf.DurationR\x11reconnectInterval\x12l\n\x0fservice_configs\x18\t \x03(\x0b2\'.viam.app.v1.ResourceLevelServiceConfigB\x1a\x9a\x84\x9e\x03\x15json:"service_config"R\x0eserviceConfigs\x12\x16\n\x06secret\x18\n \x01(\tR\x06secret\x12\x16\n\x06prefix\x18\x0b \x01(\tR\x06prefix"\xc6\x01\n\nRemoteAuth\x12E\n\x0bcredentials\x18\x01 \x01(\x0b2#.viam.app.v1.RemoteAuth.CredentialsR\x0bcredentials\x12\x16\n\x06entity\x18\x02 \x01(\tR\x06entity\x1aY\n\x0bCredentials\x120\n\x04type\x18\x01 \x01(\x0e2\x1c.viam.app.v1.CredentialsTypeR\x04type\x12\x18\n\x07payload\x18\x02 \x01(\tR\x07payload"\xd1\x01\n\tAgentInfo\x12\x12\n\x04host\x18\x01 \x01(\tR\x04host\x12\x0e\n\x02os\x18\x02 \x01(\tR\x02os\x12\x10\n\x03ips\x18\x03 \x03(\tR\x03ips\x12\x18\n\x07version\x18\x04 \x01(\tR\x07version\x12!\n\x0cgit_revision\x18\x05 \x01(\tR\x0bgitRevision\x12\x1f\n\x08platform\x18\x06 \x01(\tH\x00R\x08platform\x88\x01\x01\x12#\n\rplatform_tags\x18\x07 \x03(\tR\x0cplatformTagsB\x0b\n\t_platform"j\n\rConfigRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12:\n\nagent_info\x18\x02 \x01(\x0b2\x16.viam.app.v1.AgentInfoH\x00R\tagentInfo\x88\x01\x01B\r\n\x0b_agent_info"B\n\x0eConfigResponse\x120\n\x06config\x18\x01 \x01(\x0b2\x18.viam.app.v1.RobotConfigR\x06config"$\n\x12CertificateRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id"v\n\x13CertificateResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\'\n\x0ftls_certificate\x18\x02 \x01(\tR\x0etlsCertificate\x12&\n\x0ftls_private_key\x18\x03 \x01(\tR\rtlsPrivateKey"J\n\nLogRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12,\n\x04logs\x18\x02 \x03(\x0b2\x18.viam.common.v1.LogEntryR\x04logs"\r\n\x0bLogResponse"%\n\x13NeedsRestartRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id"\x9a\x01\n\x14NeedsRestartResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12!\n\x0cmust_restart\x18\x02 \x01(\x08R\x0bmustRestart\x12O\n\x16restart_check_interval\x18\x03 \x01(\x0b2\x19.google.protobuf.DurationR\x14restartCheckInterval"\x8e\x03\n\x0cModuleConfig\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12\x12\n\x04path\x18\x02 \x01(\tR\x04path\x12\x1b\n\tlog_level\x18\x03 \x01(\tR\x08logLevel\x12\x12\n\x04type\x18\x04 \x01(\tR\x04type\x12\x1b\n\tmodule_id\x18\x05 \x01(\tR\x08moduleId\x124\n\x03env\x18\x06 \x03(\x0b2".viam.app.v1.ModuleConfig.EnvEntryR\x03env\x128\n\x06status\x18\x07 \x01(\x0b2 .viam.app.v1.AppValidationStatusR\x06status\x12E\n\x11first_run_timeout\x18\x08 \x01(\x0b2\x19.google.protobuf.DurationR\x0ffirstRunTimeout\x12\x19\n\x08tcp_mode\x18\t \x01(\x08R\x07tcpMode\x1a6\n\x08EnvEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x028\x01"\xa5\x01\n\rPackageConfig\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12\x18\n\x07package\x18\x02 \x01(\tR\x07package\x12\x18\n\x07version\x18\x03 \x01(\tR\x07version\x12\x12\n\x04type\x18\x04 \x01(\tR\x04type\x128\n\x06status\x18\x05 \x01(\x0b2 .viam.app.v1.AppValidationStatusR\x06status"\x8a\x01\n\x11MaintenanceConfig\x12=\n\x0bsensor_name\x18\x01 \x01(\x0b2\x1c.viam.common.v1.ResourceNameR\nsensorName\x126\n\x17maintenance_allowed_key\x18\x02 \x01(\tR\x15maintenanceAllowedKey*\xbf\x01\n\x0fCredentialsType\x12 \n\x1cCREDENTIALS_TYPE_UNSPECIFIED\x10\x00\x12\x1d\n\x19CREDENTIALS_TYPE_INTERNAL\x10\x01\x12\x1c\n\x18CREDENTIALS_TYPE_API_KEY\x10\x02\x12!\n\x1dCREDENTIALS_TYPE_ROBOT_SECRET\x10\x03\x12*\n&CREDENTIALS_TYPE_ROBOT_LOCATION_SECRET\x10\x042\xb2\x02\n\x0cRobotService\x12A\n\x06Config\x12\x1a.viam.app.v1.ConfigRequest\x1a\x1b.viam.app.v1.ConfigResponse\x12P\n\x0bCertificate\x12\x1f.viam.app.v1.CertificateRequest\x1a .viam.app.v1.CertificateResponse\x128\n\x03Log\x12\x17.viam.app.v1.LogRequest\x1a\x18.viam.app.v1.LogResponse\x12S\n\x0cNeedsRestart\x12 .viam.app.v1.NeedsRestartRequest\x1a!.viam.app.v1.NeedsRestartResponseB\x18Z\x16go.viam.com/api/app/v1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x12app/v1/robot.proto\x12\x0bviam.app.v1\x1a\x16common/v1/common.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x16tagger/v1/tagger.proto"\xa1\x08\n\x0bRobotConfig\x12.\n\x05cloud\x18\x01 \x01(\x0b2\x18.viam.app.v1.CloudConfigR\x05cloud\x123\n\x07remotes\x18\x02 \x03(\x0b2\x19.viam.app.v1.RemoteConfigR\x07remotes\x12<\n\ncomponents\x18\x03 \x03(\x0b2\x1c.viam.app.v1.ComponentConfigR\ncomponents\x128\n\tprocesses\x18\x04 \x03(\x0b2\x1a.viam.app.v1.ProcessConfigR\tprocesses\x126\n\x08services\x18\x05 \x03(\x0b2\x1a.viam.app.v1.ServiceConfigR\x08services\x129\n\x07network\x18\x06 \x01(\x0b2\x1a.viam.app.v1.NetworkConfigH\x00R\x07network\x88\x01\x01\x120\n\x04auth\x18\x07 \x01(\x0b2\x17.viam.app.v1.AuthConfigH\x01R\x04auth\x88\x01\x01\x12\x19\n\x05debug\x18\x08 \x01(\x08H\x02R\x05debug\x88\x01\x01\x123\n\x07modules\x18\t \x03(\x0b2\x19.viam.app.v1.ModuleConfigR\x07modules\x127\n\x15disable_partial_start\x18\n \x01(\x08H\x03R\x13disablePartialStart\x88\x01\x01\x126\n\x08packages\x18\x0b \x03(\x0b2\x1a.viam.app.v1.PackageConfigR\x08packages\x12\\\n\x19overwrite_fragment_status\x18\x0c \x03(\x0b2 .viam.app.v1.AppValidationStatusR\x17overwriteFragmentStatus\x12,\n\x12enable_web_profile\x18\r \x01(\x08R\x10enableWebProfile\x12/\n\x03log\x18\x0e \x03(\x0b2\x1d.viam.app.v1.LogPatternConfigR\x03log\x12\x1a\n\x08revision\x18\x0f \x01(\tR\x08revision\x12E\n\x0bmaintenance\x18\x10 \x01(\x0b2\x1e.viam.app.v1.MaintenanceConfigH\x04R\x0bmaintenance\x88\x01\x01\x12:\n\x19disable_log_deduplication\x18\x11 \x01(\x08R\x17disableLogDeduplication\x12*\n\x04jobs\x18\x12 \x03(\x0b2\x16.viam.app.v1.JobConfigR\x04jobsB\n\n\x08_networkB\x07\n\x05_authB\x08\n\x06_debugB\x18\n\x16_disable_partial_startB\x0e\n\x0c_maintenance"B\n\x10LogPatternConfig\x12\x18\n\x07pattern\x18\x01 \x01(\tR\x07pattern\x12\x14\n\x05level\x18\x02 \x01(\tR\x05level"\xee\x01\n\tJobConfig\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12\x1a\n\x08schedule\x18\x02 \x01(\tR\x08schedule\x12\x1a\n\x08resource\x18\x03 \x01(\tR\x08resource\x12\x16\n\x06method\x18\x04 \x01(\tR\x06method\x121\n\x07command\x18\x05 \x01(\x0b2\x17.google.protobuf.StructR\x07command\x12J\n\x11log_configuration\x18\x06 \x01(\x0b2\x1d.viam.app.v1.LogConfigurationR\x10logConfiguration"8\n\x0eLocationSecret\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x16\n\x06secret\x18\x02 \x01(\tR\x06secret"+\n\x13AppValidationStatus\x12\x14\n\x05error\x18\x01 \x01(\tR\x05error"\xbe\x03\n\x0bCloudConfig\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04fqdn\x18\x02 \x01(\tR\x04fqdn\x12\x1d\n\nlocal_fqdn\x18\x03 \x01(\tR\tlocalFqdn\x12\x1d\n\nmanaged_by\x18\x04 \x01(\tR\tmanagedBy\x12+\n\x11signaling_address\x18\x05 \x01(\tR\x10signalingAddress\x12-\n\x12signaling_insecure\x18\x06 \x01(\x08R\x11signalingInsecure\x12+\n\x0flocation_secret\x18\x07 \x01(\tB\x02\x18\x01R\x0elocationSecret\x12\x16\n\x06secret\x18\x08 \x01(\tR\x06secret\x12F\n\x10location_secrets\x18\t \x03(\x0b2\x1b.viam.app.v1.LocationSecretR\x0flocationSecrets\x12$\n\x0eprimary_org_id\x18\n \x01(\tR\x0cprimaryOrgId\x12\x1f\n\x0blocation_id\x18\x0b \x01(\tR\nlocationId\x12\x1d\n\nmachine_id\x18\x0c \x01(\tR\tmachineId"\xbb\x03\n\x0fComponentConfig\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12\x1c\n\tnamespace\x18\x02 \x01(\tR\tnamespace\x12\x12\n\x04type\x18\x03 \x01(\tR\x04type\x12\x14\n\x05model\x18\x04 \x01(\tR\x05model\x12(\n\x05frame\x18\x05 \x01(\x0b2\x12.viam.app.v1.FrameR\x05frame\x12\x1d\n\ndepends_on\x18\x06 \x03(\tR\tdependsOn\x12l\n\x0fservice_configs\x18\x07 \x03(\x0b2\'.viam.app.v1.ResourceLevelServiceConfigB\x1a\x9a\x84\x9e\x03\x15json:"service_config"R\x0eserviceConfigs\x127\n\nattributes\x18\x08 \x01(\x0b2\x17.google.protobuf.StructR\nattributes\x12\x10\n\x03api\x18\t \x01(\tR\x03api\x12J\n\x11log_configuration\x18\n \x01(\x0b2\x1d.viam.app.v1.LogConfigurationR\x10logConfiguration"i\n\x1aResourceLevelServiceConfig\x12\x12\n\x04type\x18\x01 \x01(\tR\x04type\x127\n\nattributes\x18\x02 \x01(\x0b2\x17.google.protobuf.StructR\nattributes"\xf0\x02\n\rProcessConfig\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12\x12\n\x04args\x18\x03 \x03(\tR\x04args\x12\x10\n\x03cwd\x18\x04 \x01(\tR\x03cwd\x12\x19\n\x08one_shot\x18\x05 \x01(\x08R\x07oneShot\x12\x10\n\x03log\x18\x06 \x01(\x08R\x03log\x12\x1f\n\x0bstop_signal\x18\x07 \x01(\x05R\nstopSignal\x12<\n\x0cstop_timeout\x18\x08 \x01(\x0b2\x19.google.protobuf.DurationR\x0bstopTimeout\x125\n\x03env\x18\t \x03(\x0b2#.viam.app.v1.ProcessConfig.EnvEntryR\x03env\x12\x1a\n\x08username\x18\n \x01(\tR\x08username\x1a6\n\x08EnvEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x028\x01"\x8f\x03\n\rServiceConfig\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12\x1c\n\tnamespace\x18\x02 \x01(\tR\tnamespace\x12\x12\n\x04type\x18\x03 \x01(\tR\x04type\x127\n\nattributes\x18\x04 \x01(\x0b2\x17.google.protobuf.StructR\nattributes\x12\x1d\n\ndepends_on\x18\x05 \x03(\tR\tdependsOn\x12\x14\n\x05model\x18\x06 \x01(\tR\x05model\x12\x10\n\x03api\x18\t \x01(\tR\x03api\x12l\n\x0fservice_configs\x18\n \x03(\x0b2\'.viam.app.v1.ResourceLevelServiceConfigB\x1a\x9a\x84\x9e\x03\x15json:"service_config"R\x0eserviceConfigs\x12J\n\x11log_configuration\x18\x0b \x01(\x0b2\x1d.viam.app.v1.LogConfigurationR\x10logConfiguration"\xba\x02\n\rNetworkConfig\x12\x12\n\x04fqdn\x18\x01 \x01(\tR\x04fqdn\x12!\n\x0cbind_address\x18\x02 \x01(\tR\x0bbindAddress\x12"\n\rtls_cert_file\x18\x03 \x01(\tR\x0btlsCertFile\x12 \n\x0ctls_key_file\x18\x04 \x01(\tR\ntlsKeyFile\x127\n\x08sessions\x18\x05 \x01(\x0b2\x1b.viam.app.v1.SessionsConfigR\x08sessions\x12\\\n\x18traffic_tunnel_endpoints\x18\x06 \x03(\x0b2".viam.app.v1.TrafficTunnelEndpointR\x16trafficTunnelEndpoints\x12\x15\n\x06no_tls\x18\x07 \x01(\x08R\x05noTls"V\n\x0eSessionsConfig\x12D\n\x10heartbeat_window\x18\x01 \x01(\x0b2\x19.google.protobuf.DurationR\x0fheartbeatWindow"u\n\x15TrafficTunnelEndpoint\x12\x12\n\x04port\x18\x01 \x01(\x05R\x04port\x12H\n\x12connection_timeout\x18\x02 \x01(\x0b2\x19.google.protobuf.DurationR\x11connectionTimeout"\xe5\x01\n\nAuthConfig\x12:\n\x08handlers\x18\x01 \x03(\x0b2\x1e.viam.app.v1.AuthHandlerConfigR\x08handlers\x12*\n\x11tls_auth_entities\x18\x02 \x03(\tR\x0ftlsAuthEntities\x12V\n\x14external_auth_config\x18\x03 \x01(\x0b2\x1f.viam.app.v1.ExternalAuthConfigH\x00R\x12externalAuthConfig\x88\x01\x01B\x17\n\x15_external_auth_config"7\n\x08JWKSFile\x12+\n\x04json\x18\x01 \x01(\x0b2\x17.google.protobuf.StructR\x04json"?\n\x12ExternalAuthConfig\x12)\n\x04jwks\x18\x01 \x01(\x0b2\x15.viam.app.v1.JWKSFileR\x04jwks"v\n\x11AuthHandlerConfig\x120\n\x04type\x18\x01 \x01(\x0e2\x1c.viam.app.v1.CredentialsTypeR\x04type\x12/\n\x06config\x18\x05 \x01(\x0b2\x17.google.protobuf.StructR\x06config"\xcd\x01\n\x05Frame\x12\x16\n\x06parent\x18\x01 \x01(\tR\x06parent\x12:\n\x0btranslation\x18\x02 \x01(\x0b2\x18.viam.app.v1.TranslationR\x0btranslation\x12:\n\x0borientation\x18\x03 \x01(\x0b2\x18.viam.app.v1.OrientationR\x0borientation\x124\n\x08geometry\x18\x04 \x01(\x0b2\x18.viam.common.v1.GeometryR\x08geometry"(\n\x10LogConfiguration\x12\x14\n\x05level\x18\x01 \x01(\tR\x05level"7\n\x0bTranslation\x12\x0c\n\x01x\x18\x01 \x01(\x01R\x01x\x12\x0c\n\x01y\x18\x02 \x01(\x01R\x01y\x12\x0c\n\x01z\x18\x03 \x01(\x01R\x01z"\xd0\x07\n\x0bOrientation\x12O\n\x0eno_orientation\x18\x01 \x01(\x0b2&.viam.app.v1.Orientation.NoOrientationH\x00R\rnoOrientation\x12Z\n\x0evector_radians\x18\x02 \x01(\x0b21.viam.app.v1.Orientation.OrientationVectorRadiansH\x00R\rvectorRadians\x12Z\n\x0evector_degrees\x18\x03 \x01(\x0b21.viam.app.v1.Orientation.OrientationVectorDegreesH\x00R\rvectorDegrees\x12I\n\x0ceuler_angles\x18\x04 \x01(\x0b2$.viam.app.v1.Orientation.EulerAnglesH\x00R\x0beulerAngles\x12F\n\x0baxis_angles\x18\x05 \x01(\x0b2#.viam.app.v1.Orientation.AxisAnglesH\x00R\naxisAngles\x12E\n\nquaternion\x18\x06 \x01(\x0b2#.viam.app.v1.Orientation.QuaternionH\x00R\nquaternion\x1a\x0f\n\rNoOrientation\x1aj\n\x18OrientationVectorRadians\x12$\n\x05theta\x18\x01 \x01(\x01B\x0e\x9a\x84\x9e\x03\tjson:"th"R\x05theta\x12\x0c\n\x01x\x18\x02 \x01(\x01R\x01x\x12\x0c\n\x01y\x18\x03 \x01(\x01R\x01y\x12\x0c\n\x01z\x18\x04 \x01(\x01R\x01z\x1aj\n\x18OrientationVectorDegrees\x12$\n\x05theta\x18\x01 \x01(\x01B\x0e\x9a\x84\x9e\x03\tjson:"th"R\x05theta\x12\x0c\n\x01x\x18\x02 \x01(\x01R\x01x\x12\x0c\n\x01y\x18\x03 \x01(\x01R\x01y\x12\x0c\n\x01z\x18\x04 \x01(\x01R\x01z\x1aI\n\x0bEulerAngles\x12\x12\n\x04roll\x18\x01 \x01(\x01R\x04roll\x12\x14\n\x05pitch\x18\x02 \x01(\x01R\x05pitch\x12\x10\n\x03yaw\x18\x03 \x01(\x01R\x03yaw\x1a\\\n\nAxisAngles\x12$\n\x05theta\x18\x01 \x01(\x01B\x0e\x9a\x84\x9e\x03\tjson:"th"R\x05theta\x12\x0c\n\x01x\x18\x02 \x01(\x01R\x01x\x12\x0c\n\x01y\x18\x03 \x01(\x01R\x01y\x12\x0c\n\x01z\x18\x04 \x01(\x01R\x01z\x1aD\n\nQuaternion\x12\x0c\n\x01w\x18\x01 \x01(\x01R\x01w\x12\x0c\n\x01x\x18\x02 \x01(\x01R\x01x\x12\x0c\n\x01y\x18\x03 \x01(\x01R\x01y\x12\x0c\n\x01z\x18\x04 \x01(\x01R\x01zB\x06\n\x04type"\x8d\x04\n\x0cRemoteConfig\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12\x18\n\x07address\x18\x02 \x01(\tR\x07address\x12(\n\x05frame\x18\x03 \x01(\x0b2\x12.viam.app.v1.FrameR\x05frame\x12+\n\x04auth\x18\x04 \x01(\x0b2\x17.viam.app.v1.RemoteAuthR\x04auth\x12\x1d\n\nmanaged_by\x18\x05 \x01(\tR\tmanagedBy\x12\x1a\n\x08insecure\x18\x06 \x01(\x08R\x08insecure\x12U\n\x19connection_check_interval\x18\x07 \x01(\x0b2\x19.google.protobuf.DurationR\x17connectionCheckInterval\x12H\n\x12reconnect_interval\x18\x08 \x01(\x0b2\x19.google.protobuf.DurationR\x11reconnectInterval\x12l\n\x0fservice_configs\x18\t \x03(\x0b2\'.viam.app.v1.ResourceLevelServiceConfigB\x1a\x9a\x84\x9e\x03\x15json:"service_config"R\x0eserviceConfigs\x12\x16\n\x06secret\x18\n \x01(\tR\x06secret\x12\x16\n\x06prefix\x18\x0b \x01(\tR\x06prefix"\xc6\x01\n\nRemoteAuth\x12E\n\x0bcredentials\x18\x01 \x01(\x0b2#.viam.app.v1.RemoteAuth.CredentialsR\x0bcredentials\x12\x16\n\x06entity\x18\x02 \x01(\tR\x06entity\x1aY\n\x0bCredentials\x120\n\x04type\x18\x01 \x01(\x0e2\x1c.viam.app.v1.CredentialsTypeR\x04type\x12\x18\n\x07payload\x18\x02 \x01(\tR\x07payload"\xd1\x01\n\tAgentInfo\x12\x12\n\x04host\x18\x01 \x01(\tR\x04host\x12\x0e\n\x02os\x18\x02 \x01(\tR\x02os\x12\x10\n\x03ips\x18\x03 \x03(\tR\x03ips\x12\x18\n\x07version\x18\x04 \x01(\tR\x07version\x12!\n\x0cgit_revision\x18\x05 \x01(\tR\x0bgitRevision\x12\x1f\n\x08platform\x18\x06 \x01(\tH\x00R\x08platform\x88\x01\x01\x12#\n\rplatform_tags\x18\x07 \x03(\tR\x0cplatformTagsB\x0b\n\t_platform"j\n\rConfigRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12:\n\nagent_info\x18\x02 \x01(\x0b2\x16.viam.app.v1.AgentInfoH\x00R\tagentInfo\x88\x01\x01B\r\n\x0b_agent_info"B\n\x0eConfigResponse\x120\n\x06config\x18\x01 \x01(\x0b2\x18.viam.app.v1.RobotConfigR\x06config"$\n\x12CertificateRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id"v\n\x13CertificateResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\'\n\x0ftls_certificate\x18\x02 \x01(\tR\x0etlsCertificate\x12&\n\x0ftls_private_key\x18\x03 \x01(\tR\rtlsPrivateKey"J\n\nLogRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12,\n\x04logs\x18\x02 \x03(\x0b2\x18.viam.common.v1.LogEntryR\x04logs"\r\n\x0bLogResponse"%\n\x13NeedsRestartRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id"\x9a\x01\n\x14NeedsRestartResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12!\n\x0cmust_restart\x18\x02 \x01(\x08R\x0bmustRestart\x12O\n\x16restart_check_interval\x18\x03 \x01(\x0b2\x19.google.protobuf.DurationR\x14restartCheckInterval"\x8e\x03\n\x0cModuleConfig\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12\x12\n\x04path\x18\x02 \x01(\tR\x04path\x12\x1b\n\tlog_level\x18\x03 \x01(\tR\x08logLevel\x12\x12\n\x04type\x18\x04 \x01(\tR\x04type\x12\x1b\n\tmodule_id\x18\x05 \x01(\tR\x08moduleId\x124\n\x03env\x18\x06 \x03(\x0b2".viam.app.v1.ModuleConfig.EnvEntryR\x03env\x128\n\x06status\x18\x07 \x01(\x0b2 .viam.app.v1.AppValidationStatusR\x06status\x12E\n\x11first_run_timeout\x18\x08 \x01(\x0b2\x19.google.protobuf.DurationR\x0ffirstRunTimeout\x12\x19\n\x08tcp_mode\x18\t \x01(\x08R\x07tcpMode\x1a6\n\x08EnvEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x028\x01"\xa5\x01\n\rPackageConfig\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12\x18\n\x07package\x18\x02 \x01(\tR\x07package\x12\x18\n\x07version\x18\x03 \x01(\tR\x07version\x12\x12\n\x04type\x18\x04 \x01(\tR\x04type\x128\n\x06status\x18\x05 \x01(\x0b2 .viam.app.v1.AppValidationStatusR\x06status"\x8a\x01\n\x11MaintenanceConfig\x12=\n\x0bsensor_name\x18\x01 \x01(\x0b2\x1c.viam.common.v1.ResourceNameR\nsensorName\x126\n\x17maintenance_allowed_key\x18\x02 \x01(\tR\x15maintenanceAllowedKey*\xbf\x01\n\x0fCredentialsType\x12 \n\x1cCREDENTIALS_TYPE_UNSPECIFIED\x10\x00\x12\x1d\n\x19CREDENTIALS_TYPE_INTERNAL\x10\x01\x12\x1c\n\x18CREDENTIALS_TYPE_API_KEY\x10\x02\x12!\n\x1dCREDENTIALS_TYPE_ROBOT_SECRET\x10\x03\x12*\n&CREDENTIALS_TYPE_ROBOT_LOCATION_SECRET\x10\x042\xb2\x02\n\x0cRobotService\x12A\n\x06Config\x12\x1a.viam.app.v1.ConfigRequest\x1a\x1b.viam.app.v1.ConfigResponse\x12P\n\x0bCertificate\x12\x1f.viam.app.v1.CertificateRequest\x1a .viam.app.v1.CertificateResponse\x128\n\x03Log\x12\x17.viam.app.v1.LogRequest\x1a\x18.viam.app.v1.LogResponse\x12S\n\x0cNeedsRestart\x12 .viam.app.v1.NeedsRestartRequest\x1a!.viam.app.v1.NeedsRestartResponseB\x18Z\x16go.viam.com/api/app/v1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'app.v1.robot_pb2', _globals) @@ -35,95 +35,95 @@ _globals['_REMOTECONFIG'].fields_by_name['service_configs']._serialized_options = b'\x9a\x84\x9e\x03\x15json:"service_config"' _globals['_MODULECONFIG_ENVENTRY']._loaded_options = None _globals['_MODULECONFIG_ENVENTRY']._serialized_options = b'8\x01' - _globals['_CREDENTIALSTYPE']._serialized_start = 7873 - _globals['_CREDENTIALSTYPE']._serialized_end = 8064 + _globals['_CREDENTIALSTYPE']._serialized_start = 7949 + _globals['_CREDENTIALSTYPE']._serialized_end = 8140 _globals['_ROBOTCONFIG']._serialized_start = 146 _globals['_ROBOTCONFIG']._serialized_end = 1203 _globals['_LOGPATTERNCONFIG']._serialized_start = 1205 _globals['_LOGPATTERNCONFIG']._serialized_end = 1271 _globals['_JOBCONFIG']._serialized_start = 1274 - _globals['_JOBCONFIG']._serialized_end = 1436 - _globals['_LOCATIONSECRET']._serialized_start = 1438 - _globals['_LOCATIONSECRET']._serialized_end = 1494 - _globals['_APPVALIDATIONSTATUS']._serialized_start = 1496 - _globals['_APPVALIDATIONSTATUS']._serialized_end = 1539 - _globals['_CLOUDCONFIG']._serialized_start = 1542 - _globals['_CLOUDCONFIG']._serialized_end = 1988 - _globals['_COMPONENTCONFIG']._serialized_start = 1991 - _globals['_COMPONENTCONFIG']._serialized_end = 2434 - _globals['_RESOURCELEVELSERVICECONFIG']._serialized_start = 2436 - _globals['_RESOURCELEVELSERVICECONFIG']._serialized_end = 2541 - _globals['_PROCESSCONFIG']._serialized_start = 2544 - _globals['_PROCESSCONFIG']._serialized_end = 2912 - _globals['_PROCESSCONFIG_ENVENTRY']._serialized_start = 2858 - _globals['_PROCESSCONFIG_ENVENTRY']._serialized_end = 2912 - _globals['_SERVICECONFIG']._serialized_start = 2915 - _globals['_SERVICECONFIG']._serialized_end = 3314 - _globals['_NETWORKCONFIG']._serialized_start = 3317 - _globals['_NETWORKCONFIG']._serialized_end = 3631 - _globals['_SESSIONSCONFIG']._serialized_start = 3633 - _globals['_SESSIONSCONFIG']._serialized_end = 3719 - _globals['_TRAFFICTUNNELENDPOINT']._serialized_start = 3721 - _globals['_TRAFFICTUNNELENDPOINT']._serialized_end = 3838 - _globals['_AUTHCONFIG']._serialized_start = 3841 - _globals['_AUTHCONFIG']._serialized_end = 4070 - _globals['_JWKSFILE']._serialized_start = 4072 - _globals['_JWKSFILE']._serialized_end = 4127 - _globals['_EXTERNALAUTHCONFIG']._serialized_start = 4129 - _globals['_EXTERNALAUTHCONFIG']._serialized_end = 4192 - _globals['_AUTHHANDLERCONFIG']._serialized_start = 4194 - _globals['_AUTHHANDLERCONFIG']._serialized_end = 4312 - _globals['_FRAME']._serialized_start = 4315 - _globals['_FRAME']._serialized_end = 4520 - _globals['_LOGCONFIGURATION']._serialized_start = 4522 - _globals['_LOGCONFIGURATION']._serialized_end = 4562 - _globals['_TRANSLATION']._serialized_start = 4564 - _globals['_TRANSLATION']._serialized_end = 4619 - _globals['_ORIENTATION']._serialized_start = 4622 - _globals['_ORIENTATION']._serialized_end = 5598 - _globals['_ORIENTATION_NOORIENTATION']._serialized_start = 5120 - _globals['_ORIENTATION_NOORIENTATION']._serialized_end = 5135 - _globals['_ORIENTATION_ORIENTATIONVECTORRADIANS']._serialized_start = 5137 - _globals['_ORIENTATION_ORIENTATIONVECTORRADIANS']._serialized_end = 5243 - _globals['_ORIENTATION_ORIENTATIONVECTORDEGREES']._serialized_start = 5245 - _globals['_ORIENTATION_ORIENTATIONVECTORDEGREES']._serialized_end = 5351 - _globals['_ORIENTATION_EULERANGLES']._serialized_start = 5353 - _globals['_ORIENTATION_EULERANGLES']._serialized_end = 5426 - _globals['_ORIENTATION_AXISANGLES']._serialized_start = 5428 - _globals['_ORIENTATION_AXISANGLES']._serialized_end = 5520 - _globals['_ORIENTATION_QUATERNION']._serialized_start = 5522 - _globals['_ORIENTATION_QUATERNION']._serialized_end = 5590 - _globals['_REMOTECONFIG']._serialized_start = 5601 - _globals['_REMOTECONFIG']._serialized_end = 6126 - _globals['_REMOTEAUTH']._serialized_start = 6129 - _globals['_REMOTEAUTH']._serialized_end = 6327 - _globals['_REMOTEAUTH_CREDENTIALS']._serialized_start = 6238 - _globals['_REMOTEAUTH_CREDENTIALS']._serialized_end = 6327 - _globals['_AGENTINFO']._serialized_start = 6330 - _globals['_AGENTINFO']._serialized_end = 6539 - _globals['_CONFIGREQUEST']._serialized_start = 6541 - _globals['_CONFIGREQUEST']._serialized_end = 6647 - _globals['_CONFIGRESPONSE']._serialized_start = 6649 - _globals['_CONFIGRESPONSE']._serialized_end = 6715 - _globals['_CERTIFICATEREQUEST']._serialized_start = 6717 - _globals['_CERTIFICATEREQUEST']._serialized_end = 6753 - _globals['_CERTIFICATERESPONSE']._serialized_start = 6755 - _globals['_CERTIFICATERESPONSE']._serialized_end = 6873 - _globals['_LOGREQUEST']._serialized_start = 6875 - _globals['_LOGREQUEST']._serialized_end = 6949 - _globals['_LOGRESPONSE']._serialized_start = 6951 - _globals['_LOGRESPONSE']._serialized_end = 6964 - _globals['_NEEDSRESTARTREQUEST']._serialized_start = 6966 - _globals['_NEEDSRESTARTREQUEST']._serialized_end = 7003 - _globals['_NEEDSRESTARTRESPONSE']._serialized_start = 7006 - _globals['_NEEDSRESTARTRESPONSE']._serialized_end = 7160 - _globals['_MODULECONFIG']._serialized_start = 7163 - _globals['_MODULECONFIG']._serialized_end = 7561 - _globals['_MODULECONFIG_ENVENTRY']._serialized_start = 2858 - _globals['_MODULECONFIG_ENVENTRY']._serialized_end = 2912 - _globals['_PACKAGECONFIG']._serialized_start = 7564 - _globals['_PACKAGECONFIG']._serialized_end = 7729 - _globals['_MAINTENANCECONFIG']._serialized_start = 7732 - _globals['_MAINTENANCECONFIG']._serialized_end = 7870 - _globals['_ROBOTSERVICE']._serialized_start = 8067 - _globals['_ROBOTSERVICE']._serialized_end = 8373 \ No newline at end of file + _globals['_JOBCONFIG']._serialized_end = 1512 + _globals['_LOCATIONSECRET']._serialized_start = 1514 + _globals['_LOCATIONSECRET']._serialized_end = 1570 + _globals['_APPVALIDATIONSTATUS']._serialized_start = 1572 + _globals['_APPVALIDATIONSTATUS']._serialized_end = 1615 + _globals['_CLOUDCONFIG']._serialized_start = 1618 + _globals['_CLOUDCONFIG']._serialized_end = 2064 + _globals['_COMPONENTCONFIG']._serialized_start = 2067 + _globals['_COMPONENTCONFIG']._serialized_end = 2510 + _globals['_RESOURCELEVELSERVICECONFIG']._serialized_start = 2512 + _globals['_RESOURCELEVELSERVICECONFIG']._serialized_end = 2617 + _globals['_PROCESSCONFIG']._serialized_start = 2620 + _globals['_PROCESSCONFIG']._serialized_end = 2988 + _globals['_PROCESSCONFIG_ENVENTRY']._serialized_start = 2934 + _globals['_PROCESSCONFIG_ENVENTRY']._serialized_end = 2988 + _globals['_SERVICECONFIG']._serialized_start = 2991 + _globals['_SERVICECONFIG']._serialized_end = 3390 + _globals['_NETWORKCONFIG']._serialized_start = 3393 + _globals['_NETWORKCONFIG']._serialized_end = 3707 + _globals['_SESSIONSCONFIG']._serialized_start = 3709 + _globals['_SESSIONSCONFIG']._serialized_end = 3795 + _globals['_TRAFFICTUNNELENDPOINT']._serialized_start = 3797 + _globals['_TRAFFICTUNNELENDPOINT']._serialized_end = 3914 + _globals['_AUTHCONFIG']._serialized_start = 3917 + _globals['_AUTHCONFIG']._serialized_end = 4146 + _globals['_JWKSFILE']._serialized_start = 4148 + _globals['_JWKSFILE']._serialized_end = 4203 + _globals['_EXTERNALAUTHCONFIG']._serialized_start = 4205 + _globals['_EXTERNALAUTHCONFIG']._serialized_end = 4268 + _globals['_AUTHHANDLERCONFIG']._serialized_start = 4270 + _globals['_AUTHHANDLERCONFIG']._serialized_end = 4388 + _globals['_FRAME']._serialized_start = 4391 + _globals['_FRAME']._serialized_end = 4596 + _globals['_LOGCONFIGURATION']._serialized_start = 4598 + _globals['_LOGCONFIGURATION']._serialized_end = 4638 + _globals['_TRANSLATION']._serialized_start = 4640 + _globals['_TRANSLATION']._serialized_end = 4695 + _globals['_ORIENTATION']._serialized_start = 4698 + _globals['_ORIENTATION']._serialized_end = 5674 + _globals['_ORIENTATION_NOORIENTATION']._serialized_start = 5196 + _globals['_ORIENTATION_NOORIENTATION']._serialized_end = 5211 + _globals['_ORIENTATION_ORIENTATIONVECTORRADIANS']._serialized_start = 5213 + _globals['_ORIENTATION_ORIENTATIONVECTORRADIANS']._serialized_end = 5319 + _globals['_ORIENTATION_ORIENTATIONVECTORDEGREES']._serialized_start = 5321 + _globals['_ORIENTATION_ORIENTATIONVECTORDEGREES']._serialized_end = 5427 + _globals['_ORIENTATION_EULERANGLES']._serialized_start = 5429 + _globals['_ORIENTATION_EULERANGLES']._serialized_end = 5502 + _globals['_ORIENTATION_AXISANGLES']._serialized_start = 5504 + _globals['_ORIENTATION_AXISANGLES']._serialized_end = 5596 + _globals['_ORIENTATION_QUATERNION']._serialized_start = 5598 + _globals['_ORIENTATION_QUATERNION']._serialized_end = 5666 + _globals['_REMOTECONFIG']._serialized_start = 5677 + _globals['_REMOTECONFIG']._serialized_end = 6202 + _globals['_REMOTEAUTH']._serialized_start = 6205 + _globals['_REMOTEAUTH']._serialized_end = 6403 + _globals['_REMOTEAUTH_CREDENTIALS']._serialized_start = 6314 + _globals['_REMOTEAUTH_CREDENTIALS']._serialized_end = 6403 + _globals['_AGENTINFO']._serialized_start = 6406 + _globals['_AGENTINFO']._serialized_end = 6615 + _globals['_CONFIGREQUEST']._serialized_start = 6617 + _globals['_CONFIGREQUEST']._serialized_end = 6723 + _globals['_CONFIGRESPONSE']._serialized_start = 6725 + _globals['_CONFIGRESPONSE']._serialized_end = 6791 + _globals['_CERTIFICATEREQUEST']._serialized_start = 6793 + _globals['_CERTIFICATEREQUEST']._serialized_end = 6829 + _globals['_CERTIFICATERESPONSE']._serialized_start = 6831 + _globals['_CERTIFICATERESPONSE']._serialized_end = 6949 + _globals['_LOGREQUEST']._serialized_start = 6951 + _globals['_LOGREQUEST']._serialized_end = 7025 + _globals['_LOGRESPONSE']._serialized_start = 7027 + _globals['_LOGRESPONSE']._serialized_end = 7040 + _globals['_NEEDSRESTARTREQUEST']._serialized_start = 7042 + _globals['_NEEDSRESTARTREQUEST']._serialized_end = 7079 + _globals['_NEEDSRESTARTRESPONSE']._serialized_start = 7082 + _globals['_NEEDSRESTARTRESPONSE']._serialized_end = 7236 + _globals['_MODULECONFIG']._serialized_start = 7239 + _globals['_MODULECONFIG']._serialized_end = 7637 + _globals['_MODULECONFIG_ENVENTRY']._serialized_start = 2934 + _globals['_MODULECONFIG_ENVENTRY']._serialized_end = 2988 + _globals['_PACKAGECONFIG']._serialized_start = 7640 + _globals['_PACKAGECONFIG']._serialized_end = 7805 + _globals['_MAINTENANCECONFIG']._serialized_start = 7808 + _globals['_MAINTENANCECONFIG']._serialized_end = 7946 + _globals['_ROBOTSERVICE']._serialized_start = 8143 + _globals['_ROBOTSERVICE']._serialized_end = 8449 \ No newline at end of file diff --git a/src/viam/gen/app/v1/robot_pb2.pyi b/src/viam/gen/app/v1/robot_pb2.pyi index 998518030..22502941d 100644 --- a/src/viam/gen/app/v1/robot_pb2.pyi +++ b/src/viam/gen/app/v1/robot_pb2.pyi @@ -179,6 +179,7 @@ class JobConfig(google.protobuf.message.Message): RESOURCE_FIELD_NUMBER: builtins.int METHOD_FIELD_NUMBER: builtins.int COMMAND_FIELD_NUMBER: builtins.int + LOG_CONFIGURATION_FIELD_NUMBER: builtins.int name: builtins.str 'unique name of the job.' schedule: builtins.str @@ -194,13 +195,17 @@ class JobConfig(google.protobuf.message.Message): command argument of the gRPC request. """ - def __init__(self, *, name: builtins.str=..., schedule: builtins.str=..., resource: builtins.str=..., method: builtins.str=..., command: google.protobuf.struct_pb2.Struct | None=...) -> None: + @property + def log_configuration(self) -> global___LogConfiguration: + """configuration for this job's logger.""" + + def __init__(self, *, name: builtins.str=..., schedule: builtins.str=..., resource: builtins.str=..., method: builtins.str=..., command: google.protobuf.struct_pb2.Struct | None=..., log_configuration: global___LogConfiguration | None=...) -> None: ... - def HasField(self, field_name: typing.Literal['command', b'command']) -> builtins.bool: + def HasField(self, field_name: typing.Literal['command', b'command', 'log_configuration', b'log_configuration']) -> builtins.bool: ... - def ClearField(self, field_name: typing.Literal['command', b'command', 'method', b'method', 'name', b'name', 'resource', b'resource', 'schedule', b'schedule']) -> None: + def ClearField(self, field_name: typing.Literal['command', b'command', 'log_configuration', b'log_configuration', 'method', b'method', 'name', b'name', 'resource', b'resource', 'schedule', b'schedule']) -> None: ... global___JobConfig = JobConfig diff --git a/src/viam/gen/component/gantry/v1/gantry_grpc.py b/src/viam/gen/component/gantry/v1/gantry_grpc.py index 26e13b99d..1dd41b416 100644 --- a/src/viam/gen/component/gantry/v1/gantry_grpc.py +++ b/src/viam/gen/component/gantry/v1/gantry_grpc.py @@ -40,12 +40,16 @@ async def IsMoving(self, stream: 'grpclib.server.Stream[component.gantry.v1.gant async def DoCommand(self, stream: 'grpclib.server.Stream[common.v1.common_pb2.DoCommandRequest, common.v1.common_pb2.DoCommandResponse]') -> None: pass + @abc.abstractmethod + async def GetKinematics(self, stream: 'grpclib.server.Stream[common.v1.common_pb2.GetKinematicsRequest, common.v1.common_pb2.GetKinematicsResponse]') -> None: + pass + @abc.abstractmethod async def GetGeometries(self, stream: 'grpclib.server.Stream[common.v1.common_pb2.GetGeometriesRequest, common.v1.common_pb2.GetGeometriesResponse]') -> None: pass def __mapping__(self) -> typing.Dict[str, grpclib.const.Handler]: - return {'/viam.component.gantry.v1.GantryService/GetPosition': grpclib.const.Handler(self.GetPosition, grpclib.const.Cardinality.UNARY_UNARY, component.gantry.v1.gantry_pb2.GetPositionRequest, component.gantry.v1.gantry_pb2.GetPositionResponse), '/viam.component.gantry.v1.GantryService/MoveToPosition': grpclib.const.Handler(self.MoveToPosition, grpclib.const.Cardinality.UNARY_UNARY, component.gantry.v1.gantry_pb2.MoveToPositionRequest, component.gantry.v1.gantry_pb2.MoveToPositionResponse), '/viam.component.gantry.v1.GantryService/Home': grpclib.const.Handler(self.Home, grpclib.const.Cardinality.UNARY_UNARY, component.gantry.v1.gantry_pb2.HomeRequest, component.gantry.v1.gantry_pb2.HomeResponse), '/viam.component.gantry.v1.GantryService/GetLengths': grpclib.const.Handler(self.GetLengths, grpclib.const.Cardinality.UNARY_UNARY, component.gantry.v1.gantry_pb2.GetLengthsRequest, component.gantry.v1.gantry_pb2.GetLengthsResponse), '/viam.component.gantry.v1.GantryService/Stop': grpclib.const.Handler(self.Stop, grpclib.const.Cardinality.UNARY_UNARY, component.gantry.v1.gantry_pb2.StopRequest, component.gantry.v1.gantry_pb2.StopResponse), '/viam.component.gantry.v1.GantryService/IsMoving': grpclib.const.Handler(self.IsMoving, grpclib.const.Cardinality.UNARY_UNARY, component.gantry.v1.gantry_pb2.IsMovingRequest, component.gantry.v1.gantry_pb2.IsMovingResponse), '/viam.component.gantry.v1.GantryService/DoCommand': grpclib.const.Handler(self.DoCommand, grpclib.const.Cardinality.UNARY_UNARY, common.v1.common_pb2.DoCommandRequest, common.v1.common_pb2.DoCommandResponse), '/viam.component.gantry.v1.GantryService/GetGeometries': grpclib.const.Handler(self.GetGeometries, grpclib.const.Cardinality.UNARY_UNARY, common.v1.common_pb2.GetGeometriesRequest, common.v1.common_pb2.GetGeometriesResponse)} + return {'/viam.component.gantry.v1.GantryService/GetPosition': grpclib.const.Handler(self.GetPosition, grpclib.const.Cardinality.UNARY_UNARY, component.gantry.v1.gantry_pb2.GetPositionRequest, component.gantry.v1.gantry_pb2.GetPositionResponse), '/viam.component.gantry.v1.GantryService/MoveToPosition': grpclib.const.Handler(self.MoveToPosition, grpclib.const.Cardinality.UNARY_UNARY, component.gantry.v1.gantry_pb2.MoveToPositionRequest, component.gantry.v1.gantry_pb2.MoveToPositionResponse), '/viam.component.gantry.v1.GantryService/Home': grpclib.const.Handler(self.Home, grpclib.const.Cardinality.UNARY_UNARY, component.gantry.v1.gantry_pb2.HomeRequest, component.gantry.v1.gantry_pb2.HomeResponse), '/viam.component.gantry.v1.GantryService/GetLengths': grpclib.const.Handler(self.GetLengths, grpclib.const.Cardinality.UNARY_UNARY, component.gantry.v1.gantry_pb2.GetLengthsRequest, component.gantry.v1.gantry_pb2.GetLengthsResponse), '/viam.component.gantry.v1.GantryService/Stop': grpclib.const.Handler(self.Stop, grpclib.const.Cardinality.UNARY_UNARY, component.gantry.v1.gantry_pb2.StopRequest, component.gantry.v1.gantry_pb2.StopResponse), '/viam.component.gantry.v1.GantryService/IsMoving': grpclib.const.Handler(self.IsMoving, grpclib.const.Cardinality.UNARY_UNARY, component.gantry.v1.gantry_pb2.IsMovingRequest, component.gantry.v1.gantry_pb2.IsMovingResponse), '/viam.component.gantry.v1.GantryService/DoCommand': grpclib.const.Handler(self.DoCommand, grpclib.const.Cardinality.UNARY_UNARY, common.v1.common_pb2.DoCommandRequest, common.v1.common_pb2.DoCommandResponse), '/viam.component.gantry.v1.GantryService/GetKinematics': grpclib.const.Handler(self.GetKinematics, grpclib.const.Cardinality.UNARY_UNARY, common.v1.common_pb2.GetKinematicsRequest, common.v1.common_pb2.GetKinematicsResponse), '/viam.component.gantry.v1.GantryService/GetGeometries': grpclib.const.Handler(self.GetGeometries, grpclib.const.Cardinality.UNARY_UNARY, common.v1.common_pb2.GetGeometriesRequest, common.v1.common_pb2.GetGeometriesResponse)} class UnimplementedGantryServiceBase(GantryServiceBase): @@ -70,6 +74,9 @@ async def IsMoving(self, stream: 'grpclib.server.Stream[component.gantry.v1.gant async def DoCommand(self, stream: 'grpclib.server.Stream[common.v1.common_pb2.DoCommandRequest, common.v1.common_pb2.DoCommandResponse]') -> None: raise grpclib.exceptions.GRPCError(grpclib.const.Status.UNIMPLEMENTED) + async def GetKinematics(self, stream: 'grpclib.server.Stream[common.v1.common_pb2.GetKinematicsRequest, common.v1.common_pb2.GetKinematicsResponse]') -> None: + raise grpclib.exceptions.GRPCError(grpclib.const.Status.UNIMPLEMENTED) + async def GetGeometries(self, stream: 'grpclib.server.Stream[common.v1.common_pb2.GetGeometriesRequest, common.v1.common_pb2.GetGeometriesResponse]') -> None: raise grpclib.exceptions.GRPCError(grpclib.const.Status.UNIMPLEMENTED) @@ -83,4 +90,5 @@ def __init__(self, channel: grpclib.client.Channel) -> None: self.Stop = grpclib.client.UnaryUnaryMethod(channel, '/viam.component.gantry.v1.GantryService/Stop', component.gantry.v1.gantry_pb2.StopRequest, component.gantry.v1.gantry_pb2.StopResponse) self.IsMoving = grpclib.client.UnaryUnaryMethod(channel, '/viam.component.gantry.v1.GantryService/IsMoving', component.gantry.v1.gantry_pb2.IsMovingRequest, component.gantry.v1.gantry_pb2.IsMovingResponse) self.DoCommand = grpclib.client.UnaryUnaryMethod(channel, '/viam.component.gantry.v1.GantryService/DoCommand', common.v1.common_pb2.DoCommandRequest, common.v1.common_pb2.DoCommandResponse) + self.GetKinematics = grpclib.client.UnaryUnaryMethod(channel, '/viam.component.gantry.v1.GantryService/GetKinematics', common.v1.common_pb2.GetKinematicsRequest, common.v1.common_pb2.GetKinematicsResponse) self.GetGeometries = grpclib.client.UnaryUnaryMethod(channel, '/viam.component.gantry.v1.GantryService/GetGeometries', common.v1.common_pb2.GetGeometriesRequest, common.v1.common_pb2.GetGeometriesResponse) \ No newline at end of file diff --git a/src/viam/gen/component/gantry/v1/gantry_pb2.py b/src/viam/gen/component/gantry/v1/gantry_pb2.py index 876dc91bc..f009d49f7 100644 --- a/src/viam/gen/component/gantry/v1/gantry_pb2.py +++ b/src/viam/gen/component/gantry/v1/gantry_pb2.py @@ -9,7 +9,7 @@ from ....common.v1 import common_pb2 as common_dot_v1_dot_common__pb2 from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2 from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n component/gantry/v1/gantry.proto\x12\x18viam.component.gantry.v1\x1a\x16common/v1/common.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x1cgoogle/protobuf/struct.proto"W\n\x12GetPositionRequest\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12-\n\x05extra\x18c \x01(\x0b2\x17.google.protobuf.StructR\x05extra"8\n\x13GetPositionResponse\x12!\n\x0cpositions_mm\x18\x01 \x03(\x01R\x0bpositionsMm"\xa8\x01\n\x15MoveToPositionRequest\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12!\n\x0cpositions_mm\x18\x02 \x03(\x01R\x0bpositionsMm\x12)\n\x11speeds_mm_per_sec\x18\x03 \x03(\x01R\x0espeedsMmPerSec\x12-\n\x05extra\x18c \x01(\x0b2\x17.google.protobuf.StructR\x05extra"\x18\n\x16MoveToPositionResponse"P\n\x0bHomeRequest\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12-\n\x05extra\x18c \x01(\x0b2\x17.google.protobuf.StructR\x05extra"$\n\x0cHomeResponse\x12\x14\n\x05homed\x18\x01 \x01(\x08R\x05homed"V\n\x11GetLengthsRequest\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12-\n\x05extra\x18c \x01(\x0b2\x17.google.protobuf.StructR\x05extra"3\n\x12GetLengthsResponse\x12\x1d\n\nlengths_mm\x18\x01 \x03(\x01R\tlengthsMm"P\n\x0bStopRequest\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12-\n\x05extra\x18c \x01(\x0b2\x17.google.protobuf.StructR\x05extra"\x0e\n\x0cStopResponse"g\n\x06Status\x12!\n\x0cpositions_mm\x18\x01 \x03(\x01R\x0bpositionsMm\x12\x1d\n\nlengths_mm\x18\x02 \x03(\x01R\tlengthsMm\x12\x1b\n\tis_moving\x18\x03 \x01(\x08R\x08isMoving"%\n\x0fIsMovingRequest\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name"/\n\x10IsMovingResponse\x12\x1b\n\tis_moving\x18\x01 \x01(\x08R\x08isMoving2\xda\t\n\rGantryService\x12\xa1\x01\n\x0bGetPosition\x12,.viam.component.gantry.v1.GetPositionRequest\x1a-.viam.component.gantry.v1.GetPositionResponse"5\x82\xd3\xe4\x93\x02/\x12-/viam/api/v1/component/gantry/{name}/position\x12\xae\x01\n\x0eMoveToPosition\x12/.viam.component.gantry.v1.MoveToPositionRequest\x1a0.viam.component.gantry.v1.MoveToPositionResponse"9\xa0\x92)\x01\x82\xd3\xe4\x93\x02/\x1a-/viam/api/v1/component/gantry/{name}/position\x12\x88\x01\n\x04Home\x12%.viam.component.gantry.v1.HomeRequest\x1a&.viam.component.gantry.v1.HomeResponse"1\x82\xd3\xe4\x93\x02+\x1a)/viam/api/v1/component/gantry/{name}/home\x12\x9d\x01\n\nGetLengths\x12+.viam.component.gantry.v1.GetLengthsRequest\x1a,.viam.component.gantry.v1.GetLengthsResponse"4\x82\xd3\xe4\x93\x02.\x12,/viam/api/v1/component/gantry/{name}/lengths\x12\x88\x01\n\x04Stop\x12%.viam.component.gantry.v1.StopRequest\x1a&.viam.component.gantry.v1.StopResponse"1\x82\xd3\xe4\x93\x02+")/viam/api/v1/component/gantry/{name}/stop\x12\x99\x01\n\x08IsMoving\x12).viam.component.gantry.v1.IsMovingRequest\x1a*.viam.component.gantry.v1.IsMovingResponse"6\x82\xd3\xe4\x93\x020\x12./viam/api/v1/component/gantry/{name}/is_moving\x12\x89\x01\n\tDoCommand\x12 .viam.common.v1.DoCommandRequest\x1a!.viam.common.v1.DoCommandResponse"7\x82\xd3\xe4\x93\x021"//viam/api/v1/component/gantry/{name}/do_command\x12\x95\x01\n\rGetGeometries\x12$.viam.common.v1.GetGeometriesRequest\x1a%.viam.common.v1.GetGeometriesResponse"7\x82\xd3\xe4\x93\x021\x12//viam/api/v1/component/gantry/{name}/geometriesBC\n\x1ccom.viam.component.gantry.v1Z#go.viam.com/api/component/gantry/v1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n component/gantry/v1/gantry.proto\x12\x18viam.component.gantry.v1\x1a\x16common/v1/common.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x1cgoogle/protobuf/struct.proto"W\n\x12GetPositionRequest\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12-\n\x05extra\x18c \x01(\x0b2\x17.google.protobuf.StructR\x05extra"8\n\x13GetPositionResponse\x12!\n\x0cpositions_mm\x18\x01 \x03(\x01R\x0bpositionsMm"\xa8\x01\n\x15MoveToPositionRequest\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12!\n\x0cpositions_mm\x18\x02 \x03(\x01R\x0bpositionsMm\x12)\n\x11speeds_mm_per_sec\x18\x03 \x03(\x01R\x0espeedsMmPerSec\x12-\n\x05extra\x18c \x01(\x0b2\x17.google.protobuf.StructR\x05extra"\x18\n\x16MoveToPositionResponse"P\n\x0bHomeRequest\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12-\n\x05extra\x18c \x01(\x0b2\x17.google.protobuf.StructR\x05extra"$\n\x0cHomeResponse\x12\x14\n\x05homed\x18\x01 \x01(\x08R\x05homed"V\n\x11GetLengthsRequest\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12-\n\x05extra\x18c \x01(\x0b2\x17.google.protobuf.StructR\x05extra"3\n\x12GetLengthsResponse\x12\x1d\n\nlengths_mm\x18\x01 \x03(\x01R\tlengthsMm"P\n\x0bStopRequest\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12-\n\x05extra\x18c \x01(\x0b2\x17.google.protobuf.StructR\x05extra"\x0e\n\x0cStopResponse"g\n\x06Status\x12!\n\x0cpositions_mm\x18\x01 \x03(\x01R\x0bpositionsMm\x12\x1d\n\nlengths_mm\x18\x02 \x03(\x01R\tlengthsMm\x12\x1b\n\tis_moving\x18\x03 \x01(\x08R\x08isMoving"%\n\x0fIsMovingRequest\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name"/\n\x10IsMovingResponse\x12\x1b\n\tis_moving\x18\x01 \x01(\x08R\x08isMoving2\xf2\n\n\rGantryService\x12\xa1\x01\n\x0bGetPosition\x12,.viam.component.gantry.v1.GetPositionRequest\x1a-.viam.component.gantry.v1.GetPositionResponse"5\x82\xd3\xe4\x93\x02/\x12-/viam/api/v1/component/gantry/{name}/position\x12\xae\x01\n\x0eMoveToPosition\x12/.viam.component.gantry.v1.MoveToPositionRequest\x1a0.viam.component.gantry.v1.MoveToPositionResponse"9\xa0\x92)\x01\x82\xd3\xe4\x93\x02/\x1a-/viam/api/v1/component/gantry/{name}/position\x12\x88\x01\n\x04Home\x12%.viam.component.gantry.v1.HomeRequest\x1a&.viam.component.gantry.v1.HomeResponse"1\x82\xd3\xe4\x93\x02+\x1a)/viam/api/v1/component/gantry/{name}/home\x12\x9d\x01\n\nGetLengths\x12+.viam.component.gantry.v1.GetLengthsRequest\x1a,.viam.component.gantry.v1.GetLengthsResponse"4\x82\xd3\xe4\x93\x02.\x12,/viam/api/v1/component/gantry/{name}/lengths\x12\x88\x01\n\x04Stop\x12%.viam.component.gantry.v1.StopRequest\x1a&.viam.component.gantry.v1.StopResponse"1\x82\xd3\xe4\x93\x02+")/viam/api/v1/component/gantry/{name}/stop\x12\x99\x01\n\x08IsMoving\x12).viam.component.gantry.v1.IsMovingRequest\x1a*.viam.component.gantry.v1.IsMovingResponse"6\x82\xd3\xe4\x93\x020\x12./viam/api/v1/component/gantry/{name}/is_moving\x12\x89\x01\n\tDoCommand\x12 .viam.common.v1.DoCommandRequest\x1a!.viam.common.v1.DoCommandResponse"7\x82\xd3\xe4\x93\x021"//viam/api/v1/component/gantry/{name}/do_command\x12\x95\x01\n\rGetKinematics\x12$.viam.common.v1.GetKinematicsRequest\x1a%.viam.common.v1.GetKinematicsResponse"7\x82\xd3\xe4\x93\x021\x12//viam/api/v1/component/gantry/{name}/kinematics\x12\x95\x01\n\rGetGeometries\x12$.viam.common.v1.GetGeometriesRequest\x1a%.viam.common.v1.GetGeometriesResponse"7\x82\xd3\xe4\x93\x021\x12//viam/api/v1/component/gantry/{name}/geometriesBC\n\x1ccom.viam.component.gantry.v1Z#go.viam.com/api/component/gantry/v1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'component.gantry.v1.gantry_pb2', _globals) @@ -30,6 +30,8 @@ _globals['_GANTRYSERVICE'].methods_by_name['IsMoving']._serialized_options = b'\x82\xd3\xe4\x93\x020\x12./viam/api/v1/component/gantry/{name}/is_moving' _globals['_GANTRYSERVICE'].methods_by_name['DoCommand']._loaded_options = None _globals['_GANTRYSERVICE'].methods_by_name['DoCommand']._serialized_options = b'\x82\xd3\xe4\x93\x021"//viam/api/v1/component/gantry/{name}/do_command' + _globals['_GANTRYSERVICE'].methods_by_name['GetKinematics']._loaded_options = None + _globals['_GANTRYSERVICE'].methods_by_name['GetKinematics']._serialized_options = b'\x82\xd3\xe4\x93\x021\x12//viam/api/v1/component/gantry/{name}/kinematics' _globals['_GANTRYSERVICE'].methods_by_name['GetGeometries']._loaded_options = None _globals['_GANTRYSERVICE'].methods_by_name['GetGeometries']._serialized_options = b'\x82\xd3\xe4\x93\x021\x12//viam/api/v1/component/gantry/{name}/geometries' _globals['_GETPOSITIONREQUEST']._serialized_start = 146 @@ -59,4 +61,4 @@ _globals['_ISMOVINGRESPONSE']._serialized_start = 993 _globals['_ISMOVINGRESPONSE']._serialized_end = 1040 _globals['_GANTRYSERVICE']._serialized_start = 1043 - _globals['_GANTRYSERVICE']._serialized_end = 2285 \ No newline at end of file + _globals['_GANTRYSERVICE']._serialized_end = 2437 \ No newline at end of file diff --git a/src/viam/version_metadata.py b/src/viam/version_metadata.py index afa4283b6..753dfae33 100644 --- a/src/viam/version_metadata.py +++ b/src/viam/version_metadata.py @@ -1,4 +1,4 @@ __version__ = "0.60.0" -API_VERSION = "v0.1.491" +API_VERSION = "v0.1.493" SDK_VERSION = __version__ diff --git a/tests/mocks/components.py b/tests/mocks/components.py index 1fbae9b16..6a06d661b 100644 --- a/tests/mocks/components.py +++ b/tests/mocks/components.py @@ -556,6 +556,7 @@ def __init__(self, name: str, position: List[float], lengths: List[float]): self.position = position self.lengths = lengths self.is_stopped = True + self.kinematics = (KinematicsFileFormat.KINEMATICS_FILE_FORMAT_SVA, b"\x00\x01\x02") self.extra = None self.homed = True self.speeds = Optional[List[float]] @@ -602,6 +603,13 @@ async def stop(self, *, extra: Optional[Dict[str, Any]] = None, timeout: Optiona async def is_moving(self) -> bool: return not self.is_stopped + async def get_kinematics( + self, *, extra: Optional[Dict[str, Any]] = None, timeout: Optional[float] = None, **kwargs + ) -> Tuple[KinematicsFileFormat.ValueType, bytes]: + self.extra = extra + self.timeout = timeout + return self.kinematics + async def get_geometries(self, *, extra: Optional[Dict[str, Any]] = None, timeout: Optional[float] = None) -> List[Geometry]: self.extra = extra self.timeout = timeout diff --git a/tests/test_gantry.py b/tests/test_gantry.py index 249f28cd8..728f1926a 100644 --- a/tests/test_gantry.py +++ b/tests/test_gantry.py @@ -2,7 +2,14 @@ from viam.components.gantry import GantryClient from viam.components.gantry.service import GantryRPCService -from viam.proto.common import DoCommandRequest, DoCommandResponse, GetGeometriesRequest, GetGeometriesResponse +from viam.proto.common import ( + DoCommandRequest, + DoCommandResponse, + GetGeometriesRequest, + GetGeometriesResponse, + GetKinematicsRequest, + GetKinematicsResponse, +) from viam.proto.component.gantry import ( GantryServiceStub, GetLengthsRequest, @@ -64,6 +71,11 @@ async def test_extra(self): await self.gantry.move_to_position([1, 2, 3], [4, 5, 6], extra=extra) assert self.gantry.extra == extra + async def test_get_kinematics(self): + format, data = await self.gantry.get_kinematics() + assert format == self.gantry.kinematics[0] + assert data == self.gantry.kinematics[1] + async def test_timeout(self): assert self.gantry.timeout is None @@ -160,6 +172,15 @@ async def test_do(self): result = struct_to_dict(response.result) assert result == {"command": command} + async def test_get_kinematics(self): + async with ChannelFor([self.service]) as channel: + client = GantryServiceStub(channel) + request = GetKinematicsRequest(name=self.gantry.name) + response: GetKinematicsResponse = await client.GetKinematics(request, timeout=1.1) + assert response.format == self.gantry.kinematics[0] + assert response.kinematics_data == self.gantry.kinematics[1] + assert self.gantry.timeout == loose_approx(1.1) + async def test_get_geometries(self): async with ChannelFor([self.service]) as channel: client = GantryServiceStub(channel) @@ -234,6 +255,14 @@ async def test_extra(self): await client.move_to_position([1, 2, 3], [4, 5, 6], extra=extra) assert self.gantry.extra == extra + async def test_get_kinematics(self): + async with ChannelFor([self.service]) as channel: + client = GantryClient(self.gantry.name, channel) + format, data = await client.get_kinematics(timeout=1.1) + assert format == self.gantry.kinematics[0] + assert data == self.gantry.kinematics[1] + assert self.gantry.timeout == loose_approx(1.1) + async def test_get_geometries(self): async with ChannelFor([self.service]) as channel: client = GantryClient(self.gantry.name, channel)