diff --git a/README.md b/README.md index 61ffc0d..80d51ca 100644 --- a/README.md +++ b/README.md @@ -1,42 +1,20 @@ # Vector - Python SDK -This is a fork of the original Anki Vector Python SDK. -Since Anki is down and no longer supporting the SDK and the new owner [DDL](https://www.digitaldreamlabs.com/) is more likely working on firmware updates at the moment, -I just started this fork as an unofficial version to keep things running for now. +This is a fork of a fork of the original Anki Vector Python SDK. +Extremely unofficial and it's just to keep my Vector alive according to my taste. -![Vector](docs/source/images/vector-sdk-alpha.jpg) +## Quick install -Learn more about Vector: https://www.anki.com/en-us/vector +```sh +git clone git@github.com:kingardor/vector-python-sdk.git -Learn more about how Vector works: [Vector Bible](https://github.com/GooeyChickenman/victor/blob/master/documentation/Vector-TRM.pdf) +git submodule update --init --recursive -SDK documentation: https://vector.ikkez.de/ +pip3 install -r requirements.txt -Forums: https://forums.anki.com/ +python setup.py install -Discord: https://discord.gg/ue6v2Z +pip3 uninstall protobuf - -## Getting Started - -You can follow steps [here](https://developer.anki.com/vector/docs/index.html) to set up your Vector robot with the SDK. - -To install his SDK fork run: - -``` -pip uninstall anki_vector -pip install ikkez_vector -``` - -Upgrade with -``` -pip install ikkez_vector --upgrade -``` - -### Changelog - -To see all changes and updates being made to the SDK, please go to [Releases](https://github.com/ikkez/vector-python-sdk/releases) - -## Privacy Policy and Terms and Conditions - -Use of Vector and the Vector SDK is subject to Anki's [Privacy Policy](https://www.anki.com/en-us/company/privacy) and [Terms and Conditions](https://www.anki.com/en-us/company/terms-and-conditions). +pip3 install protobuf==3.20 +``` \ No newline at end of file diff --git a/anki_vector/connection.py b/anki_vector/connection.py index 9dce36f..b4b5e57 100644 --- a/anki_vector/connection.py +++ b/anki_vector/connection.py @@ -75,9 +75,9 @@ class _ControlEventManager: """ def __init__(self, loop: asyncio.BaseEventLoop = None, priority: ControlPriorityLevel = None): - self._granted_event = asyncio.Event(loop=loop) - self._lost_event = asyncio.Event(loop=loop) - self._request_event = asyncio.Event(loop=loop) + self._granted_event = asyncio.Event() + self._lost_event = asyncio.Event() + self._request_event = asyncio.Event() self._has_control = False self._priority = priority self._is_shutdown = False @@ -614,10 +614,10 @@ async def play_animation(): self._control_events.shutdown() # need to wait until all Futures were cancled before going on, # otherwise python 3.8+ will raise alot of CancelledErrors and - time.sleep(2) if self._control_stream_task: self._control_stream_task.cancel() - self.run_coroutine(self._control_stream_task).result() + # self.run_coroutine(self._control_stream_task).result() + asyncio.gather(self._control_stream_task, return_exceptions=True) self._cancel_active() if self._channel: self.run_coroutine(self._channel.close()).result() diff --git a/anki_vector/events.py b/anki_vector/events.py index 6d3e975..ebe818f 100644 --- a/anki_vector/events.py +++ b/anki_vector/events.py @@ -134,7 +134,7 @@ def _run_thread(self): try: self._loop = asyncio.new_event_loop() asyncio.set_event_loop(self._loop) - self._done_signal = asyncio.Event(loop=self._loop) + self._done_signal = asyncio.Event() # create an event stream handler on the connection thread self.event_future = asyncio.run_coroutine_threadsafe(self._handle_event_stream(), self._conn.loop) diff --git a/docs/source/downloads.rst b/docs/source/downloads.rst index 5f6f604..6f1ae02 100644 --- a/docs/source/downloads.rst +++ b/docs/source/downloads.rst @@ -16,7 +16,7 @@ Download Python example scripts that use the Vector SDK. GitHub ------ -Clone, fork, or report issues on the `GitHub vector-python-sdk repository `_. +Clone, fork, or report issues on the `GitHub vector-python-sdk repository `_. ---- diff --git a/docs/source/install-linux.rst b/docs/source/install-linux.rst index ec64e3a..8b7a1bb 100644 --- a/docs/source/install-linux.rst +++ b/docs/source/install-linux.rst @@ -52,7 +52,7 @@ SDK Installation To install the SDK, type the following into the Terminal window:: - python3 -m pip install --user ikkez_vector + python3 -m pip install --user kingardor_vector """"""""""" SDK Upgrade @@ -60,7 +60,7 @@ SDK Upgrade To upgrade the SDK from a previous install, enter this command:: - python3 -m pip install --user --upgrade ikkez_vector + python3 -m pip install --user --upgrade kingardor_vector ^^^^^^^^^^^^^^^^^^^^^ Vector Authentication diff --git a/docs/source/install-macos.rst b/docs/source/install-macos.rst index 4653d35..fd4ff2e 100644 --- a/docs/source/install-macos.rst +++ b/docs/source/install-macos.rst @@ -39,7 +39,7 @@ SDK Installation To install the SDK, type the following into the Terminal window:: - python3 -m pip install --user ikkez_vector + python3 -m pip install --user kingardor_vector """"""""""" SDK Upgrade @@ -47,7 +47,7 @@ SDK Upgrade To upgrade the SDK from a previous install, enter this command:: - python3 -m pip install --user --upgrade ikkez_vector + python3 -m pip install --user --upgrade kingardor_vector ^^^^^^^^^^^^^^^^^^^^^ Vector Authentication diff --git a/docs/source/install-windows.rst b/docs/source/install-windows.rst index ac534d0..e876b7e 100644 --- a/docs/source/install-windows.rst +++ b/docs/source/install-windows.rst @@ -33,7 +33,7 @@ SDK Installation To install the SDK, type the following into the Command Prompt window:: - py -3 -m pip install --user ikkez_vector + py -3 -m pip install --user kingardor_vector .. note:: If you encounter an error during SDK installation, you may need to upgrade your pip install. Try ``python -m pip install --upgrade pip`` or ``py -3 -m pip install --upgrade pip`` @@ -45,7 +45,7 @@ SDK Upgrade To upgrade the SDK from a previous install, enter this command:: - py -3 -m pip install --user --upgrade ikkez_vector + py -3 -m pip install --user --upgrade kingardor_vector ^^^^^^^^^^^^^^^^^^^^^ Vector Authentication diff --git a/examples/tutorials/01_hello_world.py b/examples/tutorials/01_hello_world.py index 322d87d..456ec28 100755 --- a/examples/tutorials/01_hello_world.py +++ b/examples/tutorials/01_hello_world.py @@ -24,7 +24,11 @@ def main(): args = anki_vector.util.parse_command_args() - with anki_vector.Robot(args.serial) as robot: + with anki_vector.Robot( + args.serial, + behavior_activation_timeout=30.0, + cache_animation_lists=False + ) as robot: print("Say 'Hello World'...") robot.behavior.say_text("Hello World") diff --git a/setup.py b/setup.py index 9f43715..ca2c4f2 100644 --- a/setup.py +++ b/setup.py @@ -53,11 +53,11 @@ def get_requirements(): return reqs setup( - name='ikkez_vector', + name='kingardor_vector', version=VERSION, description="The Vector SDK is a connected vision- and character-based robotics platform for everyone.", long_description=__doc__, - url='https://github.com/ikkez/vector-python-sdk', + url='https://github.com/kingardor/vector-python-sdk', author='Anki, Inc', author_email='developer@anki.com', license='Apache License, Version 2.0',