Code Monkey home page Code Monkey logo

mm-python-api's People

Contributors

andreijianu avatar dmconover avatar francois-giguere avatar guirb-vention avatar jack-dundas avatar mlaunier avatar mohitpatel-vention avatar yassineelbouchaibi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

mm-python-api's Issues

Delay required after initializing MachineMotion object

When instantiating the MachineMotion object, I noticed an issue while using certain methods. It seems like there needs to be some delay added to properly initialize the object.

For example if I were to check if the IO expander is available (if connected to the controller) using isIoExpanderAvailable() without a delay, it will output false. If I add a 1 second delay (time.sleep(1)) in between and call the method again it will return true as expected:

code:
image

output:
image

I presume that it takes some time for for the object to initialize. We should add a delay right after the instantiation of the MachineMotion object.

[BUG] Python script continue even after Estop

MMv2, SW 2.4
in mm-config in Cloud9, statement "kill_python_apps_on_estop" is True (software and hardware reboot was performed)

When the modified example estop.py was run, Estop was triggered mid sequence, the script then continued where it left off even though it should not after the callback function was executed.

See image
chrome_dD2ZV3JIMp

resetSystem function is failing

We're using machine motion SDK to control a robot that takes pictures of pots in a greenhouse and we're having some trouble on a new computer. We had everything working but now whenever we run mm.resetSystem() we've gotten 2 different errors.

  1. No connection could not be made because the target machine actively refused it
    Image from iOS (1)

  2. Exception: System is still not ready after 10.0 seconds
    Image from iOS

It's also successfully gotten past the mm.resetSystem() but only occasionally and without rhyme or reason. Any ideas on how to debug this would be incredible because we're needing pictures from the robot ASAP.

Thanks!

[Python API] - Notes from synch

[ ] compare configHomingSpeed
[ ] Switch back MQTT
[ ] Switch back to a single file
[ ] _MachineMotion.py
[ ] remove configWizard
[ ] removeEncoderDistance
[ ] change emitSetAxisDirection - configAxisDirection

MQTT functions get stucked when called too early after MachineMotion object initialisation

The new move() method works as intended I believe.

As for the new eStop functions, I'm getting stuck in a infinite loop when trying to use them. Here is the console log whenever I try to call any of them:

Code(with debug comments):
image

Console:
image

It gets stuck when calling MQTTsubscribe.simple(); loops indefinitely.

Originally posted by @mohitpatel-vention in https://github.com/VentionCo/mm-vention-control/issues/476#issuecomment-572286567

Encoder returns 0 improperly

readEncoder() returns a variable saved to the mm object.
When mm is initialized, it initializes this variable to zero.
This variable is updated once mqtt publishes to the encoder topic.
Therefore, if the client tries to readEncoder before the encoder topic has been published to, it will wrongly return a value of 0. 0 represents the unitiliazed object rather than the actual encoder value

This can be fixed using "subscribe_simple" and asking for retained messages

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.