Makeblock-official / mDrawBot

mDrawbot is a four-in-one drawing robotic kit, you can assembly into 4 different configuration drawing robots, learn more from Makeblock official website

Home Page:http://www.makeblock.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Installing mDraw on Linux/Ubuntu

Buitani opened this issue · comments

How to install the mDraw Software on Ubuntu?

What I did so far.

  1. Downloaded the mDraw Zip from Github

  2. Installed Python

    sudo apt-get install python

  3. Went to the mDrawGui Directory

  4. Didnt know which file to start with python. But it looks like I found the right one. This (almost) works for me:

    python robot_gui.py

The mDraw Software starts and it looks fine. But I have following problem. Opening svg files doesnt work right. When I go to a folder with svg files, it doesnt show any files. When I write the filename it opens the file

yes, maybe you have to run it from source code for now, and update firmware by arduino ide

How do I do that? How do I run the software from source code?

@Buitani This is what you just did.
@Makeblock-official any starting point you would recommend about linux and arduino?

I have been working on this and have a way of running the source code, but I'm still working out all the issues on Linux. Firmware upload works, but connection is sporadic due to the line endings. I've written a test to prove why the connection sometimes worked, just need to update the original code

When will a Linux Package be available? I have the Kit since a week now, robot is built but of no use as I only run Ubuntu on my Computers...
Open Source Software should always be available for all three Platforms, Linux at first, as it is the only Open source operating System of the three!

I will be glad to test if you can provide any package!

I've added the necessary code but its not currently built into a package, the svg opening issue is still there, but it runs. I've only tested the eggbot, but I don't see what the difference would be in the other modes.

To open SVG's in Linux replace the following line in robot_gui.py
from:
filename = str(QtGui.QFileDialog.getOpenFileName(self, 'Open Svg/Bmp', '', ".svg;.bmp(.svg;.bmp)").toUtf8())
to:
filename = str(QtGui.QFileDialog.getOpenFileName(self, 'Open Svg/Bmp', '', ".svg(*.svg)").toUtf8())

Hi there,

since the software got updated there is no robot_gui.py in the mDrawGui Folder.

Which ist the correct file to run mDraw?

I did run RobotUtils.py with

python RobotUtils.py

Nothing happend.

I did run mDraw.Gui with

python mDraw.Gui

and got following message:

Traceback (most recent call last):
File "mDraw.py", line 5, in
import SvgParser
File " /mdrawbot/mDrawGui/SvgParser.py", line 5, in
from PyQt5.QtGui import*
ImportError: No module named PyQt5.QtGui

I'm using python3 mDrawGui/mDraw.py to start mDraw.

You also need to install python-qt5.

Hi meeuw,

thank you for your reply. Now I installed python-qt5 and tried to start mDraw with

python3 mDraw.py

I got following message:

Traceback (most recent call last):
File "mDraw.py", line 4, in
import SerialCom
/mdrawbot/mDrawGui/SerialCom.py", line 4, in
import serial
ImportError: No module named 'serial'

You might have guessed it, you should install pyserial for the serial module.

You were right. I had modules for python installed but not for phyton3. Now I installed the missing modules and mDraw is working. (Sometimes it crashes, but mostly its working)

Opening files looks a little bit strange, because background is in dark grey and the fonts are black, so its hard to read.

Also I still have that problem with the laser which I also reported here #22. mSacra moves ridiculous fast when changing delay. (Even faster like fastest speed possible in the speed setup) I dont know if its a problem with mDraw in general or just with linux/ubuntu. Result: I cant do anything productive with the laser.

I am unable to get it working but at some point I got this in console output:

Exception in thread Thread-2:
Traceback (most recent call last):
  File "/usr/lib/python3.5/threading.py", line 914, in _bootstrap_inner
    self.run()
  File "/home/user/mDrawBot/mDrawGui/SerialCom.py", line 49, in run
    l = self.ser.readline().decode('utf-8')
  File "/home/user/.local/lib/python3.5/site-packages/serial/serialposix.py", line 493, in read
    buf = os.read(self.fd, size - len(read))
TypeError: an integer is required (got type NoneType)

Does anybody has any idea whether these issue could be related?

Hi @alexanderadam I'm guessing here but do you have the right permission to your serial port? Which device in /dev are you using and what are the permissions for this device file?

I'm starting it with sudo rights at the moment… 😒
But I got to a printing state now (but I see this exception sometimes anyway).

Package needed:
$ sudo apt install python3-pyqt5 python3-pyqt5.qtsvg python3-serial
$ python3 mDrawGui/mDraw.py

Hi @alexanderadam I'm guessing here but do you have the right permission to your serial port? Which device in /dev are you using and what are the permissions for this device file?

You need to be in the dialout group:

sudo usermod -G dialout <login>

Package needed:
$ sudo apt install python3-pyqt5 python3-pyqt5.qtsvg python3-serial
$ python3 mDrawGui/mDraw.py

And package python3-tk in case it was not installed...

@matthieu-labas I can't check anymore. I wrote about this issue nearly two years ago and I'm not actively using it anymore at the moment. I also upgraded my installation in the meantime so it could be that things changed anyway. 😉