From f80deda38b796cb8998ae04964f3175b1d75c970 Mon Sep 17 00:00:00 2001 From: Cyrille Nofficial Date: Tue, 31 Dec 2019 17:46:54 +0100 Subject: [PATCH] [python] Package generated files --- python/build/lib/events/__init__.py | 0 python/build/lib/events/events_pb2.py | 392 ++++++++++++++++++++++++++ python/events/__init__.py | 0 python/setup.py | 47 +++ 4 files changed, 439 insertions(+) create mode 100644 python/build/lib/events/__init__.py create mode 100644 python/build/lib/events/events_pb2.py create mode 100644 python/events/__init__.py create mode 100644 python/setup.py diff --git a/python/build/lib/events/__init__.py b/python/build/lib/events/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/python/build/lib/events/events_pb2.py b/python/build/lib/events/events_pb2.py new file mode 100644 index 0000000..92f15d9 --- /dev/null +++ b/python/build/lib/events/events_pb2.py @@ -0,0 +1,392 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: events/events.proto + +import sys +_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) +from google.protobuf.internal import enum_type_wrapper +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + + + +DESCRIPTOR = _descriptor.FileDescriptor( + name='events/events.proto', + package='robocar.events', + syntax='proto3', + serialized_options=_b('Z\006events'), + serialized_pb=_b('\n\x13\x65vents/events.proto\x12\x0erobocar.events\"$\n\x08\x46rameRef\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\n\n\x02id\x18\x02 \x01(\t\"C\n\x0c\x46rameMessage\x12$\n\x02id\x18\x01 \x01(\x0b\x32\x18.robocar.events.FrameRef\x12\r\n\x05\x66rame\x18\x02 \x01(\x0c\"d\n\x0fSteeringMessage\x12\x10\n\x08steering\x18\x01 \x01(\x02\x12\x12\n\nconfidence\x18\x02 \x01(\x02\x12+\n\tframe_ref\x18\x03 \x01(\x0b\x32\x18.robocar.events.FrameRef\"d\n\x0fThrottleMessage\x12\x10\n\x08throttle\x18\x01 \x01(\x02\x12\x12\n\nconfidence\x18\x02 \x01(\x02\x12+\n\tframe_ref\x18\x03 \x01(\x0b\x32\x18.robocar.events.FrameRef\"f\n\x0eObjectsMessage\x12\'\n\x07objects\x18\x01 \x03(\x0b\x32\x16.robocar.events.Object\x12+\n\tframe_ref\x18\x02 \x01(\x0b\x32\x18.robocar.events.FrameRef\"\x80\x01\n\x06Object\x12(\n\x04type\x18\x01 \x01(\x0e\x32\x1a.robocar.events.TypeObject\x12\r\n\x05lLeft\x18\x02 \x01(\x05\x12\n\n\x02up\x18\x03 \x01(\x05\x12\r\n\x05right\x18\x04 \x01(\x05\x12\x0e\n\x06\x62ottom\x18\x05 \x01(\x05\x12\x12\n\nconfidence\x18\x06 \x01(\x02*2\n\nTypeObject\x12\x07\n\x03\x41NY\x10\x00\x12\x07\n\x03\x43\x41R\x10\x01\x12\x08\n\x04\x42UMP\x10\x02\x12\x08\n\x04PLOT\x10\x03\x42\x08Z\x06\x65ventsb\x06proto3') +) + +_TYPEOBJECT = _descriptor.EnumDescriptor( + name='TypeObject', + full_name='robocar.events.TypeObject', + filename=None, + file=DESCRIPTOR, + values=[ + _descriptor.EnumValueDescriptor( + name='ANY', index=0, number=0, + serialized_options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='CAR', index=1, number=1, + serialized_options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='BUMP', index=2, number=2, + serialized_options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='PLOT', index=3, number=3, + serialized_options=None, + type=None), + ], + containing_type=None, + serialized_options=None, + serialized_start=585, + serialized_end=635, +) +_sym_db.RegisterEnumDescriptor(_TYPEOBJECT) + +TypeObject = enum_type_wrapper.EnumTypeWrapper(_TYPEOBJECT) +ANY = 0 +CAR = 1 +BUMP = 2 +PLOT = 3 + + + +_FRAMEREF = _descriptor.Descriptor( + name='FrameRef', + full_name='robocar.events.FrameRef', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='name', full_name='robocar.events.FrameRef.name', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='id', full_name='robocar.events.FrameRef.id', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=39, + serialized_end=75, +) + + +_FRAMEMESSAGE = _descriptor.Descriptor( + name='FrameMessage', + full_name='robocar.events.FrameMessage', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='id', full_name='robocar.events.FrameMessage.id', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='frame', full_name='robocar.events.FrameMessage.frame', index=1, + number=2, type=12, cpp_type=9, label=1, + has_default_value=False, default_value=_b(""), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=77, + serialized_end=144, +) + + +_STEERINGMESSAGE = _descriptor.Descriptor( + name='SteeringMessage', + full_name='robocar.events.SteeringMessage', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='steering', full_name='robocar.events.SteeringMessage.steering', index=0, + number=1, type=2, cpp_type=6, label=1, + has_default_value=False, default_value=float(0), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='confidence', full_name='robocar.events.SteeringMessage.confidence', index=1, + number=2, type=2, cpp_type=6, label=1, + has_default_value=False, default_value=float(0), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='frame_ref', full_name='robocar.events.SteeringMessage.frame_ref', index=2, + number=3, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=146, + serialized_end=246, +) + + +_THROTTLEMESSAGE = _descriptor.Descriptor( + name='ThrottleMessage', + full_name='robocar.events.ThrottleMessage', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='throttle', full_name='robocar.events.ThrottleMessage.throttle', index=0, + number=1, type=2, cpp_type=6, label=1, + has_default_value=False, default_value=float(0), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='confidence', full_name='robocar.events.ThrottleMessage.confidence', index=1, + number=2, type=2, cpp_type=6, label=1, + has_default_value=False, default_value=float(0), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='frame_ref', full_name='robocar.events.ThrottleMessage.frame_ref', index=2, + number=3, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=248, + serialized_end=348, +) + + +_OBJECTSMESSAGE = _descriptor.Descriptor( + name='ObjectsMessage', + full_name='robocar.events.ObjectsMessage', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='objects', full_name='robocar.events.ObjectsMessage.objects', index=0, + number=1, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='frame_ref', full_name='robocar.events.ObjectsMessage.frame_ref', index=1, + number=2, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=350, + serialized_end=452, +) + + +_OBJECT = _descriptor.Descriptor( + name='Object', + full_name='robocar.events.Object', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='type', full_name='robocar.events.Object.type', index=0, + number=1, type=14, cpp_type=8, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='lLeft', full_name='robocar.events.Object.lLeft', index=1, + number=2, type=5, cpp_type=1, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='up', full_name='robocar.events.Object.up', index=2, + number=3, type=5, cpp_type=1, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='right', full_name='robocar.events.Object.right', index=3, + number=4, type=5, cpp_type=1, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='bottom', full_name='robocar.events.Object.bottom', index=4, + number=5, type=5, cpp_type=1, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='confidence', full_name='robocar.events.Object.confidence', index=5, + number=6, type=2, cpp_type=6, label=1, + has_default_value=False, default_value=float(0), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=455, + serialized_end=583, +) + +_FRAMEMESSAGE.fields_by_name['id'].message_type = _FRAMEREF +_STEERINGMESSAGE.fields_by_name['frame_ref'].message_type = _FRAMEREF +_THROTTLEMESSAGE.fields_by_name['frame_ref'].message_type = _FRAMEREF +_OBJECTSMESSAGE.fields_by_name['objects'].message_type = _OBJECT +_OBJECTSMESSAGE.fields_by_name['frame_ref'].message_type = _FRAMEREF +_OBJECT.fields_by_name['type'].enum_type = _TYPEOBJECT +DESCRIPTOR.message_types_by_name['FrameRef'] = _FRAMEREF +DESCRIPTOR.message_types_by_name['FrameMessage'] = _FRAMEMESSAGE +DESCRIPTOR.message_types_by_name['SteeringMessage'] = _STEERINGMESSAGE +DESCRIPTOR.message_types_by_name['ThrottleMessage'] = _THROTTLEMESSAGE +DESCRIPTOR.message_types_by_name['ObjectsMessage'] = _OBJECTSMESSAGE +DESCRIPTOR.message_types_by_name['Object'] = _OBJECT +DESCRIPTOR.enum_types_by_name['TypeObject'] = _TYPEOBJECT +_sym_db.RegisterFileDescriptor(DESCRIPTOR) + +FrameRef = _reflection.GeneratedProtocolMessageType('FrameRef', (_message.Message,), dict( + DESCRIPTOR = _FRAMEREF, + __module__ = 'events.events_pb2' + # @@protoc_insertion_point(class_scope:robocar.events.FrameRef) + )) +_sym_db.RegisterMessage(FrameRef) + +FrameMessage = _reflection.GeneratedProtocolMessageType('FrameMessage', (_message.Message,), dict( + DESCRIPTOR = _FRAMEMESSAGE, + __module__ = 'events.events_pb2' + # @@protoc_insertion_point(class_scope:robocar.events.FrameMessage) + )) +_sym_db.RegisterMessage(FrameMessage) + +SteeringMessage = _reflection.GeneratedProtocolMessageType('SteeringMessage', (_message.Message,), dict( + DESCRIPTOR = _STEERINGMESSAGE, + __module__ = 'events.events_pb2' + # @@protoc_insertion_point(class_scope:robocar.events.SteeringMessage) + )) +_sym_db.RegisterMessage(SteeringMessage) + +ThrottleMessage = _reflection.GeneratedProtocolMessageType('ThrottleMessage', (_message.Message,), dict( + DESCRIPTOR = _THROTTLEMESSAGE, + __module__ = 'events.events_pb2' + # @@protoc_insertion_point(class_scope:robocar.events.ThrottleMessage) + )) +_sym_db.RegisterMessage(ThrottleMessage) + +ObjectsMessage = _reflection.GeneratedProtocolMessageType('ObjectsMessage', (_message.Message,), dict( + DESCRIPTOR = _OBJECTSMESSAGE, + __module__ = 'events.events_pb2' + # @@protoc_insertion_point(class_scope:robocar.events.ObjectsMessage) + )) +_sym_db.RegisterMessage(ObjectsMessage) + +Object = _reflection.GeneratedProtocolMessageType('Object', (_message.Message,), dict( + DESCRIPTOR = _OBJECT, + __module__ = 'events.events_pb2' + # @@protoc_insertion_point(class_scope:robocar.events.Object) + )) +_sym_db.RegisterMessage(Object) + + +DESCRIPTOR._options = None +# @@protoc_insertion_point(module_scope) diff --git a/python/events/__init__.py b/python/events/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/python/setup.py b/python/setup.py new file mode 100644 index 0000000..7e48704 --- /dev/null +++ b/python/setup.py @@ -0,0 +1,47 @@ +import os + +from setuptools import setup, find_packages + + +# include the non python files +def package_files(directory, strip_leading): + paths = [] + for (path, directories, filenames) in os.walk(directory): + for filename in filenames: + package_file = os.path.join(path, filename) + paths.append(package_file[len(strip_leading):]) + return paths + + +setup(name='robocar_protobuf', + version='0.1', + description='Protobuf message definitions for robocar.', + url='https://github.com/cyrilix/robocar-protobuf/python', + license='Apache2', + install_requires=["protobuf",], + + classifiers=[ + # How mature is this project? Common values are + # 3 - Alpha + # 4 - Beta + # 5 - Production/Stable + 'Development Status :: 3 - Alpha', + + # Indicate who your project is intended for + 'Intended Audience :: Developers', + 'Topic :: Scientific/Engineering :: Artificial Intelligence', + + # Pick your license as you wish (should match "license" above) + 'License :: OSI Approved :: Apache 2 License', + + # Specify the Python versions you support here. In particular, ensure + # that you indicate whether you support Python 2, Python 3 or both. + + 'Programming Language :: Python :: 3.4', + 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', + ], + keywords='selfdriving cars drive', + + packages=find_packages(exclude=(['tests', 'env'])), + )