-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BB9E - play_animation gives TimeoutError #5
Comments
Was the animation being played? If no, then I think BB-9E does not support that animation (or any animation at all). When I code this, I remember that animations on some droids are actually just a bunch of coordinated movements. Only R2-D2 and -Q5 are for sure equipped with a dedicated animation command, but I forgot whether BB-9E supports that dedicated animation command or just the former case. When I have time I will look into the code again. |
Thanks! The animation was not played but it also did not return "Animation cannot be play by this toy" like it did when I was using IntEnum the wrong way. The list of Animations(IntEnum) in toy/bb9e.py resembles expressions that are available in the official Droid app so I though that the sequence sits in the firmware and it is trigger by an app. If this is not the case I will try to reproduce these with |
This is frustrating when it comes to the BB8 model. It doesnt seem to run off the same code as the BB9E and enums for animation dont seem to be relevant although on the app they work just fine. |
I remember BB8's animation is just a bunch of movements hard-coded on the app side. Check the js file, inside it should have a mapping of an animation to a list of movements. |
Given BB8 and BB9E are so different, I wont be able to further test BB9E until I can get my hands on one. Updates have been made to the class if that helps. BB8 changes are in pull request |
I found this (I think) and this is going to be a while... but it WILL happen |
Hi, I have the same issue with R2-D2... Regards, Olivier |
@opasco What is the problem? |
when I call |
does any other command works? Can you try with sphero EDU app and see if it works? |
yes, the sounds and lights commands I tried work and the animation commands work fine with Sphero EDU. |
Ok, can you send the stack tract of the timeout error here? |
Sure:
|
thanks. can you post your entire code and uncomment this line? spherov2.py/spherov2/toy/__init__.py Line 76 in 2f11b4e
|
Here is my code:
And here is the output after uncommenting the line:
|
Ok I don't see anything particularly wrong... I don't have an R2D2 with me so I can't test. One thing you can try is to use b124fe0 this version. ( |
I actually get the same error after installing version 0.8.2 |
Okay, then I suspect it's model issue, because I knew 0.8.2 was working. You said it works with the Edu App, which is very peculiar. I don't know if you can debug it by yourself, but it looks like your R2-D2 just straight up not accepting the command. |
Any guidance on how I could debug it? |
one thing you could try doing is to have a BLE packet debugger/interceptor on a Android device, and compare it to the packets sent by python. |
I played around with basic movement and LEDs and all work great.
However, I wanted to test build-in animations and
play_animation()
gives me TimeoutError().I don't see
play_animation()
in the documentation so I'm not sure if this is really implemented and if it works how I understand it.Any help would be greatly appreciated.
droid.play_animation(toy.Animations.WWM_SCARED) File "C:\ProgramData\Anaconda3\lib\site-packages\spherov2\sphero_edu.py", line 285, in play_animation ToyUtil.play_animation(self.__toy, animation, True) File "C:\ProgramData\Anaconda3\lib\site-packages\spherov2\utils.py", line 93, in play_animation toy.play_animation(animation, wait) File "C:\ProgramData\Anaconda3\lib\site-packages\spherov2\commands\animatronic.py", line 28, in play_animation toy._execute(Animatronic._encode(toy, 5, proc, to_bytes(animation, 2))) File "C:\ProgramData\Anaconda3\lib\site-packages\spherov2\toy\__init__.py", line 85, in _execute return self._wait_packet(packet.id) File "C:\ProgramData\Anaconda3\lib\site-packages\spherov2\toy\__init__.py", line 90, in _wait_packet packet = future.result(timeout) File "C:\ProgramData\Anaconda3\lib\concurrent\futures\_base.py", line 441, in result raise TimeoutError() concurrent.futures._base.TimeoutError
The text was updated successfully, but these errors were encountered: