I say 'we' because the robot and I are a partnership now.
I can't realise my artistic dreams without it and it can't operate without my drawings.
I nailed the drawing size issue (pulley size was set wrong so they weren't rotating enough, so the pen didn't move as far as it was supposed to)
I re-measured the wall for the 5th time and got another set of numbers (the correct ones)
I fed the robot the G code of my face and it worked really well. (Of course)
THEN I figured it was time to do some actual drawings instead of my face.
SO in Inkscape I converted some drawings to vectors and simplified the paths so there's slightly less lines to draw. The images are saved as .dxf (Drawing Interchange Format), then opened in the drawbot app on my Linux machine, converted to G code, saved as .ngc.
Then I can open the .ngc file in the drawbot app on my windows netbook which is connected to the robot. It's a terribly messy work around but until I can get Linux to see the robot in the java app that's how it goes. Ideally the drawbot app on the netbook should just take the .ngc, convert it to G code and draw.
I set the robot to draw A1 size, double checked it knew where the paper ended (so I don't draw on the wall) Everything was looking good so I hit the draw button. Then shit got weird. It was supposed to be drawing a circle but it clearly wasn't. The app keeps track of where it's at with the drawing and it wasn't matching up to what was happening on the wall. I stopped the drawing, double checked all the measurements in the drawbot app and gave it a different image. It drew the outline of the image correctly but when filling in the detail it was all over the show.
Naturally I thought the computer has just spat out some dodgy G Code, no problem. I can generate some more. After all, the files have been through a few conversions; .XCF > .PNG > .DXF > .NGC. So I re-set the robot and fed it the G code of my face, knowing that it has drawn from that code before with no issues. Annnnd that's where the logic ended. Robot ended up drawing my face stretched horizontally, then it decided that its 'home' point was at the bottom of the wall, not the centre where I set it to.
At this point I've got no idea what the fuck it's up to, given I haven't changed anything other than paper size. I'm going to re-flash the Arduino with the drawbot firmware and give it another go tomorrow. There is no logical reason this will work given I didn't alter anything important. But with windows you never know.
I'll also continue working on getting the setup to run under Linux. This is where I'm at:
The Arduino IDE under Linux can see the robot but the java based drawbot app can't. (Even if I run the app as root) I think it's something to do with serial port permissions under Linux.
- added myself to the dialout group via the cmd sudo usermod -a -G dialout SSS (enabling root access to serial ports)
- Removed the cautious-launch command from Java so I can run the java drawbot app.
For now I'm just trying to get my main computer to pick up the Arduino in the java app, when it does I will re-create the setup on an old laptop. The robot will never run under Linux on the netbook because the HDD is formatted as NTFS in order to dual boot with windows. Linux won't run a java app when the HDD file system is NTFS for security reasons that Google says can't be bypassed. Linux file systems are typically formatted to ext3 or ext4. Not a lot would give me more pleasure than removing the windows partition for good but it does come in handy twice a year. (Also borrowing a laptop to test something in windows means using windows 10 and I struggle to even find the control panel)
In the long run it's important for me to get the drawbot running solely on Linux as I'm strongly against closed source computing. What's the point of creating an entirely open source robot but it has to run through windows? The only reason I keep a small windows partition on my netbook is for testing things like powerpoint presentations which don't always port over from Linux well (which I have to use at art school occasionally)
End goal is to return to this: