Skip to content
This repository was archived by the owner on Oct 4, 2023. It is now read-only.

Commit 4519fdc

Browse files
Pyreach sync 20220203
1 parent 4514d3a commit 4519fdc

File tree

16 files changed

+520
-292
lines changed

16 files changed

+520
-292
lines changed

pyreach/common/proto_gen/logs_pb2.py

Lines changed: 195 additions & 185 deletions
Large diffs are not rendered by default.

pyreach/common/proto_gen/logs_pb2.pyi

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1323,7 +1323,7 @@ global___SyncArgs = SyncArgs
13231323
class DeviceData(google.protobuf.message.Message):
13241324
"""DeviceData represents sensor data on the robot and in the Reach
13251325
environment.
1326-
Next ID: 80
1326+
Next ID: 81
13271327
"""
13281328
DESCRIPTOR: google.protobuf.descriptor.Descriptor = ...
13291329
DEVICE_TYPE_FIELD_NUMBER: builtins.int
@@ -1678,7 +1678,7 @@ class DeviceData(google.protobuf.message.Message):
16781678
@property
16791679
def sim_instance_segmentation(self) -> global___SimInstanceSegmentation: ...
16801680
@property
1681-
def exposure_complete(self) -> global___EmptyMessage:
1681+
def exposure_complete(self) -> global___Status:
16821682
"""exposure_complete occurs when a camera reports a completed exposure.
16831683
16841684
Design doc: http://doc/1CAGGX3Bveexks7KWepBdeTX5Z14U7nL-JHxBeVCszD4
@@ -1835,7 +1835,7 @@ class DeviceData(google.protobuf.message.Message):
18351835
device_status : typing.Optional[global___Status] = ...,
18361836
webrtc_audio_request : typing.Optional[global___WebrtcAudioRequest] = ...,
18371837
sim_instance_segmentation : typing.Optional[global___SimInstanceSegmentation] = ...,
1838-
exposure_complete : typing.Optional[global___EmptyMessage] = ...,
1838+
exposure_complete : typing.Optional[global___Status] = ...,
18391839
start_shutdown : typing.Optional[global___EmptyMessage] = ...,
18401840
finish_shutdown : typing.Optional[global___EmptyMessage] = ...,
18411841
hangup : typing.Optional[global___EmptyMessage] = ...,
@@ -2720,6 +2720,7 @@ class Prediction(google.protobuf.message.Message):
27202720
DEPTH_TS_FIELD_NUMBER: builtins.int
27212721
ERROR_FIELD_NUMBER: builtins.int
27222722
COLOR_DATA_FIELD_NUMBER: builtins.int
2723+
KEY_VALUE_FIELD_NUMBER: builtins.int
27232724
color: typing.Text = ...
27242725
"""A reference to data for a heat map or other visualization of a prediction.
27252726
In the JSON world, this is a path to the image file in the GCS bucket.
@@ -2773,6 +2774,8 @@ class Prediction(google.protobuf.message.Message):
27732774
JPG) of the binary data in "color_data".
27742775
"""
27752776

2777+
@property
2778+
def key_value(self) -> global___KeyValue: ...
27762779
def __init__(self,
27772780
*,
27782781
color : typing.Optional[typing.Text] = ...,
@@ -2788,9 +2791,10 @@ class Prediction(google.protobuf.message.Message):
27882791
depth_ts : typing.Optional[google.protobuf.timestamp_pb2.Timestamp] = ...,
27892792
error : typing.Optional[typing.Text] = ...,
27902793
color_data : typing.Optional[builtins.bytes] = ...,
2794+
key_value : typing.Optional[global___KeyValue] = ...,
27912795
) -> None: ...
2792-
def HasField(self, field_name: typing_extensions.Literal["color",b"color","color_data",b"color_data","color_ssot_key",b"color_ssot_key","color_ts",b"color_ts","depth_ts",b"depth_ts","error",b"error","inference_request",b"inference_request"]) -> builtins.bool: ...
2793-
def ClearField(self, field_name: typing_extensions.Literal["color",b"color","color_data",b"color_data","color_ssot_key",b"color_ssot_key","color_ts",b"color_ts","confidence",b"confidence","depth_ts",b"depth_ts","error",b"error","inference_request",b"inference_request","pick_points",b"pick_points","place_position_3d",b"place_position_3d","place_quaternion_3d",b"place_quaternion_3d","position_3d",b"position_3d","quaternion_3d",b"quaternion_3d"]) -> None: ...
2796+
def HasField(self, field_name: typing_extensions.Literal["color",b"color","color_data",b"color_data","color_ssot_key",b"color_ssot_key","color_ts",b"color_ts","depth_ts",b"depth_ts","error",b"error","inference_request",b"inference_request","key_value",b"key_value"]) -> builtins.bool: ...
2797+
def ClearField(self, field_name: typing_extensions.Literal["color",b"color","color_data",b"color_data","color_ssot_key",b"color_ssot_key","color_ts",b"color_ts","confidence",b"confidence","depth_ts",b"depth_ts","error",b"error","inference_request",b"inference_request","key_value",b"key_value","pick_points",b"pick_points","place_position_3d",b"place_position_3d","place_quaternion_3d",b"place_quaternion_3d","position_3d",b"position_3d","quaternion_3d",b"quaternion_3d"]) -> None: ...
27942798
global___Prediction = Prediction
27952799

27962800
class PickPoint(google.protobuf.message.Message):

pyreach/common/python/types_gen.py

Lines changed: 50 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3823,7 +3823,12 @@ class DeviceData:
38233823
# ==============================
38243824

38253825
# === Fields for dataType exposure-complete:
3826-
# (no fields)
3826+
# (also field status)
3827+
# (also field script)
3828+
# (also field error)
3829+
# (also field progress)
3830+
# (also field message)
3831+
# (also field code)
38273832
# ==============================
38283833

38293834
# === Fields for dataType start-shutdown:
@@ -4800,6 +4805,16 @@ def to_proto(self) -> 'logs_pb2.DeviceData':
48004805
proto_prediction.depth_ts.nanos = int(self.depth_ts % 1000) * 1000000
48014806
if self.error:
48024807
proto_prediction.error = self.error
4808+
proto_prediction_key_value = logs_pb2.KeyValue()
4809+
if self.key:
4810+
proto_prediction_key_value.key = self.key
4811+
if self.value:
4812+
proto_prediction_key_value.value = self.value
4813+
if self.int_value:
4814+
proto_prediction_key_value.int_value = self.int_value
4815+
if self.float_value:
4816+
proto_prediction_key_value.float_value = self.float_value
4817+
proto_prediction.key_value.CopyFrom(proto_prediction_key_value)
48034818
proto.prediction.CopyFrom(proto_prediction)
48044819
if self.data_type == 'ur-state':
48054820
proto_ur_state = logs_pb2.UrState()
@@ -5135,7 +5150,19 @@ def to_proto(self) -> 'logs_pb2.DeviceData':
51355150
if self.sim_instance_segmentation:
51365151
proto.sim_instance_segmentation.CopyFrom(self.sim_instance_segmentation.to_proto())
51375152
if self.data_type == 'exposure-complete':
5138-
proto_exposure_complete = logs_pb2.EmptyMessage()
5153+
proto_exposure_complete = logs_pb2.Status()
5154+
if self.status:
5155+
proto_exposure_complete.status = self.status
5156+
if self.script:
5157+
proto_exposure_complete.script = self.script
5158+
if self.error:
5159+
proto_exposure_complete.error = self.error
5160+
if self.progress:
5161+
proto_exposure_complete.progress = self.progress
5162+
if self.message:
5163+
proto_exposure_complete.message = self.message
5164+
if self.code:
5165+
proto_exposure_complete.code = self.code
51395166
proto.exposure_complete.CopyFrom(proto_exposure_complete)
51405167
if self.data_type == 'start-shutdown':
51415168
proto_start_shutdown = logs_pb2.EmptyMessage()
@@ -5976,6 +6003,15 @@ def from_proto(proto: logs_pb2.DeviceData) -> Optional['DeviceData']:
59766003
obj.depth_ts = int(proto.prediction.depth_ts.seconds * 1000) + int(proto.prediction.depth_ts.nanos / 1000000)
59776004
if proto.prediction.HasField('error'):
59786005
obj.error = proto.prediction.error
6006+
if proto.prediction.HasField('key_value'):
6007+
if proto.prediction.key_value.HasField('key'):
6008+
obj.key = proto.prediction.key_value.key
6009+
if proto.prediction.key_value.HasField('value'):
6010+
obj.value = proto.prediction.key_value.value
6011+
if proto.prediction.key_value.HasField('int_value'):
6012+
obj.int_value = proto.prediction.key_value.int_value
6013+
if proto.prediction.key_value.HasField('float_value'):
6014+
obj.float_value = proto.prediction.key_value.float_value
59796015
if proto.HasField('ur_state'):
59806016
for obj_pose in proto.ur_state.pose:
59816017
obj.pose.append(obj_pose)
@@ -6268,7 +6304,18 @@ def from_proto(proto: logs_pb2.DeviceData) -> Optional['DeviceData']:
62686304
if proto.HasField('sim_instance_segmentation'):
62696305
obj.sim_instance_segmentation = SimInstanceSegmentation.from_proto(proto.sim_instance_segmentation)
62706306
if proto.HasField('exposure_complete'):
6271-
pass # skip empty message
6307+
if proto.exposure_complete.HasField('status'):
6308+
obj.status = proto.exposure_complete.status
6309+
if proto.exposure_complete.HasField('script'):
6310+
obj.script = proto.exposure_complete.script
6311+
if proto.exposure_complete.HasField('error'):
6312+
obj.error = proto.exposure_complete.error
6313+
if proto.exposure_complete.HasField('progress'):
6314+
obj.progress = proto.exposure_complete.progress
6315+
if proto.exposure_complete.HasField('message'):
6316+
obj.message = proto.exposure_complete.message
6317+
if proto.exposure_complete.HasField('code'):
6318+
obj.code = proto.exposure_complete.code
62726319
if proto.HasField('start_shutdown'):
62736320
pass # skip empty message
62746321
if proto.HasField('finish_shutdown'):

0 commit comments

Comments
 (0)