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

Commit cd39cae

Browse files
Pyreach sync 20220413
1 parent dfa2dac commit cd39cae

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+6472
-1782
lines changed

pyreach/common/proto_gen/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,3 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14-

pyreach/common/proto_gen/experiment_config_pb2.pyi

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -24,56 +24,56 @@ import google.protobuf.message
2424
import typing
2525
import typing_extensions
2626

27-
DESCRIPTOR: google.protobuf.descriptor.FileDescriptor = ...
27+
DESCRIPTOR: google.protobuf.descriptor.FileDescriptor
2828

2929
class RoboticsClientConfig(google.protobuf.message.Message):
30-
DESCRIPTOR: google.protobuf.descriptor.Descriptor = ...
30+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
3131
PROJECT_NAME_FIELD_NUMBER: builtins.int
32-
project_name: typing.Text = ...
32+
project_name: typing.Text
3333
def __init__(self,
3434
*,
35-
project_name : typing.Text = ...,
35+
project_name: typing.Text = ...,
3636
) -> None: ...
3737
def ClearField(self, field_name: typing_extensions.Literal["project_name",b"project_name"]) -> None: ...
3838
global___RoboticsClientConfig = RoboticsClientConfig
3939

4040
class TaskProperties(google.protobuf.message.Message):
41-
DESCRIPTOR: google.protobuf.descriptor.Descriptor = ...
41+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
4242
TASK_NAME_FIELD_NUMBER: builtins.int
4343
EPISODE_ID_FIELD_NUMBER: builtins.int
4444
TIMESTAMP_COARSE_FIELD_NUMBER: builtins.int
45-
task_name: typing.Text = ...
46-
episode_id: typing.Text = ...
47-
timestamp_coarse: builtins.int = ...
45+
task_name: typing.Text
46+
episode_id: typing.Text
47+
timestamp_coarse: builtins.int
4848
def __init__(self,
4949
*,
50-
task_name : typing.Text = ...,
51-
episode_id : typing.Text = ...,
52-
timestamp_coarse : builtins.int = ...,
50+
task_name: typing.Text = ...,
51+
episode_id: typing.Text = ...,
52+
timestamp_coarse: builtins.int = ...,
5353
) -> None: ...
5454
def ClearField(self, field_name: typing_extensions.Literal["episode_id",b"episode_id","task_name",b"task_name","timestamp_coarse",b"timestamp_coarse"]) -> None: ...
5555
global___TaskProperties = TaskProperties
5656

5757
class Flag(google.protobuf.message.Message):
5858
"""Flag defines a specific experiment flag."""
59-
DESCRIPTOR: google.protobuf.descriptor.Descriptor = ...
59+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
6060
NAME_FIELD_NUMBER: builtins.int
6161
INT_VALUE_FIELD_NUMBER: builtins.int
6262
STRING_VALUE_FIELD_NUMBER: builtins.int
6363
DOUBLE_VALUE_FIELD_NUMBER: builtins.int
6464
BOOL_VALUE_FIELD_NUMBER: builtins.int
65-
name: typing.Text = ...
66-
int_value: builtins.int = ...
67-
string_value: typing.Text = ...
68-
double_value: builtins.float = ...
69-
bool_value: builtins.bool = ...
65+
name: typing.Text
66+
int_value: builtins.int
67+
string_value: typing.Text
68+
double_value: builtins.float
69+
bool_value: builtins.bool
7070
def __init__(self,
7171
*,
72-
name : typing.Text = ...,
73-
int_value : builtins.int = ...,
74-
string_value : typing.Text = ...,
75-
double_value : builtins.float = ...,
76-
bool_value : builtins.bool = ...,
72+
name: typing.Text = ...,
73+
int_value: builtins.int = ...,
74+
string_value: typing.Text = ...,
75+
double_value: builtins.float = ...,
76+
bool_value: builtins.bool = ...,
7777
) -> None: ...
7878
def HasField(self, field_name: typing_extensions.Literal["bool_value",b"bool_value","double_value",b"double_value","int_value",b"int_value","string_value",b"string_value","value",b"value"]) -> builtins.bool: ...
7979
def ClearField(self, field_name: typing_extensions.Literal["bool_value",b"bool_value","double_value",b"double_value","int_value",b"int_value","name",b"name","string_value",b"string_value","value",b"value"]) -> None: ...
@@ -82,63 +82,63 @@ global___Flag = Flag
8282

