rirze / mirobot-py

A Python interface library for WLkata's Mirobot
https://rirze.github.io/mirobot-py/
MIT License
24 stars 9 forks source link
mirobot python3 robotics wlkata

mirobot

DEPRECIATED NOTICE

Use https://github.com/mushroom-x/wlkata-mirobot-python/ if you want a functional Python library to use with your Mirobot.

A detailed explanation of why I won't maintain this project anymore: https://github.com/rirze/mirobot-py/issues/23#issuecomment-1572466514

Description

mirobot is a python module that can be used to control the WLkata Mirobot

Mirobot

This library uses the G code protocol to communicate with the Mirobot over a serial connection. The official G code instruction set and driver download for the Mirobot can be found at the WLkata Download Page

Installation

mirobot requires Python >= 3.6. Use pip3 to install it:

pip3 install mirobot-py

Make sure to not install the mirobot package-- that package is unrelated to this one.

Example Usage

from mirobot import Mirobot

with Mirobot(portname='COM3', debug=True) as m:
    m.home_individual()

    m.go_to_zero()

And that's it! Now if you want to save keystrokes, here's a even more minimal version:

from mirobot import Mirobot

with Mirobot() as m:
    m.home_simultaneous()

The Mirobot class can detect existing open serial ports and "guess" which one to use as the Mirobot. There's no need to specify a portname for most cases!

Documentation

Many of the functions and structures in this library are documented. The documentation is hosted here. If anything is unclear in the docs, please open a Github issue.

Differences from source repository

Credits

Big thanks to Mattew Wachter for laying down the framework for this library-- please check out his links below:

Matthew Wachter

VT Pro Design

Reasons to fork (and not merge upstream)

While based of the same code initially, this repository has developed in a different direction with opinionated views on how one should use a robotics library. Specifically, there is the problem of 'output' when operating a gcode-programmed machine like Mirobot.

In the end, while developing this approach to error responsibility, I realized that this would probably not suit everyone's needs-- sometimes people just want a live feed of output. That is why I think Matthew's continued work would be great for the community. I don't want this repository and its beliefs to consume another. I also do not see a way to combine both approaches-- they are inherently incompatible at the core level.

It is my belief that people who are looking to do significant scripting and logic-testing routines will benefit greatly from this library. People who are looking to use a CLI-friendly framework should instead use Matthew's py-mirobot library.

License

License: MIT https://github.com/rirze/mirobot-py/issues/23#issuecomment-1572466514