luckyrobots 0.1.66__py3-none-any.whl → 0.1.72__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. luckyrobots/__init__.py +30 -12
  2. luckyrobots/client.py +997 -0
  3. luckyrobots/config/robots.yaml +231 -71
  4. luckyrobots/engine/__init__.py +23 -0
  5. luckyrobots/{utils → engine}/check_updates.py +108 -48
  6. luckyrobots/{utils → engine}/download.py +61 -39
  7. luckyrobots/engine/manager.py +427 -0
  8. luckyrobots/grpc/__init__.py +6 -0
  9. luckyrobots/grpc/generated/__init__.py +18 -0
  10. luckyrobots/grpc/generated/agent_pb2.py +69 -0
  11. luckyrobots/grpc/generated/agent_pb2_grpc.py +283 -0
  12. luckyrobots/grpc/generated/camera_pb2.py +47 -0
  13. luckyrobots/grpc/generated/camera_pb2_grpc.py +144 -0
  14. luckyrobots/grpc/generated/common_pb2.py +43 -0
  15. luckyrobots/grpc/generated/common_pb2_grpc.py +24 -0
  16. luckyrobots/grpc/generated/hazel_rpc_pb2.py +43 -0
  17. luckyrobots/grpc/generated/hazel_rpc_pb2_grpc.py +24 -0
  18. luckyrobots/grpc/generated/media_pb2.py +39 -0
  19. luckyrobots/grpc/generated/media_pb2_grpc.py +24 -0
  20. luckyrobots/grpc/generated/mujoco_pb2.py +51 -0
  21. luckyrobots/grpc/generated/mujoco_pb2_grpc.py +230 -0
  22. luckyrobots/grpc/generated/scene_pb2.py +66 -0
  23. luckyrobots/grpc/generated/scene_pb2_grpc.py +317 -0
  24. luckyrobots/grpc/generated/telemetry_pb2.py +47 -0
  25. luckyrobots/grpc/generated/telemetry_pb2_grpc.py +143 -0
  26. luckyrobots/grpc/generated/viewport_pb2.py +50 -0
  27. luckyrobots/grpc/generated/viewport_pb2_grpc.py +144 -0
  28. luckyrobots/grpc/proto/agent.proto +213 -0
  29. luckyrobots/grpc/proto/camera.proto +41 -0
  30. luckyrobots/grpc/proto/common.proto +36 -0
  31. luckyrobots/grpc/proto/hazel_rpc.proto +32 -0
  32. luckyrobots/grpc/proto/media.proto +26 -0
  33. luckyrobots/grpc/proto/mujoco.proto +64 -0
  34. luckyrobots/grpc/proto/scene.proto +104 -0
  35. luckyrobots/grpc/proto/telemetry.proto +43 -0
  36. luckyrobots/grpc/proto/viewport.proto +45 -0
  37. luckyrobots/luckyrobots.py +252 -0
  38. luckyrobots/models/__init__.py +15 -0
  39. luckyrobots/models/camera.py +97 -0
  40. luckyrobots/models/observation.py +135 -0
  41. luckyrobots/models/randomization.py +77 -0
  42. luckyrobots/{utils/helpers.py → utils.py} +75 -40
  43. luckyrobots-0.1.72.dist-info/METADATA +262 -0
  44. luckyrobots-0.1.72.dist-info/RECORD +47 -0
  45. {luckyrobots-0.1.66.dist-info → luckyrobots-0.1.72.dist-info}/WHEEL +1 -1
  46. luckyrobots/core/luckyrobots.py +0 -624
  47. luckyrobots/core/manager.py +0 -236
  48. luckyrobots/core/models.py +0 -68
  49. luckyrobots/core/node.py +0 -273
  50. luckyrobots/message/__init__.py +0 -18
  51. luckyrobots/message/pubsub.py +0 -145
  52. luckyrobots/message/srv/client.py +0 -81
  53. luckyrobots/message/srv/service.py +0 -135
  54. luckyrobots/message/srv/types.py +0 -83
  55. luckyrobots/message/transporter.py +0 -427
  56. luckyrobots/utils/event_loop.py +0 -94
  57. luckyrobots/utils/sim_manager.py +0 -406
  58. luckyrobots-0.1.66.dist-info/METADATA +0 -253
  59. luckyrobots-0.1.66.dist-info/RECORD +0 -24
  60. {luckyrobots-0.1.66.dist-info → luckyrobots-0.1.72.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,51 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # NO CHECKED-IN PROTOBUF GENCODE
4
+ # source: mujoco.proto
5
+ # Protobuf Python Version: 6.31.1
6
+ """Generated protocol buffer code."""
7
+ from google.protobuf import descriptor as _descriptor
8
+ from google.protobuf import descriptor_pool as _descriptor_pool
9
+ from google.protobuf import runtime_version as _runtime_version
10
+ from google.protobuf import symbol_database as _symbol_database
11
+ from google.protobuf.internal import builder as _builder
12
+ _runtime_version.ValidateProtobufRuntimeVersion(
13
+ _runtime_version.Domain.PUBLIC,
14
+ 6,
15
+ 31,
16
+ 1,
17
+ '',
18
+ 'mujoco.proto'
19
+ )
20
+ # @@protoc_insertion_point(imports)
21
+
22
+ _sym_db = _symbol_database.Default()
23
+
24
+
25
+
26
+
27
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0cmujoco.proto\x12\thazel.rpc\"K\n\nJointState\x12\x11\n\tpositions\x18\x01 \x03(\x02\x12\x12\n\nvelocities\x18\x02 \x03(\x02\x12\n\n\x02nq\x18\x03 \x01(\r\x12\n\n\x02nv\x18\x04 \x01(\r\"*\n\x14GetJointStateRequest\x12\x12\n\nrobot_name\x18\x01 \x01(\t\"_\n\x15GetJointStateResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\x12\x0f\n\x07message\x18\x02 \x01(\t\x12$\n\x05state\x18\x03 \x01(\x0b\x32\x15.hazel.rpc.JointState\":\n\x12SendControlRequest\x12\x12\n\nrobot_name\x18\x01 \x01(\t\x12\x10\n\x08\x63ontrols\x18\x02 \x03(\x02\"7\n\x13SendControlResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\x12\x0f\n\x07message\x18\x02 \x01(\t\"*\n\x14GetMujocoInfoRequest\x12\x12\n\nrobot_name\x18\x01 \x01(\t\"\x8a\x01\n\x15GetMujocoInfoResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\x12\x0f\n\x07message\x18\x02 \x01(\t\x12\n\n\x02nq\x18\x03 \x01(\r\x12\n\n\x02nv\x18\x04 \x01(\r\x12\n\n\x02nu\x18\x05 \x01(\r\x12\x13\n\x0bjoint_names\x18\x06 \x03(\t\x12\x16\n\x0e\x61\x63tuator_names\x18\x07 \x03(\t2\xde\x02\n\rMujocoService\x12R\n\rGetJointState\x12\x1f.hazel.rpc.GetJointStateRequest\x1a .hazel.rpc.GetJointStateResponse\x12L\n\x0bSendControl\x12\x1d.hazel.rpc.SendControlRequest\x1a\x1e.hazel.rpc.SendControlResponse\x12R\n\rGetMujocoInfo\x12\x1f.hazel.rpc.GetMujocoInfoRequest\x1a .hazel.rpc.GetMujocoInfoResponse\x12W\n\x10StreamJointState\x12\x1f.hazel.rpc.GetJointStateRequest\x1a .hazel.rpc.GetJointStateResponse0\x01\x42\x03\xf8\x01\x01\x62\x06proto3')
28
+
29
+ _globals = globals()
30
+ _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
31
+ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'mujoco_pb2', _globals)
32
+ if not _descriptor._USE_C_DESCRIPTORS:
33
+ _globals['DESCRIPTOR']._loaded_options = None
34
+ _globals['DESCRIPTOR']._serialized_options = b'\370\001\001'
35
+ _globals['_JOINTSTATE']._serialized_start=27
36
+ _globals['_JOINTSTATE']._serialized_end=102
37
+ _globals['_GETJOINTSTATEREQUEST']._serialized_start=104
38
+ _globals['_GETJOINTSTATEREQUEST']._serialized_end=146
39
+ _globals['_GETJOINTSTATERESPONSE']._serialized_start=148
40
+ _globals['_GETJOINTSTATERESPONSE']._serialized_end=243
41
+ _globals['_SENDCONTROLREQUEST']._serialized_start=245
42
+ _globals['_SENDCONTROLREQUEST']._serialized_end=303
43
+ _globals['_SENDCONTROLRESPONSE']._serialized_start=305
44
+ _globals['_SENDCONTROLRESPONSE']._serialized_end=360
45
+ _globals['_GETMUJOCOINFOREQUEST']._serialized_start=362
46
+ _globals['_GETMUJOCOINFOREQUEST']._serialized_end=404
47
+ _globals['_GETMUJOCOINFORESPONSE']._serialized_start=407
48
+ _globals['_GETMUJOCOINFORESPONSE']._serialized_end=545
49
+ _globals['_MUJOCOSERVICE']._serialized_start=548
50
+ _globals['_MUJOCOSERVICE']._serialized_end=898
51
+ # @@protoc_insertion_point(module_scope)
@@ -0,0 +1,230 @@
1
+ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
2
+ """Client and server classes corresponding to protobuf-defined services."""
3
+ import grpc
4
+ import warnings
5
+
6
+ from . import mujoco_pb2 as mujoco__pb2
7
+
8
+ GRPC_GENERATED_VERSION = '1.76.0'
9
+ GRPC_VERSION = grpc.__version__
10
+ _version_not_supported = False
11
+
12
+ try:
13
+ from grpc._utilities import first_version_is_lower
14
+ _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
15
+ except ImportError:
16
+ _version_not_supported = True
17
+
18
+ if _version_not_supported:
19
+ raise RuntimeError(
20
+ f'The grpc package installed is at version {GRPC_VERSION},'
21
+ + ' but the generated code in mujoco_pb2_grpc.py depends on'
22
+ + f' grpcio>={GRPC_GENERATED_VERSION}.'
23
+ + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
24
+ + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
25
+ )
26
+
27
+
28
+ class MujocoServiceStub(object):
29
+ """MuJoCo state + control IO.
30
+ """
31
+
32
+ def __init__(self, channel):
33
+ """Constructor.
34
+
35
+ Args:
36
+ channel: A grpc.Channel.
37
+ """
38
+ self.GetJointState = channel.unary_unary(
39
+ '/hazel.rpc.MujocoService/GetJointState',
40
+ request_serializer=mujoco__pb2.GetJointStateRequest.SerializeToString,
41
+ response_deserializer=mujoco__pb2.GetJointStateResponse.FromString,
42
+ _registered_method=True)
43
+ self.SendControl = channel.unary_unary(
44
+ '/hazel.rpc.MujocoService/SendControl',
45
+ request_serializer=mujoco__pb2.SendControlRequest.SerializeToString,
46
+ response_deserializer=mujoco__pb2.SendControlResponse.FromString,
47
+ _registered_method=True)
48
+ self.GetMujocoInfo = channel.unary_unary(
49
+ '/hazel.rpc.MujocoService/GetMujocoInfo',
50
+ request_serializer=mujoco__pb2.GetMujocoInfoRequest.SerializeToString,
51
+ response_deserializer=mujoco__pb2.GetMujocoInfoResponse.FromString,
52
+ _registered_method=True)
53
+ self.StreamJointState = channel.unary_stream(
54
+ '/hazel.rpc.MujocoService/StreamJointState',
55
+ request_serializer=mujoco__pb2.GetJointStateRequest.SerializeToString,
56
+ response_deserializer=mujoco__pb2.GetJointStateResponse.FromString,
57
+ _registered_method=True)
58
+
59
+
60
+ class MujocoServiceServicer(object):
61
+ """MuJoCo state + control IO.
62
+ """
63
+
64
+ def GetJointState(self, request, context):
65
+ """Missing associated documentation comment in .proto file."""
66
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
67
+ context.set_details('Method not implemented!')
68
+ raise NotImplementedError('Method not implemented!')
69
+
70
+ def SendControl(self, request, context):
71
+ """Missing associated documentation comment in .proto file."""
72
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
73
+ context.set_details('Method not implemented!')
74
+ raise NotImplementedError('Method not implemented!')
75
+
76
+ def GetMujocoInfo(self, request, context):
77
+ """Missing associated documentation comment in .proto file."""
78
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
79
+ context.set_details('Method not implemented!')
80
+ raise NotImplementedError('Method not implemented!')
81
+
82
+ def StreamJointState(self, request, context):
83
+ """Streaming variant for continuous state observation
84
+ """
85
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
86
+ context.set_details('Method not implemented!')
87
+ raise NotImplementedError('Method not implemented!')
88
+
89
+
90
+ def add_MujocoServiceServicer_to_server(servicer, server):
91
+ rpc_method_handlers = {
92
+ 'GetJointState': grpc.unary_unary_rpc_method_handler(
93
+ servicer.GetJointState,
94
+ request_deserializer=mujoco__pb2.GetJointStateRequest.FromString,
95
+ response_serializer=mujoco__pb2.GetJointStateResponse.SerializeToString,
96
+ ),
97
+ 'SendControl': grpc.unary_unary_rpc_method_handler(
98
+ servicer.SendControl,
99
+ request_deserializer=mujoco__pb2.SendControlRequest.FromString,
100
+ response_serializer=mujoco__pb2.SendControlResponse.SerializeToString,
101
+ ),
102
+ 'GetMujocoInfo': grpc.unary_unary_rpc_method_handler(
103
+ servicer.GetMujocoInfo,
104
+ request_deserializer=mujoco__pb2.GetMujocoInfoRequest.FromString,
105
+ response_serializer=mujoco__pb2.GetMujocoInfoResponse.SerializeToString,
106
+ ),
107
+ 'StreamJointState': grpc.unary_stream_rpc_method_handler(
108
+ servicer.StreamJointState,
109
+ request_deserializer=mujoco__pb2.GetJointStateRequest.FromString,
110
+ response_serializer=mujoco__pb2.GetJointStateResponse.SerializeToString,
111
+ ),
112
+ }
113
+ generic_handler = grpc.method_handlers_generic_handler(
114
+ 'hazel.rpc.MujocoService', rpc_method_handlers)
115
+ server.add_generic_rpc_handlers((generic_handler,))
116
+ server.add_registered_method_handlers('hazel.rpc.MujocoService', rpc_method_handlers)
117
+
118
+
119
+ # This class is part of an EXPERIMENTAL API.
120
+ class MujocoService(object):
121
+ """MuJoCo state + control IO.
122
+ """
123
+
124
+ @staticmethod
125
+ def GetJointState(request,
126
+ target,
127
+ options=(),
128
+ channel_credentials=None,
129
+ call_credentials=None,
130
+ insecure=False,
131
+ compression=None,
132
+ wait_for_ready=None,
133
+ timeout=None,
134
+ metadata=None):
135
+ return grpc.experimental.unary_unary(
136
+ request,
137
+ target,
138
+ '/hazel.rpc.MujocoService/GetJointState',
139
+ mujoco__pb2.GetJointStateRequest.SerializeToString,
140
+ mujoco__pb2.GetJointStateResponse.FromString,
141
+ options,
142
+ channel_credentials,
143
+ insecure,
144
+ call_credentials,
145
+ compression,
146
+ wait_for_ready,
147
+ timeout,
148
+ metadata,
149
+ _registered_method=True)
150
+
151
+ @staticmethod
152
+ def SendControl(request,
153
+ target,
154
+ options=(),
155
+ channel_credentials=None,
156
+ call_credentials=None,
157
+ insecure=False,
158
+ compression=None,
159
+ wait_for_ready=None,
160
+ timeout=None,
161
+ metadata=None):
162
+ return grpc.experimental.unary_unary(
163
+ request,
164
+ target,
165
+ '/hazel.rpc.MujocoService/SendControl',
166
+ mujoco__pb2.SendControlRequest.SerializeToString,
167
+ mujoco__pb2.SendControlResponse.FromString,
168
+ options,
169
+ channel_credentials,
170
+ insecure,
171
+ call_credentials,
172
+ compression,
173
+ wait_for_ready,
174
+ timeout,
175
+ metadata,
176
+ _registered_method=True)
177
+
178
+ @staticmethod
179
+ def GetMujocoInfo(request,
180
+ target,
181
+ options=(),
182
+ channel_credentials=None,
183
+ call_credentials=None,
184
+ insecure=False,
185
+ compression=None,
186
+ wait_for_ready=None,
187
+ timeout=None,
188
+ metadata=None):
189
+ return grpc.experimental.unary_unary(
190
+ request,
191
+ target,
192
+ '/hazel.rpc.MujocoService/GetMujocoInfo',
193
+ mujoco__pb2.GetMujocoInfoRequest.SerializeToString,
194
+ mujoco__pb2.GetMujocoInfoResponse.FromString,
195
+ options,
196
+ channel_credentials,
197
+ insecure,
198
+ call_credentials,
199
+ compression,
200
+ wait_for_ready,
201
+ timeout,
202
+ metadata,
203
+ _registered_method=True)
204
+
205
+ @staticmethod
206
+ def StreamJointState(request,
207
+ target,
208
+ options=(),
209
+ channel_credentials=None,
210
+ call_credentials=None,
211
+ insecure=False,
212
+ compression=None,
213
+ wait_for_ready=None,
214
+ timeout=None,
215
+ metadata=None):
216
+ return grpc.experimental.unary_stream(
217
+ request,
218
+ target,
219
+ '/hazel.rpc.MujocoService/StreamJointState',
220
+ mujoco__pb2.GetJointStateRequest.SerializeToString,
221
+ mujoco__pb2.GetJointStateResponse.FromString,
222
+ options,
223
+ channel_credentials,
224
+ insecure,
225
+ call_credentials,
226
+ compression,
227
+ wait_for_ready,
228
+ timeout,
229
+ metadata,
230
+ _registered_method=True)
@@ -0,0 +1,66 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # NO CHECKED-IN PROTOBUF GENCODE
4
+ # source: scene.proto
5
+ # Protobuf Python Version: 6.31.1
6
+ """Generated protocol buffer code."""
7
+ from google.protobuf import descriptor as _descriptor
8
+ from google.protobuf import descriptor_pool as _descriptor_pool
9
+ from google.protobuf import runtime_version as _runtime_version
10
+ from google.protobuf import symbol_database as _symbol_database
11
+ from google.protobuf.internal import builder as _builder
12
+ _runtime_version.ValidateProtobufRuntimeVersion(
13
+ _runtime_version.Domain.PUBLIC,
14
+ 6,
15
+ 31,
16
+ 1,
17
+ '',
18
+ 'scene.proto'
19
+ )
20
+ # @@protoc_insertion_point(imports)
21
+
22
+ _sym_db = _symbol_database.Default()
23
+
24
+
25
+ from . import common_pb2 as common__pb2
26
+
27
+
28
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0bscene.proto\x12\thazel.rpc\x1a\x0c\x63ommon.proto\"x\n\nEntityInfo\x12\x1f\n\x02id\x18\x01 \x01(\x0b\x32\x13.hazel.rpc.EntityId\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\'\n\ttransform\x18\x03 \x01(\x0b\x32\x14.hazel.rpc.Transform\x12\x12\n\ncomponents\x18\x04 \x03(\t\"\x15\n\x13GetSceneInfoRequest\"T\n\x14GetSceneInfoResponse\x12\x12\n\nscene_name\x18\x01 \x01(\t\x12\x12\n\nscene_path\x18\x02 \x01(\t\x12\x14\n\x0c\x65ntity_count\x18\x03 \x01(\r\"M\n\x13ListEntitiesRequest\x12\x1a\n\x12include_transforms\x18\x01 \x01(\x08\x12\x1a\n\x12include_components\x18\x02 \x01(\x08\"?\n\x14ListEntitiesResponse\x12\'\n\x08\x65ntities\x18\x01 \x03(\x0b\x32\x15.hazel.rpc.EntityInfo\"S\n\x10GetEntityRequest\x12!\n\x02id\x18\x01 \x01(\x0b\x32\x13.hazel.rpc.EntityIdH\x00\x12\x0e\n\x04name\x18\x02 \x01(\tH\x00\x42\x0c\n\nidentifier\"I\n\x11GetEntityResponse\x12\r\n\x05\x66ound\x18\x01 \x01(\x08\x12%\n\x06\x65ntity\x18\x02 \x01(\x0b\x32\x15.hazel.rpc.EntityInfo\"e\n\x19SetEntityTransformRequest\x12\x1f\n\x02id\x18\x01 \x01(\x0b\x32\x13.hazel.rpc.EntityId\x12\'\n\ttransform\x18\x02 \x01(\x0b\x32\x14.hazel.rpc.Transform\">\n\x1aSetEntityTransformResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\x12\x0f\n\x07message\x18\x02 \x01(\t\"C\n\x18SetSimulationModeRequest\x12\'\n\x04mode\x18\x01 \x01(\x0e\x32\x19.hazel.rpc.SimulationMode\"n\n\x19SetSimulationModeResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\x12\x0f\n\x07message\x18\x02 \x01(\t\x12/\n\x0c\x63urrent_mode\x18\x03 \x01(\x0e\x32\x19.hazel.rpc.SimulationMode\"\x1a\n\x18GetSimulationModeRequest\"D\n\x19GetSimulationModeResponse\x12\'\n\x04mode\x18\x01 \x01(\x0e\x32\x19.hazel.rpc.SimulationMode*k\n\x0eSimulationMode\x12\x1c\n\x18SIMULATION_MODE_REALTIME\x10\x00\x12!\n\x1dSIMULATION_MODE_DETERMINISTIC\x10\x01\x12\x18\n\x14SIMULATION_MODE_FAST\x10\x02\x32\x9b\x04\n\x0cSceneService\x12O\n\x0cGetSceneInfo\x12\x1e.hazel.rpc.GetSceneInfoRequest\x1a\x1f.hazel.rpc.GetSceneInfoResponse\x12O\n\x0cListEntities\x12\x1e.hazel.rpc.ListEntitiesRequest\x1a\x1f.hazel.rpc.ListEntitiesResponse\x12\x46\n\tGetEntity\x12\x1b.hazel.rpc.GetEntityRequest\x1a\x1c.hazel.rpc.GetEntityResponse\x12\x61\n\x12SetEntityTransform\x12$.hazel.rpc.SetEntityTransformRequest\x1a%.hazel.rpc.SetEntityTransformResponse\x12^\n\x11SetSimulationMode\x12#.hazel.rpc.SetSimulationModeRequest\x1a$.hazel.rpc.SetSimulationModeResponse\x12^\n\x11GetSimulationMode\x12#.hazel.rpc.GetSimulationModeRequest\x1a$.hazel.rpc.GetSimulationModeResponseB\x03\xf8\x01\x01\x62\x06proto3')
29
+
30
+ _globals = globals()
31
+ _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
32
+ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'scene_pb2', _globals)
33
+ if not _descriptor._USE_C_DESCRIPTORS:
34
+ _globals['DESCRIPTOR']._loaded_options = None
35
+ _globals['DESCRIPTOR']._serialized_options = b'\370\001\001'
36
+ _globals['_SIMULATIONMODE']._serialized_start=1021
37
+ _globals['_SIMULATIONMODE']._serialized_end=1128
38
+ _globals['_ENTITYINFO']._serialized_start=40
39
+ _globals['_ENTITYINFO']._serialized_end=160
40
+ _globals['_GETSCENEINFOREQUEST']._serialized_start=162
41
+ _globals['_GETSCENEINFOREQUEST']._serialized_end=183
42
+ _globals['_GETSCENEINFORESPONSE']._serialized_start=185
43
+ _globals['_GETSCENEINFORESPONSE']._serialized_end=269
44
+ _globals['_LISTENTITIESREQUEST']._serialized_start=271
45
+ _globals['_LISTENTITIESREQUEST']._serialized_end=348
46
+ _globals['_LISTENTITIESRESPONSE']._serialized_start=350
47
+ _globals['_LISTENTITIESRESPONSE']._serialized_end=413
48
+ _globals['_GETENTITYREQUEST']._serialized_start=415
49
+ _globals['_GETENTITYREQUEST']._serialized_end=498
50
+ _globals['_GETENTITYRESPONSE']._serialized_start=500
51
+ _globals['_GETENTITYRESPONSE']._serialized_end=573
52
+ _globals['_SETENTITYTRANSFORMREQUEST']._serialized_start=575
53
+ _globals['_SETENTITYTRANSFORMREQUEST']._serialized_end=676
54
+ _globals['_SETENTITYTRANSFORMRESPONSE']._serialized_start=678
55
+ _globals['_SETENTITYTRANSFORMRESPONSE']._serialized_end=740
56
+ _globals['_SETSIMULATIONMODEREQUEST']._serialized_start=742
57
+ _globals['_SETSIMULATIONMODEREQUEST']._serialized_end=809
58
+ _globals['_SETSIMULATIONMODERESPONSE']._serialized_start=811
59
+ _globals['_SETSIMULATIONMODERESPONSE']._serialized_end=921
60
+ _globals['_GETSIMULATIONMODEREQUEST']._serialized_start=923
61
+ _globals['_GETSIMULATIONMODEREQUEST']._serialized_end=949
62
+ _globals['_GETSIMULATIONMODERESPONSE']._serialized_start=951
63
+ _globals['_GETSIMULATIONMODERESPONSE']._serialized_end=1019
64
+ _globals['_SCENESERVICE']._serialized_start=1131
65
+ _globals['_SCENESERVICE']._serialized_end=1670
66
+ # @@protoc_insertion_point(module_scope)
@@ -0,0 +1,317 @@
1
+ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
2
+ """Client and server classes corresponding to protobuf-defined services."""
3
+ import grpc
4
+ import warnings
5
+
6
+ from . import scene_pb2 as scene__pb2
7
+
8
+ GRPC_GENERATED_VERSION = '1.76.0'
9
+ GRPC_VERSION = grpc.__version__
10
+ _version_not_supported = False
11
+
12
+ try:
13
+ from grpc._utilities import first_version_is_lower
14
+ _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
15
+ except ImportError:
16
+ _version_not_supported = True
17
+
18
+ if _version_not_supported:
19
+ raise RuntimeError(
20
+ f'The grpc package installed is at version {GRPC_VERSION},'
21
+ + ' but the generated code in scene_pb2_grpc.py depends on'
22
+ + f' grpcio>={GRPC_GENERATED_VERSION}.'
23
+ + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
24
+ + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
25
+ )
26
+
27
+
28
+ class SceneServiceStub(object):
29
+ """Scene inspection + basic editing.
30
+ """
31
+
32
+ def __init__(self, channel):
33
+ """Constructor.
34
+
35
+ Args:
36
+ channel: A grpc.Channel.
37
+ """
38
+ self.GetSceneInfo = channel.unary_unary(
39
+ '/hazel.rpc.SceneService/GetSceneInfo',
40
+ request_serializer=scene__pb2.GetSceneInfoRequest.SerializeToString,
41
+ response_deserializer=scene__pb2.GetSceneInfoResponse.FromString,
42
+ _registered_method=True)
43
+ self.ListEntities = channel.unary_unary(
44
+ '/hazel.rpc.SceneService/ListEntities',
45
+ request_serializer=scene__pb2.ListEntitiesRequest.SerializeToString,
46
+ response_deserializer=scene__pb2.ListEntitiesResponse.FromString,
47
+ _registered_method=True)
48
+ self.GetEntity = channel.unary_unary(
49
+ '/hazel.rpc.SceneService/GetEntity',
50
+ request_serializer=scene__pb2.GetEntityRequest.SerializeToString,
51
+ response_deserializer=scene__pb2.GetEntityResponse.FromString,
52
+ _registered_method=True)
53
+ self.SetEntityTransform = channel.unary_unary(
54
+ '/hazel.rpc.SceneService/SetEntityTransform',
55
+ request_serializer=scene__pb2.SetEntityTransformRequest.SerializeToString,
56
+ response_deserializer=scene__pb2.SetEntityTransformResponse.FromString,
57
+ _registered_method=True)
58
+ self.SetSimulationMode = channel.unary_unary(
59
+ '/hazel.rpc.SceneService/SetSimulationMode',
60
+ request_serializer=scene__pb2.SetSimulationModeRequest.SerializeToString,
61
+ response_deserializer=scene__pb2.SetSimulationModeResponse.FromString,
62
+ _registered_method=True)
63
+ self.GetSimulationMode = channel.unary_unary(
64
+ '/hazel.rpc.SceneService/GetSimulationMode',
65
+ request_serializer=scene__pb2.GetSimulationModeRequest.SerializeToString,
66
+ response_deserializer=scene__pb2.GetSimulationModeResponse.FromString,
67
+ _registered_method=True)
68
+
69
+
70
+ class SceneServiceServicer(object):
71
+ """Scene inspection + basic editing.
72
+ """
73
+
74
+ def GetSceneInfo(self, request, context):
75
+ """Missing associated documentation comment in .proto file."""
76
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
77
+ context.set_details('Method not implemented!')
78
+ raise NotImplementedError('Method not implemented!')
79
+
80
+ def ListEntities(self, request, context):
81
+ """Missing associated documentation comment in .proto file."""
82
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
83
+ context.set_details('Method not implemented!')
84
+ raise NotImplementedError('Method not implemented!')
85
+
86
+ def GetEntity(self, request, context):
87
+ """Missing associated documentation comment in .proto file."""
88
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
89
+ context.set_details('Method not implemented!')
90
+ raise NotImplementedError('Method not implemented!')
91
+
92
+ def SetEntityTransform(self, request, context):
93
+ """Missing associated documentation comment in .proto file."""
94
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
95
+ context.set_details('Method not implemented!')
96
+ raise NotImplementedError('Method not implemented!')
97
+
98
+ def SetSimulationMode(self, request, context):
99
+ """Set simulation timing mode (realtime, deterministic, or fast).
100
+ """
101
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
102
+ context.set_details('Method not implemented!')
103
+ raise NotImplementedError('Method not implemented!')
104
+
105
+ def GetSimulationMode(self, request, context):
106
+ """Get current simulation timing mode.
107
+ """
108
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
109
+ context.set_details('Method not implemented!')
110
+ raise NotImplementedError('Method not implemented!')
111
+
112
+
113
+ def add_SceneServiceServicer_to_server(servicer, server):
114
+ rpc_method_handlers = {
115
+ 'GetSceneInfo': grpc.unary_unary_rpc_method_handler(
116
+ servicer.GetSceneInfo,
117
+ request_deserializer=scene__pb2.GetSceneInfoRequest.FromString,
118
+ response_serializer=scene__pb2.GetSceneInfoResponse.SerializeToString,
119
+ ),
120
+ 'ListEntities': grpc.unary_unary_rpc_method_handler(
121
+ servicer.ListEntities,
122
+ request_deserializer=scene__pb2.ListEntitiesRequest.FromString,
123
+ response_serializer=scene__pb2.ListEntitiesResponse.SerializeToString,
124
+ ),
125
+ 'GetEntity': grpc.unary_unary_rpc_method_handler(
126
+ servicer.GetEntity,
127
+ request_deserializer=scene__pb2.GetEntityRequest.FromString,
128
+ response_serializer=scene__pb2.GetEntityResponse.SerializeToString,
129
+ ),
130
+ 'SetEntityTransform': grpc.unary_unary_rpc_method_handler(
131
+ servicer.SetEntityTransform,
132
+ request_deserializer=scene__pb2.SetEntityTransformRequest.FromString,
133
+ response_serializer=scene__pb2.SetEntityTransformResponse.SerializeToString,
134
+ ),
135
+ 'SetSimulationMode': grpc.unary_unary_rpc_method_handler(
136
+ servicer.SetSimulationMode,
137
+ request_deserializer=scene__pb2.SetSimulationModeRequest.FromString,
138
+ response_serializer=scene__pb2.SetSimulationModeResponse.SerializeToString,
139
+ ),
140
+ 'GetSimulationMode': grpc.unary_unary_rpc_method_handler(
141
+ servicer.GetSimulationMode,
142
+ request_deserializer=scene__pb2.GetSimulationModeRequest.FromString,
143
+ response_serializer=scene__pb2.GetSimulationModeResponse.SerializeToString,
144
+ ),
145
+ }
146
+ generic_handler = grpc.method_handlers_generic_handler(
147
+ 'hazel.rpc.SceneService', rpc_method_handlers)
148
+ server.add_generic_rpc_handlers((generic_handler,))
149
+ server.add_registered_method_handlers('hazel.rpc.SceneService', rpc_method_handlers)
150
+
151
+
152
+ # This class is part of an EXPERIMENTAL API.
153
+ class SceneService(object):
154
+ """Scene inspection + basic editing.
155
+ """
156
+
157
+ @staticmethod
158
+ def GetSceneInfo(request,
159
+ target,
160
+ options=(),
161
+ channel_credentials=None,
162
+ call_credentials=None,
163
+ insecure=False,
164
+ compression=None,
165
+ wait_for_ready=None,
166
+ timeout=None,
167
+ metadata=None):
168
+ return grpc.experimental.unary_unary(
169
+ request,
170
+ target,
171
+ '/hazel.rpc.SceneService/GetSceneInfo',
172
+ scene__pb2.GetSceneInfoRequest.SerializeToString,
173
+ scene__pb2.GetSceneInfoResponse.FromString,
174
+ options,
175
+ channel_credentials,
176
+ insecure,
177
+ call_credentials,
178
+ compression,
179
+ wait_for_ready,
180
+ timeout,
181
+ metadata,
182
+ _registered_method=True)
183
+
184
+ @staticmethod
185
+ def ListEntities(request,
186
+ target,
187
+ options=(),
188
+ channel_credentials=None,
189
+ call_credentials=None,
190
+ insecure=False,
191
+ compression=None,
192
+ wait_for_ready=None,
193
+ timeout=None,
194
+ metadata=None):
195
+ return grpc.experimental.unary_unary(
196
+ request,
197
+ target,
198
+ '/hazel.rpc.SceneService/ListEntities',
199
+ scene__pb2.ListEntitiesRequest.SerializeToString,
200
+ scene__pb2.ListEntitiesResponse.FromString,
201
+ options,
202
+ channel_credentials,
203
+ insecure,
204
+ call_credentials,
205
+ compression,
206
+ wait_for_ready,
207
+ timeout,
208
+ metadata,
209
+ _registered_method=True)
210
+
211
+ @staticmethod
212
+ def GetEntity(request,
213
+ target,
214
+ options=(),
215
+ channel_credentials=None,
216
+ call_credentials=None,
217
+ insecure=False,
218
+ compression=None,
219
+ wait_for_ready=None,
220
+ timeout=None,
221
+ metadata=None):
222
+ return grpc.experimental.unary_unary(
223
+ request,
224
+ target,
225
+ '/hazel.rpc.SceneService/GetEntity',
226
+ scene__pb2.GetEntityRequest.SerializeToString,
227
+ scene__pb2.GetEntityResponse.FromString,
228
+ options,
229
+ channel_credentials,
230
+ insecure,
231
+ call_credentials,
232
+ compression,
233
+ wait_for_ready,
234
+ timeout,
235
+ metadata,
236
+ _registered_method=True)
237
+
238
+ @staticmethod
239
+ def SetEntityTransform(request,
240
+ target,
241
+ options=(),
242
+ channel_credentials=None,
243
+ call_credentials=None,
244
+ insecure=False,
245
+ compression=None,
246
+ wait_for_ready=None,
247
+ timeout=None,
248
+ metadata=None):
249
+ return grpc.experimental.unary_unary(
250
+ request,
251
+ target,
252
+ '/hazel.rpc.SceneService/SetEntityTransform',
253
+ scene__pb2.SetEntityTransformRequest.SerializeToString,
254
+ scene__pb2.SetEntityTransformResponse.FromString,
255
+ options,
256
+ channel_credentials,
257
+ insecure,
258
+ call_credentials,
259
+ compression,
260
+ wait_for_ready,
261
+ timeout,
262
+ metadata,
263
+ _registered_method=True)
264
+
265
+ @staticmethod
266
+ def SetSimulationMode(request,
267
+ target,
268
+ options=(),
269
+ channel_credentials=None,
270
+ call_credentials=None,
271
+ insecure=False,
272
+ compression=None,
273
+ wait_for_ready=None,
274
+ timeout=None,
275
+ metadata=None):
276
+ return grpc.experimental.unary_unary(
277
+ request,
278
+ target,
279
+ '/hazel.rpc.SceneService/SetSimulationMode',
280
+ scene__pb2.SetSimulationModeRequest.SerializeToString,
281
+ scene__pb2.SetSimulationModeResponse.FromString,
282
+ options,
283
+ channel_credentials,
284
+ insecure,
285
+ call_credentials,
286
+ compression,
287
+ wait_for_ready,
288
+ timeout,
289
+ metadata,
290
+ _registered_method=True)
291
+
292
+ @staticmethod
293
+ def GetSimulationMode(request,
294
+ target,
295
+ options=(),
296
+ channel_credentials=None,
297
+ call_credentials=None,
298
+ insecure=False,
299
+ compression=None,
300
+ wait_for_ready=None,
301
+ timeout=None,
302
+ metadata=None):
303
+ return grpc.experimental.unary_unary(
304
+ request,
305
+ target,
306
+ '/hazel.rpc.SceneService/GetSimulationMode',
307
+ scene__pb2.GetSimulationModeRequest.SerializeToString,
308
+ scene__pb2.GetSimulationModeResponse.FromString,
309
+ options,
310
+ channel_credentials,
311
+ insecure,
312
+ call_credentials,
313
+ compression,
314
+ wait_for_ready,
315
+ timeout,
316
+ metadata,
317
+ _registered_method=True)