8383
class Flags(google.protobuf.message.Message):
8484
"""Flags defines a list of experiment flags for a given experiment token."""
85-
DESCRIPTOR: google.protobuf.descriptor.Descriptor = ...
85+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
8686
FLAGS_FIELD_NUMBER: builtins.int
8787
EXPERIMENT_TOKEN_FIELD_NUMBER: builtins.int
8888
@property
8989
def flags(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Flag]: ...
90-
experiment_token: typing.Text = ...
90+
experiment_token: typing.Text
9191
def __init__(self,
9292
*,
93-
flags : typing.Optional[typing.Iterable[global___Flag]] = ...,
94-
experiment_token : typing.Text = ...,
93+
flags: typing.Optional[typing.Iterable[global___Flag]] = ...,
94+
experiment_token: typing.Text = ...,
9595
) -> None: ...
9696
def ClearField(self, field_name: typing_extensions.Literal["experiment_token",b"experiment_token","flags",b"flags"]) -> None: ...
9797
global___Flags = Flags
9898

9999
class FwFlagsRequest(google.protobuf.message.Message):
100-
DESCRIPTOR: google.protobuf.descriptor.Descriptor = ...
100+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
101101
PROPERTIES_FIELD_NUMBER: builtins.int
102102
@property
103103
def properties(self) -> google.protobuf.any_pb2.Any: ...
104104
def __init__(self,
105105
*,
106-
properties : typing.Optional[google.protobuf.any_pb2.Any] = ...,
106+
properties: typing.Optional[google.protobuf.any_pb2.Any] = ...,
107107
) -> None: ...
108108
def HasField(self, field_name: typing_extensions.Literal["properties",b"properties"]) -> builtins.bool: ...
109109
def ClearField(self, field_name: typing_extensions.Literal["properties",b"properties"]) -> None: ...
110110
global___FwFlagsRequest = FwFlagsRequest
111111

112112
class FwFlagsResponse(google.protobuf.message.Message):
113-
DESCRIPTOR: google.protobuf.descriptor.Descriptor = ...
113+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
114114
SUBSCRIPTION_ID_FIELD_NUMBER: builtins.int
115115
FLAGS_FIELD_NUMBER: builtins.int
116-
subscription_id: typing.Text = ...
116+
subscription_id: typing.Text
117117
@property
118118
def flags(self) -> global___Flags: ...
119119
def __init__(self,
120120
*,
121-
subscription_id : typing.Text = ...,
122-
flags : typing.Optional[global___Flags] = ...,
121+
subscription_id: typing.Text = ...,
122+
flags: typing.Optional[global___Flags] = ...,
123123
) -> None: ...
124124
def HasField(self, field_name: typing_extensions.Literal["flags",b"flags"]) -> builtins.bool: ...
125125
def ClearField(self, field_name: typing_extensions.Literal["flags",b"flags","subscription_id",b"subscription_id"]) -> None: ...
126126
global___FwFlagsResponse = FwFlagsResponse
127127

