mistycommunity / python-sdk Goto Github PK
View Code? Open in Web Editor NEWLicense: Apache License 2.0
License: Apache License 2.0
Hi,
I'm trying to use the .Speak functionality. I see it's listed as alpha in the API, and when I run .Speak() I get pure silence. Is this unfinished functionality, or am I doing something incorrectly? Here's my code for this. I have tried setting default volume to 100, too, without much luck.
from mistyPy.Robot import Robot
if __name__ == "__main__":
ip_address = "YourIPWillBeDifferentThanMine"
misty = Robot(ip_address)
misty.Speak("Hello World")
Hello, Thanks for providing the Python SDK. I tried to use it. I am able to do basic things such as change LED, moveArms, etc… However, I am having problem with successful registering to events. As an example, I tried to register to the IMU Event Type as shown below. But I am not getting any data back even after waiting for a long time. Please see a sample below.
************* RUN-able code after entering the right IP address ************
from mistyPy.Robot import Robot
from mistyPy.Events import Events
from mistyPy.EventFilters import EventFilters
if name == “main”:
try:
# First create the robot object
ip_address = “xx.xx.xx.xx”
misty = Robot(ip_address)
_Data = misty.RegisterEvent(event_name="IMU_data", event_type=Events.IMU)
print(misty.active_event_registrations)
print(_Data.data)
print(_Data.event_name)
print(_Data.event_type)
print(_Data.is_active)
print(_Data.data["message"])
misty.KeepAlive()
except Exception as ex:
print(ex)
finally:
# Unregister events if they aren't all unregistered due to an error
misty.UnregisterAllEvents()
The result from the print() statements is as below.
{‘IMU_data’: <mistyPy.Events.Event object at 0x00000256BE942B20>}
{‘status’: ‘Not_Subscribed or just waiting for data’}
None
IMU
True
‘message’
If I am understanding it correctly, the registration to the IMU event type is active (per the first print() statement result). Then in the next statement, it says ‘Not subscribed or waiting for data’. I have tried waiting for a very long time (~10minutes or so) and I don’t see any data coming back. For _Data.event_name, I was expecting “IMU_data” but it is giving me None… Lastly, I don’t see the desired results in _Data.data["message].
I would really appreciate any help here. Thanks!
Hi,
I followed the instructions and installed all packages as mentioned in Readme and then I tried to run the example_first_skill.py in the Examples folder. I could not get any farther then the error: No module named mistyPy. I have the following environment.
OS: Windows 10
Using Anaconda environment, I have the following packages installed:
mistypy: 0.0.4
misty-sdk: 0.1.1
python 3.8.10
requests 2.25.1
websocket-client 0.52
yapf 0.31
jupyter notebook
Any advice would be helpul.
Thanks,
Prabhjot
Has there been any updates to python SDK ? I only see code from years ago. I would like to use Misty for my project but I know python well but the current SDK is very limited.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.