GithubHelp home page GithubHelp logo

python-sdk's People

Contributors

adam-misty avatar morgan-misty avatar prbarna avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

python-sdk's Issues

Registering for an event

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!

Speak API Updates?

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")

'type' object is not subscriptable

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.

Error: No module named mistyPy

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.