128128
class FwExperimentSubscriptionRequest(google.protobuf.message.Message):
129-
DESCRIPTOR: google.protobuf.descriptor.Descriptor = ...
129+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
130130
SUBSCRIPTION_ID_FIELD_NUMBER: builtins.int
131131
PROPERTIES_FIELD_NUMBER: builtins.int
132132
REFRESH_RATE_SECONDS_FIELD_NUMBER: builtins.int
133-
subscription_id: typing.Text = ...
133+
subscription_id: typing.Text
134134
@property
135135
def properties(self) -> google.protobuf.any_pb2.Any: ...
136-
refresh_rate_seconds: builtins.int = ...
136+
refresh_rate_seconds: builtins.int
137137
def __init__(self,
138138
*,
139-
subscription_id : typing.Text = ...,
140-
properties : typing.Optional[google.protobuf.any_pb2.Any] = ...,
141-
refresh_rate_seconds : builtins.int = ...,
139+
subscription_id: typing.Text = ...,
140+
properties: typing.Optional[google.protobuf.any_pb2.Any] = ...,
141+
refresh_rate_seconds: builtins.int = ...,
142142
) -> None: ...
143143
def HasField(self, field_name: typing_extensions.Literal["properties",b"properties"]) -> builtins.bool: ...
144144
def ClearField(self, field_name: typing_extensions.Literal["properties",b"properties","refresh_rate_seconds",b"refresh_rate_seconds","subscription_id",b"subscription_id"]) -> None: ...
Lines changed: 148 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,148 @@
1+
# Copyright 2021 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
# -*- coding: utf-8 -*-
16+
# Generated by the protocol buffer compiler. DO NOT EDIT!
17+
# source: general_io.proto
18+
19+
from google.protobuf import descriptor as _descriptor
20+
from google.protobuf import message as _message
21+
from google.protobuf import reflection as _reflection
22+
from google.protobuf import symbol_database as _symbol_database
23+
# @@protoc_insertion_point(imports)
24+
25+
_sym_db = _symbol_database.Default()
26+
27+
28+
import pyreach.common.proto_gen.units_pb2 as units__pb2
29+
30+
31+
DESCRIPTOR = _descriptor.FileDescriptor(
32+
name='general_io.proto',
33+
package='robotics.logging.messages',
34+
syntax='proto2',
35+
serialized_options=None,
36+
create_key=_descriptor._internal_create_key,
37+
serialized_pb=b'\n\x10general_io.proto\x12\x19robotics.logging.messages\x1a\x0bunits.proto\".\n\tGeneralIo\x12\x10\n\x08\x64igitals\x18\x01 \x03(\x03\x12\x0f\n\x07\x61nalogs\x18\x02 \x03(\x01\"q\n\rGeneralIoMeta\x12\x14\n\x0cnum_digitals\x18\x01 \x01(\x05\x12\x13\n\x0bnum_analogs\x18\x02 \x01(\x05\x12\x35\n\x0c\x61nalog_units\x18\x03 \x03(\x0e\x32\x1f.robotics.logging.messages.Unit'
38+
,
39+
dependencies=[units__pb2.DESCRIPTOR,])
40+
41+
42+
43+
44+
_GENERALIO = _descriptor.Descriptor(
45+
name='GeneralIo',
46+
full_name='robotics.logging.messages.GeneralIo',
47+
filename=None,
48+
file=DESCRIPTOR,
49+
containing_type=None,
50+
create_key=_descriptor._internal_create_key,
51+
fields=[
52+
_descriptor.FieldDescriptor(
53+
name='digitals', full_name='robotics.logging.messages.GeneralIo.digitals', index=0,
54+
number=1, type=3, cpp_type=2, label=3,
55+
has_default_value=False, default_value=[],
56+
message_type=None, enum_type=None, containing_type=None,
57+
is_extension=False, extension_scope=None,
58+
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
59+
_descriptor.FieldDescriptor(
60+
name='analogs', full_name='robotics.logging.messages.GeneralIo.analogs', index=1,
61+
number=2, type=1, cpp_type=5, label=3,
62+
has_default_value=False, default_value=[],
63+
message_type=None, enum_type=None, containing_type=None,
64+
is_extension=False, extension_scope=None,
65+
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
66+
],
67+
extensions=[
68+
],
69+
nested_types=[],
70+
enum_types=[
71+
],
72+
serialized_options=None,
73+
is_extendable=False,
74+
syntax='proto2',
75+
extension_ranges=[],
76+
oneofs=[
77+
],
78+
serialized_start=60,
79+
serialized_end=106,
80+
)
81+
82+
83+
_GENERALIOMETA = _descriptor.Descriptor(
84+
name='GeneralIoMeta',
85+
full_name='robotics.logging.messages.GeneralIoMeta',
86+
filename=None,
87+
file=DESCRIPTOR,
88+
containing_type=None,
89+
create_key=_descriptor._internal_create_key,
90+
fields=[
91+
_descriptor.FieldDescriptor(
92+
name='num_digitals', full_name='robotics.logging.messages.GeneralIoMeta.num_digitals', index=0,
93+
number=1, type=5, cpp_type=1, label=1,
94+
has_default_value=False, default_value=0,
95+
message_type=None, enum_type=None, containing_type=None,
96+
is_extension=False, extension_scope=None,
97+
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
98+
_descriptor.FieldDescriptor(
99+
name='num_analogs', full_name='robotics.logging.messages.GeneralIoMeta.num_analogs', index=1,
100+
number=2, type=5, cpp_type=1, label=1,
101+
has_default_value=False, default_value=0,
102+
message_type=None, enum_type=None, containing_type=None,
103+
is_extension=False, extension_scope=None,
104+
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
105+
_descriptor.FieldDescriptor(
106+
name='analog_units', full_name='robotics.logging.messages.GeneralIoMeta.analog_units', index=2,
107+
number=3, type=14, cpp_type=8, label=3,
108+
has_default_value=False, default_value=[],
109+
message_type=None, enum_type=None, containing_type=None,
110+
is_extension=False, extension_scope=None,
111+
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
112+
],
113+
extensions=[
114+
],
115+
nested_types=[],
116+
enum_types=[
117+
],
118+
serialized_options=None,
119+
is_extendable=False,
120+
syntax='proto2',
121+
extension_ranges=[],
122+
oneofs=[
123+
],
124+
serialized_start=108,
125+
serialized_end=221,
126+
)
127+
128+
_GENERALIOMETA.fields_by_name['analog_units'].enum_type = units__pb2._UNIT
129+
DESCRIPTOR.message_types_by_name['GeneralIo'] = _GENERALIO
130+
DESCRIPTOR.message_types_by_name['GeneralIoMeta'] = _GENERALIOMETA
131+
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
132+
133+
GeneralIo = _reflection.GeneratedProtocolMessageType('GeneralIo', (_message.Message,), {
134+
'DESCRIPTOR' : _GENERALIO,
135+
'__module__' : 'general_io_pb2'
136+
# @@protoc_insertion_point(class_scope:robotics.logging.messages.GeneralIo)
137+
})
138+
_sym_db.RegisterMessage(GeneralIo)
139+
140+
GeneralIoMeta = _reflection.GeneratedProtocolMessageType('GeneralIoMeta', (_message.Message,), {
141+
'DESCRIPTOR' : _GENERALIOMETA,
142+
'__module__' : 'general_io_pb2'
143+
# @@protoc_insertion_point(class_scope:robotics.logging.messages.GeneralIoMeta)
144+
})
145+
_sym_db.RegisterMessage(GeneralIoMeta)
146+
147+
148+
# @@protoc_insertion_point(module_scope)
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# Copyright 2021 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
"""
16+
@generated by mypy-protobuf. Do not edit manually!
17+
isort:skip_file
18+
"""
19+
import builtins
20+
import google.protobuf.descriptor
21+
import google.protobuf.internal.containers
22+
import google.protobuf.message
23+
import typing
24+
import typing_extensions
25+
import units_pb2
26+
27+
DESCRIPTOR: google.protobuf.descriptor.FileDescriptor
28+
29+
class GeneralIo(google.protobuf.message.Message):
30+
"""GeneralIo represents a set of I/O values that together abstracts the
31+
interaction with a hardware device or part of hardware device. For example,
32+
a few switches and knobs input from a control panel or several status LEDs
33+
output. Despite the flexibility of this type, it should be used with
34+
discretion. Please only use this type if the value being logged does not have
35+
more structure than plain I/O.
36+
"""
37+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
38+
DIGITALS_FIELD_NUMBER: builtins.int
39+
ANALOGS_FIELD_NUMBER: builtins.int
40+
@property
41+
def digitals(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.int]: ...
42+
@property
43+
def analogs(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.float]: ...
44+
def __init__(self,
45+
*,
46+
digitals: typing.Optional[typing.Iterable[builtins.int]] = ...,
47+
analogs: typing.Optional[typing.Iterable[builtins.float]] = ...,
48+
) -> None: ...
49+
def ClearField(self, field_name: typing_extensions.Literal["analogs",b"analogs","digitals",b"digitals"]) -> None: ...
50+
global___GeneralIo = GeneralIo
51+
52+
class GeneralIoMeta(google.protobuf.message.Message):
53+
"""Metadata type that comes with GeneralIo. Length of analog_units should always
54+
equal to num_analogs.
55+
"""
56+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
57+
NUM_DIGITALS_FIELD_NUMBER: builtins.int
58+
NUM_ANALOGS_FIELD_NUMBER: builtins.int
59+
ANALOG_UNITS_FIELD_NUMBER: builtins.int
60+
num_digitals: builtins.int
61+
num_analogs: builtins.int
62+
@property
63+
def analog_units(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[units_pb2.Unit.ValueType]: ...
64+
def __init__(self,
65+
*,
66+
num_digitals: typing.Optional[builtins.int] = ...,
67+
num_analogs: typing.Optional[builtins.int] = ...,
68+
analog_units: typing.Optional[typing.Iterable[units_pb2.Unit.ValueType]] = ...,
69+
) -> None: ...
70+
def HasField(self, field_name: typing_extensions.Literal["num_analogs",b"num_analogs","num_digitals",b"num_digitals"]) -> builtins.bool: ...
71+
def ClearField(self, field_name: typing_extensions.Literal["analog_units",b"analog_units","num_analogs",b"num_analogs","num_digitals",b"num_digitals"]) -> None: ...
72+
global___GeneralIoMeta = GeneralIoMeta

0 commit comments

Comments
 (0)