wirepod-vector-sdk-audio 0.9.0__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.
- anki_vector/__init__.py +43 -0
- anki_vector/animation.py +272 -0
- anki_vector/annotate.py +590 -0
- anki_vector/audio.py +212 -0
- anki_vector/audio_stream.py +335 -0
- anki_vector/behavior.py +1135 -0
- anki_vector/camera.py +670 -0
- anki_vector/camera_viewer/__init__.py +121 -0
- anki_vector/color.py +88 -0
- anki_vector/configure/__main__.py +331 -0
- anki_vector/connection.py +838 -0
- anki_vector/events.py +420 -0
- anki_vector/exceptions.py +185 -0
- anki_vector/faces.py +819 -0
- anki_vector/lights.py +210 -0
- anki_vector/mdns.py +131 -0
- anki_vector/messaging/__init__.py +45 -0
- anki_vector/messaging/alexa_pb2.py +36 -0
- anki_vector/messaging/alexa_pb2_grpc.py +3 -0
- anki_vector/messaging/behavior_pb2.py +40 -0
- anki_vector/messaging/behavior_pb2_grpc.py +3 -0
- anki_vector/messaging/client.py +33 -0
- anki_vector/messaging/cube_pb2.py +113 -0
- anki_vector/messaging/cube_pb2_grpc.py +3 -0
- anki_vector/messaging/extensions_pb2.py +25 -0
- anki_vector/messaging/extensions_pb2_grpc.py +3 -0
- anki_vector/messaging/external_interface_pb2.py +169 -0
- anki_vector/messaging/external_interface_pb2_grpc.py +1267 -0
- anki_vector/messaging/messages_pb2.py +431 -0
- anki_vector/messaging/messages_pb2_grpc.py +3 -0
- anki_vector/messaging/nav_map_pb2.py +33 -0
- anki_vector/messaging/nav_map_pb2_grpc.py +3 -0
- anki_vector/messaging/protocol.py +33 -0
- anki_vector/messaging/response_status_pb2.py +27 -0
- anki_vector/messaging/response_status_pb2_grpc.py +3 -0
- anki_vector/messaging/settings_pb2.py +72 -0
- anki_vector/messaging/settings_pb2_grpc.py +3 -0
- anki_vector/messaging/shared_pb2.py +54 -0
- anki_vector/messaging/shared_pb2_grpc.py +3 -0
- anki_vector/motors.py +127 -0
- anki_vector/nav_map.py +409 -0
- anki_vector/objects.py +1782 -0
- anki_vector/opengl/__init__.py +103 -0
- anki_vector/opengl/assets/LICENSE.txt +21 -0
- anki_vector/opengl/assets/cube.jpg +0 -0
- anki_vector/opengl/assets/cube.mtl +9 -0
- anki_vector/opengl/assets/cube.obj +1000 -0
- anki_vector/opengl/assets/vector.mtl +67 -0
- anki_vector/opengl/assets/vector.obj +13220 -0
- anki_vector/opengl/opengl.py +864 -0
- anki_vector/opengl/opengl_vector.py +620 -0
- anki_vector/opengl/opengl_viewer.py +689 -0
- anki_vector/photos.py +145 -0
- anki_vector/proximity.py +176 -0
- anki_vector/reserve_control/__main__.py +36 -0
- anki_vector/robot.py +930 -0
- anki_vector/screen.py +201 -0
- anki_vector/status.py +322 -0
- anki_vector/touch.py +119 -0
- anki_vector/user_intent.py +186 -0
- anki_vector/util.py +1132 -0
- anki_vector/version.py +15 -0
- anki_vector/viewer.py +403 -0
- anki_vector/vision.py +202 -0
- anki_vector/world.py +899 -0
- wirepod_vector_sdk_audio-0.9.0.dist-info/METADATA +80 -0
- wirepod_vector_sdk_audio-0.9.0.dist-info/RECORD +71 -0
- wirepod_vector_sdk_audio-0.9.0.dist-info/WHEEL +5 -0
- wirepod_vector_sdk_audio-0.9.0.dist-info/licenses/LICENSE.txt +180 -0
- wirepod_vector_sdk_audio-0.9.0.dist-info/top_level.txt +1 -0
- wirepod_vector_sdk_audio-0.9.0.dist-info/zip-safe +1 -0
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
|
+
# source: anki_vector/messaging/settings.proto
|
|
4
|
+
"""Generated protocol buffer code."""
|
|
5
|
+
from google.protobuf.internal import builder as _builder
|
|
6
|
+
from google.protobuf import descriptor as _descriptor
|
|
7
|
+
from google.protobuf import descriptor_pool as _descriptor_pool
|
|
8
|
+
from google.protobuf import symbol_database as _symbol_database
|
|
9
|
+
# @@protoc_insertion_point(imports)
|
|
10
|
+
|
|
11
|
+
_sym_db = _symbol_database.Default()
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
from anki_vector.messaging import response_status_pb2 as anki__vector_dot_messaging_dot_response__status__pb2
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n$anki_vector/messaging/settings.proto\x12\x1e\x41nki.Vector.external_interface\x1a+anki_vector/messaging/response_status.proto\"\xe2\x02\n\x13RobotSettingsConfig\x12\x15\n\rclock_24_hour\x18\x01 \x01(\x08\x12;\n\teye_color\x18\x02 \x01(\x0e\x32(.Anki.Vector.external_interface.EyeColor\x12\x18\n\x10\x64\x65\x66\x61ult_location\x18\x03 \x01(\t\x12\x16\n\x0e\x64ist_is_metric\x18\x04 \x01(\x08\x12\x0e\n\x06locale\x18\x05 \x01(\t\x12=\n\rmaster_volume\x18\x06 \x01(\x0e\x32&.Anki.Vector.external_interface.Volume\x12\x1a\n\x12temp_is_fahrenheit\x18\x07 \x01(\x08\x12\x11\n\ttime_zone\x18\x08 \x01(\t\x12G\n\x0f\x62utton_wakeword\x18\t \x01(\x0e\x32..Anki.Vector.external_interface.ButtonWakeWord\"u\n\x15\x41\x63\x63ountSettingsConfig\x12\x19\n\x0f\x64\x61ta_collection\x18\x01 \x01(\x08H\x00\x12\x14\n\napp_locale\x18\x02 \x01(\tH\x01\x42\x17\n\x15oneof_data_collectionB\x12\n\x10oneof_app_locale\"N\n\x16UserEntitlementsConfig\x12\x1a\n\x10kickstarter_eyes\x18\x01 \x01(\x08H\x00\x42\x18\n\x16oneof_kickstarter_eyes\"[\n\x04Jdoc\x12\x13\n\x0b\x64oc_version\x18\x01 \x01(\x04\x12\x13\n\x0b\x66mt_version\x18\x02 \x01(\x04\x12\x17\n\x0f\x63lient_metadata\x18\x03 \x01(\t\x12\x10\n\x08json_doc\x18\x04 \x01(\t\"{\n\tNamedJdoc\x12;\n\tjdoc_type\x18\x01 \x01(\x0e\x32(.Anki.Vector.external_interface.JdocType\x12\x31\n\x03\x64oc\x18\x02 \x01(\x0b\x32$.Anki.Vector.external_interface.Jdoc\"P\n\x10PullJdocsRequest\x12<\n\njdoc_types\x18\x01 \x03(\x0e\x32(.Anki.Vector.external_interface.JdocType\"\x93\x01\n\x11PullJdocsResponse\x12>\n\x06status\x18\x01 \x01(\x0b\x32..Anki.Vector.external_interface.ResponseStatus\x12>\n\x0bnamed_jdocs\x18\x02 \x03(\x0b\x32).Anki.Vector.external_interface.NamedJdoc\"^\n\x15UpdateSettingsRequest\x12\x45\n\x08settings\x18\x01 \x01(\x0b\x32\x33.Anki.Vector.external_interface.RobotSettingsConfig\"\xc5\x01\n\x16UpdateSettingsResponse\x12>\n\x06status\x18\x01 \x01(\x0b\x32..Anki.Vector.external_interface.ResponseStatus\x12\x38\n\x04\x63ode\x18\x02 \x01(\x0e\x32*.Anki.Vector.external_interface.ResultCode\x12\x31\n\x03\x64oc\x18\x03 \x01(\x0b\x32$.Anki.Vector.external_interface.Jdoc\"o\n\x1cUpdateAccountSettingsRequest\x12O\n\x10\x61\x63\x63ount_settings\x18\x01 \x01(\x0b\x32\x35.Anki.Vector.external_interface.AccountSettingsConfig\"\xcc\x01\n\x1dUpdateAccountSettingsResponse\x12>\n\x06status\x18\x01 \x01(\x0b\x32..Anki.Vector.external_interface.ResponseStatus\x12\x38\n\x04\x63ode\x18\x02 \x01(\x0e\x32*.Anki.Vector.external_interface.ResultCode\x12\x31\n\x03\x64oc\x18\x03 \x01(\x0b\x32$.Anki.Vector.external_interface.Jdoc\"r\n\x1dUpdateUserEntitlementsRequest\x12Q\n\x11user_entitlements\x18\x01 \x01(\x0b\x32\x36.Anki.Vector.external_interface.UserEntitlementsConfig\"\xcd\x01\n\x1eUpdateUserEntitlementsResponse\x12>\n\x06status\x18\x01 \x01(\x0b\x32..Anki.Vector.external_interface.ResponseStatus\x12\x38\n\x04\x63ode\x18\x02 \x01(\x0e\x32*.Anki.Vector.external_interface.ResultCode\x12\x31\n\x03\x64oc\x18\x03 \x01(\x0b\x32$.Anki.Vector.external_interface.Jdoc\"L\n\x0cJdocsChanged\x12<\n\njdoc_types\x18\x01 \x03(\x0e\x32(.Anki.Vector.external_interface.JdocType*%\n\nApiVersion\x12\x0b\n\x07INVALID\x10\x00\x12\n\n\x06LATEST\x10\x01*R\n\x06Volume\x12\x08\n\x04MUTE\x10\x00\x12\x07\n\x03LOW\x10\x01\x12\x0e\n\nMEDIUM_LOW\x10\x02\x12\n\n\x06MEDIUM\x10\x03\x12\x0f\n\x0bMEDIUM_HIGH\x10\x04\x12\x08\n\x04HIGH\x10\x05*e\n\x08JdocType\x12\x12\n\x0eROBOT_SETTINGS\x10\x00\x12\x18\n\x14ROBOT_LIFETIME_STATS\x10\x01\x12\x14\n\x10\x41\x43\x43OUNT_SETTINGS\x10\x02\x12\x15\n\x11USER_ENTITLEMENTS\x10\x03*;\n\x11JdocResolveMethod\x12\x11\n\rPUSH_TO_CLOUD\x10\x00\x12\x13\n\x0fPULL_FROM_CLOUD\x10\x01*\xb5\x01\n\x0cRobotSetting\x12\x11\n\rclock_24_hour\x10\x00\x12\r\n\teye_color\x10\x01\x12\x14\n\x10\x64\x65\x66\x61ult_location\x10\x02\x12\x12\n\x0e\x64ist_is_metric\x10\x03\x12\n\n\x06locale\x10\x04\x12\x11\n\rmaster_volume\x10\x05\x12\x16\n\x12temp_is_fahrenheit\x10\x06\x12\r\n\ttime_zone\x10\x07\x12\x13\n\x0f\x62utton_wakeword\x10\x08*\xab\x01\n\x08\x45yeColor\x12\x11\n\rTIP_OVER_TEAL\x10\x00\x12\x12\n\x0eOVERFIT_ORANGE\x10\x01\x12\x12\n\x0eUNCANNY_YELLOW\x10\x02\x12\x13\n\x0fNON_LINEAR_LIME\x10\x03\x12\x18\n\x14SINGULARITY_SAPPHIRE\x10\x04\x12\x19\n\x15\x46\x41LSE_POSITIVE_PURPLE\x10\x05\x12\x1a\n\x16\x43ONFUSION_MATRIX_GREEN\x10\x06*K\n\x0e\x42uttonWakeWord\x12\x1e\n\x1a\x42UTTON_WAKEWORD_HEY_VECTOR\x10\x00\x12\x19\n\x15\x42UTTON_WAKEWORD_ALEXA\x10\x01*5\n\x0e\x41\x63\x63ountSetting\x12\x13\n\x0f\x44\x41TA_COLLECTION\x10\x00\x12\x0e\n\nAPP_LOCALE\x10\x01*\'\n\x0fUserEntitlement\x12\x14\n\x10KICKSTARTER_EYES\x10\x00*A\n\nResultCode\x12\x15\n\x11SETTINGS_ACCEPTED\x10\x00\x12\x1c\n\x18\x45RROR_UPDATE_IN_PROGRESS\x10\x01\x62\x06proto3')
|
|
18
|
+
|
|
19
|
+
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals())
|
|
20
|
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'anki_vector.messaging.settings_pb2', globals())
|
|
21
|
+
if _descriptor._USE_C_DESCRIPTORS == False:
|
|
22
|
+
|
|
23
|
+
DESCRIPTOR._options = None
|
|
24
|
+
_APIVERSION._serialized_start=2141
|
|
25
|
+
_APIVERSION._serialized_end=2178
|
|
26
|
+
_VOLUME._serialized_start=2180
|
|
27
|
+
_VOLUME._serialized_end=2262
|
|
28
|
+
_JDOCTYPE._serialized_start=2264
|
|
29
|
+
_JDOCTYPE._serialized_end=2365
|
|
30
|
+
_JDOCRESOLVEMETHOD._serialized_start=2367
|
|
31
|
+
_JDOCRESOLVEMETHOD._serialized_end=2426
|
|
32
|
+
_ROBOTSETTING._serialized_start=2429
|
|
33
|
+
_ROBOTSETTING._serialized_end=2610
|
|
34
|
+
_EYECOLOR._serialized_start=2613
|
|
35
|
+
_EYECOLOR._serialized_end=2784
|
|
36
|
+
_BUTTONWAKEWORD._serialized_start=2786
|
|
37
|
+
_BUTTONWAKEWORD._serialized_end=2861
|
|
38
|
+
_ACCOUNTSETTING._serialized_start=2863
|
|
39
|
+
_ACCOUNTSETTING._serialized_end=2916
|
|
40
|
+
_USERENTITLEMENT._serialized_start=2918
|
|
41
|
+
_USERENTITLEMENT._serialized_end=2957
|
|
42
|
+
_RESULTCODE._serialized_start=2959
|
|
43
|
+
_RESULTCODE._serialized_end=3024
|
|
44
|
+
_ROBOTSETTINGSCONFIG._serialized_start=118
|
|
45
|
+
_ROBOTSETTINGSCONFIG._serialized_end=472
|
|
46
|
+
_ACCOUNTSETTINGSCONFIG._serialized_start=474
|
|
47
|
+
_ACCOUNTSETTINGSCONFIG._serialized_end=591
|
|
48
|
+
_USERENTITLEMENTSCONFIG._serialized_start=593
|
|
49
|
+
_USERENTITLEMENTSCONFIG._serialized_end=671
|
|
50
|
+
_JDOC._serialized_start=673
|
|
51
|
+
_JDOC._serialized_end=764
|
|
52
|
+
_NAMEDJDOC._serialized_start=766
|
|
53
|
+
_NAMEDJDOC._serialized_end=889
|
|
54
|
+
_PULLJDOCSREQUEST._serialized_start=891
|
|
55
|
+
_PULLJDOCSREQUEST._serialized_end=971
|
|
56
|
+
_PULLJDOCSRESPONSE._serialized_start=974
|
|
57
|
+
_PULLJDOCSRESPONSE._serialized_end=1121
|
|
58
|
+
_UPDATESETTINGSREQUEST._serialized_start=1123
|
|
59
|
+
_UPDATESETTINGSREQUEST._serialized_end=1217
|
|
60
|
+
_UPDATESETTINGSRESPONSE._serialized_start=1220
|
|
61
|
+
_UPDATESETTINGSRESPONSE._serialized_end=1417
|
|
62
|
+
_UPDATEACCOUNTSETTINGSREQUEST._serialized_start=1419
|
|
63
|
+
_UPDATEACCOUNTSETTINGSREQUEST._serialized_end=1530
|
|
64
|
+
_UPDATEACCOUNTSETTINGSRESPONSE._serialized_start=1533
|
|
65
|
+
_UPDATEACCOUNTSETTINGSRESPONSE._serialized_end=1737
|
|
66
|
+
_UPDATEUSERENTITLEMENTSREQUEST._serialized_start=1739
|
|
67
|
+
_UPDATEUSERENTITLEMENTSREQUEST._serialized_end=1853
|
|
68
|
+
_UPDATEUSERENTITLEMENTSRESPONSE._serialized_start=1856
|
|
69
|
+
_UPDATEUSERENTITLEMENTSRESPONSE._serialized_end=2061
|
|
70
|
+
_JDOCSCHANGED._serialized_start=2063
|
|
71
|
+
_JDOCSCHANGED._serialized_end=2139
|
|
72
|
+
# @@protoc_insertion_point(module_scope)
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
|
+
# source: anki_vector/messaging/shared.proto
|
|
4
|
+
"""Generated protocol buffer code."""
|
|
5
|
+
from google.protobuf.internal import builder as _builder
|
|
6
|
+
from google.protobuf import descriptor as _descriptor
|
|
7
|
+
from google.protobuf import descriptor_pool as _descriptor_pool
|
|
8
|
+
from google.protobuf import symbol_database as _symbol_database
|
|
9
|
+
# @@protoc_insertion_point(imports)
|
|
10
|
+
|
|
11
|
+
_sym_db = _symbol_database.Default()
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
from anki_vector.messaging import behavior_pb2 as anki__vector_dot_messaging_dot_behavior__pb2
|
|
15
|
+
from anki_vector.messaging import cube_pb2 as anki__vector_dot_messaging_dot_cube__pb2
|
|
16
|
+
from anki_vector.messaging import alexa_pb2 as anki__vector_dot_messaging_dot_alexa__pb2
|
|
17
|
+
from anki_vector.messaging import messages_pb2 as anki__vector_dot_messaging_dot_messages__pb2
|
|
18
|
+
from anki_vector.messaging import settings_pb2 as anki__vector_dot_messaging_dot_settings__pb2
|
|
19
|
+
from anki_vector.messaging import extensions_pb2 as anki__vector_dot_messaging_dot_extensions__pb2
|
|
20
|
+
from anki_vector.messaging import response_status_pb2 as anki__vector_dot_messaging_dot_response__status__pb2
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\"anki_vector/messaging/shared.proto\x12\x1e\x41nki.Vector.external_interface\x1a$anki_vector/messaging/behavior.proto\x1a anki_vector/messaging/cube.proto\x1a!anki_vector/messaging/alexa.proto\x1a$anki_vector/messaging/messages.proto\x1a$anki_vector/messaging/settings.proto\x1a&anki_vector/messaging/extensions.proto\x1a+anki_vector/messaging/response_status.proto\"J\n\x16ProtocolVersionRequest\x12\x16\n\x0e\x63lient_version\x18\x01 \x01(\x03\x12\x18\n\x10min_host_version\x18\x02 \x01(\x03\"\xa7\x01\n\x17ProtocolVersionResponse\x12N\n\x06result\x18\x01 \x01(\x0e\x32>.Anki.Vector.external_interface.ProtocolVersionResponse.Result\x12\x14\n\x0chost_version\x18\x02 \x01(\x03\"&\n\x06Result\x12\x0f\n\x0bUNSUPPORTED\x10\x00\x12\x0b\n\x07SUCCESS\x10\x01\"h\n\x12\x43onnectionResponse\x12>\n\x06status\x18\x01 \x01(\x0b\x32..Anki.Vector.external_interface.ResponseStatus\x12\x12\n\nis_primary\x18\x02 \x01(\x08\"\xd1\x0e\n\x05\x45vent\x12P\n\x13time_stamped_status\x18\x01 \x01(\x0b\x32\x31.Anki.Vector.external_interface.TimeStampedStatusH\x00\x12=\n\twake_word\x18\x03 \x01(\x0b\x32(.Anki.Vector.external_interface.WakeWordH\x00\x12O\n\x12\x61ttention_transfer\x18\x04 \x01(\x0b\x32\x31.Anki.Vector.external_interface.AttentionTransferH\x00\x12P\n\x13robot_observed_face\x18\x05 \x01(\x0b\x32\x31.Anki.Vector.external_interface.RobotObservedFaceH\x00\x12\x64\n\x1erobot_changed_observed_face_id\x18\x06 \x01(\x0b\x32:.Anki.Vector.external_interface.RobotChangedObservedFaceIDH\x00\x12\x43\n\x0cobject_event\x18\x07 \x01(\x0b\x32+.Anki.Vector.external_interface.ObjectEventH\x00\x12K\n\x10stimulation_info\x18\x08 \x01(\x0b\x32/.Anki.Vector.external_interface.StimulationInfoH\x00\x12\x41\n\x0bphoto_taken\x18\t \x01(\x0b\x32*.Anki.Vector.external_interface.PhotoTakenH\x00\x12\x41\n\x0brobot_state\x18\n \x01(\x0b\x32*.Anki.Vector.external_interface.RobotStateH\x00\x12\x43\n\x0c\x63ube_battery\x18\x0b \x01(\x0b\x32+.Anki.Vector.external_interface.CubeBatteryH\x00\x12\x43\n\nkeep_alive\x18\x0c \x01(\x0b\x32-.Anki.Vector.external_interface.KeepAlivePingH\x00\x12Q\n\x13\x63onnection_response\x18\r \x01(\x0b\x32\x32.Anki.Vector.external_interface.ConnectionResponseH\x00\x12\x45\n\rjdocs_changed\x18\x0e \x01(\x0b\x32,.Anki.Vector.external_interface.JdocsChangedH\x00\x12J\n\x10\x61lexa_auth_event\x18\x0f \x01(\x0b\x32..Anki.Vector.external_interface.AlexaAuthEventH\x00\x12R\n\x14mirror_mode_disabled\x18\x10 \x01(\x0b\x32\x32.Anki.Vector.external_interface.MirrorModeDisabledH\x00\x12]\n\x1avision_modes_auto_disabled\x18\x11 \x01(\x0b\x32\x37.Anki.Vector.external_interface.VisionModesAutoDisabledH\x00\x12\x61\n\x1c\x63heck_update_status_response\x18\x12 \x01(\x0b\x32\x39.Anki.Vector.external_interface.CheckUpdateStatusResponseH\x00\x12\x41\n\x0buser_intent\x18\x13 \x01(\x0b\x32*.Anki.Vector.external_interface.UserIntentH\x00\x12T\n\x15robot_observed_motion\x18\x14 \x01(\x0b\x32\x33.Anki.Vector.external_interface.RobotObservedMotionH\x00\x12]\n\x1arobot_erased_enrolled_face\x18\x15 \x01(\x0b\x32\x37.Anki.Vector.external_interface.RobotErasedEnrolledFaceH\x00\x12_\n\x1brobot_renamed_enrolled_face\x18\x16 \x01(\x0b\x32\x38.Anki.Vector.external_interface.RobotRenamedEnrolledFaceH\x00\x12V\n\x16\x63\x61mera_settings_update\x18\x17 \x01(\x0b\x32\x34.Anki.Vector.external_interface.CameraSettingsUpdateH\x00\x12Q\n\x13unexpected_movement\x18\x18 \x01(\x0b\x32\x32.Anki.Vector.external_interface.UnexpectedMovementH\x00\x42\x0c\n\nevent_type\"\x1a\n\nFilterList\x12\x0c\n\x04list\x18\x01 \x03(\t\"\xb6\x01\n\x0c\x45ventRequest\x12@\n\nwhite_list\x18\x01 \x01(\x0b\x32*.Anki.Vector.external_interface.FilterListH\x00\x12@\n\nblack_list\x18\x02 \x01(\x0b\x32*.Anki.Vector.external_interface.FilterListH\x00\x12\x15\n\rconnection_id\x18\x03 \x01(\tB\x0b\n\tlist_type\"\x8b\x01\n\rEventResponse\x12>\n\x06status\x18\x01 \x01(\x0b\x32..Anki.Vector.external_interface.ResponseStatus\x12\x34\n\x05\x65vent\x18\x02 \x01(\x0b\x32%.Anki.Vector.external_interface.Event:\x04\x80\xa6\x1d\x01\"I\n\x19UserAuthenticationRequest\x12\x17\n\x0fuser_session_id\x18\x01 \x01(\x0c\x12\x13\n\x0b\x63lient_name\x18\x02 \x01(\x0c\"\xf0\x01\n\x1aUserAuthenticationResponse\x12>\n\x06status\x18\x01 \x01(\x0b\x32..Anki.Vector.external_interface.ResponseStatus\x12M\n\x04\x63ode\x18\x02 \x01(\x0e\x32?.Anki.Vector.external_interface.UserAuthenticationResponse.Code\x12\x19\n\x11\x63lient_token_guid\x18\x03 \x01(\x0c\"(\n\x04\x43ode\x12\x10\n\x0cUNAUTHORIZED\x10\x00\x12\x0e\n\nAUTHORIZED\x10\x01\x62\x06proto3')
|
|
24
|
+
|
|
25
|
+
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals())
|
|
26
|
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'anki_vector.messaging.shared_pb2', globals())
|
|
27
|
+
if _descriptor._USE_C_DESCRIPTORS == False:
|
|
28
|
+
|
|
29
|
+
DESCRIPTOR._options = None
|
|
30
|
+
_EVENTRESPONSE._options = None
|
|
31
|
+
_EVENTRESPONSE._serialized_options = b'\200\246\035\001'
|
|
32
|
+
_PROTOCOLVERSIONREQUEST._serialized_start=338
|
|
33
|
+
_PROTOCOLVERSIONREQUEST._serialized_end=412
|
|
34
|
+
_PROTOCOLVERSIONRESPONSE._serialized_start=415
|
|
35
|
+
_PROTOCOLVERSIONRESPONSE._serialized_end=582
|
|
36
|
+
_PROTOCOLVERSIONRESPONSE_RESULT._serialized_start=544
|
|
37
|
+
_PROTOCOLVERSIONRESPONSE_RESULT._serialized_end=582
|
|
38
|
+
_CONNECTIONRESPONSE._serialized_start=584
|
|
39
|
+
_CONNECTIONRESPONSE._serialized_end=688
|
|
40
|
+
_EVENT._serialized_start=691
|
|
41
|
+
_EVENT._serialized_end=2564
|
|
42
|
+
_FILTERLIST._serialized_start=2566
|
|
43
|
+
_FILTERLIST._serialized_end=2592
|
|
44
|
+
_EVENTREQUEST._serialized_start=2595
|
|
45
|
+
_EVENTREQUEST._serialized_end=2777
|
|
46
|
+
_EVENTRESPONSE._serialized_start=2780
|
|
47
|
+
_EVENTRESPONSE._serialized_end=2919
|
|
48
|
+
_USERAUTHENTICATIONREQUEST._serialized_start=2921
|
|
49
|
+
_USERAUTHENTICATIONREQUEST._serialized_end=2994
|
|
50
|
+
_USERAUTHENTICATIONRESPONSE._serialized_start=2997
|
|
51
|
+
_USERAUTHENTICATIONRESPONSE._serialized_end=3237
|
|
52
|
+
_USERAUTHENTICATIONRESPONSE_CODE._serialized_start=3197
|
|
53
|
+
_USERAUTHENTICATIONRESPONSE_CODE._serialized_end=3237
|
|
54
|
+
# @@protoc_insertion_point(module_scope)
|
anki_vector/motors.py
ADDED
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
# Copyright (c) 2018 Anki, Inc.
|
|
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 in the file LICENSE.txt or at
|
|
6
|
+
#
|
|
7
|
+
# https://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
|
+
Control the motors of Vector.
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
# __all__ should order by constants, event classes, other classes, functions.
|
|
20
|
+
__all__ = ['MotorComponent']
|
|
21
|
+
|
|
22
|
+
from . import connection, util
|
|
23
|
+
from .messaging import protocol
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
class MotorComponent(util.Component):
|
|
27
|
+
"""Controls the low-level motor functions."""
|
|
28
|
+
@connection.on_connection_thread()
|
|
29
|
+
async def set_wheel_motors(self,
|
|
30
|
+
left_wheel_speed: float,
|
|
31
|
+
right_wheel_speed: float,
|
|
32
|
+
left_wheel_accel: float = 0.0,
|
|
33
|
+
right_wheel_accel: float = 0.0):
|
|
34
|
+
"""Tell Vector to move his wheels / treads at a given speed.
|
|
35
|
+
|
|
36
|
+
The wheels will continue to move at that speed until commanded to drive
|
|
37
|
+
at a new speed, or if :meth:`stop_all_motors` is called.
|
|
38
|
+
|
|
39
|
+
To unlock the wheel track, call `set_wheel_motors(0, 0)`.
|
|
40
|
+
|
|
41
|
+
.. testcode::
|
|
42
|
+
|
|
43
|
+
import anki_vector
|
|
44
|
+
import time
|
|
45
|
+
|
|
46
|
+
with anki_vector.Robot() as robot:
|
|
47
|
+
robot.motors.set_wheel_motors(25, 50)
|
|
48
|
+
time.sleep(3.0)
|
|
49
|
+
|
|
50
|
+
:param left_wheel_speed: Speed of the left tread (in millimeters per second).
|
|
51
|
+
:param right_wheel_speed: Speed of the right tread (in millimeters per second).
|
|
52
|
+
:param left_wheel_accel: Acceleration of left tread (in millimeters per second squared)
|
|
53
|
+
``None`` value defaults this to the same as l_wheel_speed.
|
|
54
|
+
:param right_wheel_accel: Acceleration of right tread (in millimeters per second squared)
|
|
55
|
+
``None`` value defaults this to the same as r_wheel_speed.
|
|
56
|
+
"""
|
|
57
|
+
motors = protocol.DriveWheelsRequest(left_wheel_mmps=left_wheel_speed,
|
|
58
|
+
right_wheel_mmps=right_wheel_speed,
|
|
59
|
+
left_wheel_mmps2=left_wheel_accel,
|
|
60
|
+
right_wheel_mmps2=right_wheel_accel)
|
|
61
|
+
return await self.grpc_interface.DriveWheels(motors)
|
|
62
|
+
|
|
63
|
+
@connection.on_connection_thread()
|
|
64
|
+
async def set_head_motor(self,
|
|
65
|
+
speed: float):
|
|
66
|
+
"""Tell Vector's head motor to move with a certain speed.
|
|
67
|
+
|
|
68
|
+
Positive speed for up, negative speed for down. Measured in radians per second.
|
|
69
|
+
|
|
70
|
+
To unlock the head track, call `set_head_motor(0)`.
|
|
71
|
+
|
|
72
|
+
.. testcode::
|
|
73
|
+
|
|
74
|
+
import anki_vector
|
|
75
|
+
|
|
76
|
+
with anki_vector.Robot() as robot:
|
|
77
|
+
robot.motors.set_head_motor(-5.0)
|
|
78
|
+
|
|
79
|
+
:param speed: Motor speed for Vector's head, measured in radians per second.
|
|
80
|
+
"""
|
|
81
|
+
set_head_request = protocol.MoveHeadRequest(speed_rad_per_sec=speed)
|
|
82
|
+
return await self.grpc_interface.MoveHead(set_head_request)
|
|
83
|
+
|
|
84
|
+
@connection.on_connection_thread()
|
|
85
|
+
async def set_lift_motor(self,
|
|
86
|
+
speed: float):
|
|
87
|
+
"""Tell Vector's lift motor to move with a certain speed.
|
|
88
|
+
|
|
89
|
+
Positive speed for up, negative speed for down. Measured in radians per second.
|
|
90
|
+
|
|
91
|
+
To unlock the lift track, call `set_lift_motor(0)`.
|
|
92
|
+
|
|
93
|
+
.. testcode::
|
|
94
|
+
|
|
95
|
+
import anki_vector
|
|
96
|
+
import time
|
|
97
|
+
|
|
98
|
+
with anki_vector.Robot() as robot:
|
|
99
|
+
robot.motors.set_lift_motor(-5.0)
|
|
100
|
+
time.sleep(3.0)
|
|
101
|
+
robot.motors.set_lift_motor(5.0)
|
|
102
|
+
time.sleep(3.0)
|
|
103
|
+
|
|
104
|
+
:param speed: Motor speed for Vector's lift, measured in radians per second.
|
|
105
|
+
"""
|
|
106
|
+
set_lift_request = protocol.MoveLiftRequest(speed_rad_per_sec=speed)
|
|
107
|
+
return await self.grpc_interface.MoveLift(set_lift_request)
|
|
108
|
+
|
|
109
|
+
@connection.on_connection_thread()
|
|
110
|
+
async def stop_all_motors(self):
|
|
111
|
+
"""Tell Vector to stop all motors.
|
|
112
|
+
|
|
113
|
+
.. testcode::
|
|
114
|
+
|
|
115
|
+
import anki_vector
|
|
116
|
+
import time
|
|
117
|
+
|
|
118
|
+
with anki_vector.Robot() as robot:
|
|
119
|
+
robot.motors.set_wheel_motors(25, 50)
|
|
120
|
+
|
|
121
|
+
# wait a short time to observe the motors moving
|
|
122
|
+
time.sleep(0.5)
|
|
123
|
+
|
|
124
|
+
robot.motors.stop_all_motors()
|
|
125
|
+
"""
|
|
126
|
+
stop_all_motors_request = protocol.StopAllMotorsRequest()
|
|
127
|
+
return await self.grpc_interface.StopAllMotors(stop_all_motors_request)
|