ventionco / mm-python-api Goto Github PK
View Code? Open in Web Editor NEWMachineMotion Python API
MachineMotion Python API
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:
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.
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.
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.
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!
[ ] compare configHomingSpeed
[ ] Switch back MQTT
[ ] Switch back to a single file
[ ] _MachineMotion.py
[ ] remove configWizard
[ ] removeEncoderDistance
[ ] change emitSetAxisDirection - configAxisDirection
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:
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
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
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.