News

Friday Facts 2: Makelangelo Java GUI

This last week there has been work on Makelangelo software to make it work with the new firmware.

I spent a lot of time using design patterns to decouple classes so they can be independently tested. Usually this means an Observer pattern common in Java: a visible Panel on the screen has a list of registered Listeners and when something interesting happens in the Panel it calls notifyListeners(interestingEvent). This way Panel can be run and tested without needing any specific Listener.

A single sub-panel

I’d like to change up the code for a MakelangeloRobot to be decoupled from the NetworkSession – the source of data from the real machine. Then data could come from, say, a piece of code reading from a file. That way the state of the machine could be recorded and played back for testing things like “is the machine connecting to you a Makelangelo 5, a 3, a 2, or something else?”

I’m also plagued by ideas about how a Turtle path is used by a MakelangeloRobot. Turtle is a class that contains TurtleMoves, which describe the movement of the pen over the paper. One Turtle per color! Based on the old Commdore 64 turtle, one of the first procedural drawing programs I used as a kid.

Many classes in the Makelangelo app read and manipulate the history of TurtleMoves in a Turtle.

Drawing speed vs quality testing

In a cartesian plotter the velocity, acceleration, and jerk have the same effect everywhere across the work area. Testing such a machine to find ideal speeds is not onerous. I would draw a grid of squares and on the x axis each square would have more velocity while on the y axis each square would have greater acceleration. In this way the sweet spot is easy enough to find.

In a polargraph plotter the challenge is much greater. What works at the top doesn’t work at the bottom, what works in the center might not work on the sides. Simply drawing a set of squares isn’t enough! Long story short I need your help to find the sweetest of sweet spots. Together we can do it. Right? Right??

Spiral improvements

before
after

…and that’s all I have to say about that.

Final thoughts

These changes can be downloaded from the Makelangelo project on Github.

Did you know you can add bars to your timing belt? I didn’t.

Join our Discord to talk more about this post.

Makelangelo News Robot Arm

Friday Facts 1: Sixi 3 update

This week I worked on the Sixi 3 arm quite a lot.

Coding

Monday, I made a new tool to talk to my robots. Arduino Serial monitor is all well and good but I needed more features and some color coding.

Sixi 3

Tuesday I tackled a problem with the base of the robot. When I designed the first version it seemed fine! Then I tried to drive it while in a Zoom meeting for the Vancouver Robotics Club and discovered that at the right spot the base and the J1 actuator collide.

Whoops. So I designed and 3D printed a new base…

…which didn’t work! The screws to attach the base to the board could not be accessed after the base was on the J0 gearbox. No tool clearance is bad! Taking the whole robot off the board just to fix J0 is bad! So that went in the recycling and I tried again.

That worked much better!

The screws that go on an angle through the top and bottom halves of the base need a nut. The nut can’t turn. I could make a really tight slot that the nut barely fits into… but then how do i get the nut out later? My solution is these nut holding tools. They fit snugly, prevent the nut from turning, and give me a convenient handle to grab with pliers when I need to pull them out. A gift to my future self!

Makelangelo 5

As you know from the previous post, there’s a new firmware coming that is faster, smoother, and much more friendly to all they DIY people out there. Much of this week has been talking with people on Discord, showing them how to set up their custom versions. In short,

  • Install the apps mentioned in https://mcr.dozuki.com/Guide/How+to+upload+Makelangelo-firmware+from+Windows+(2021+)/33?lang=en
  • Get the firmware currently at https://github.com/i-make-robots/Marlin-polargraph
  • read Marlin/Configuration.h and change where needed for your board, your drivers, your LCD.
  • For size changes and more advanced stuff, come talk with us!

I’ve also filmed raw footage about how to use 3M hooks to put a Makelangelo on a flat wall. Some people don’t like the suction cups or they don’t have a big window. No problem! Subscribe to my Youtube channel and watch for the announcement.

Makelangelo

Makelangelo software 7.26.0 beta

This Makelangelo software 7.26.0 beta release brings several changes that should improve drawings and quality of life. It is a pre-release for the very brave. If you do try it then please come to our Discord, introduce yourself, and tell us about the experience so we can make it better.

All new firmware

Before Marginally Clever Robots was even conceived I was learning to move motors with Arduino. As time went on 3D printers arrived and the Marlin firmware in my Prusa printers got really really good. So good, in fact, that I make a fork of the Marlin 2.0.9.1 code and taught it to run a Makelangelo 5 robot. It is smoother, faster, and it means going forward I will have more time to do the things Marginally Clever Robots is good at.

Firmware update tool for Windows

Built into the Makelangelo app is a new firmware update tool. Your robot must be on and connected via USB cable. The app should not be connected to the robot yet.

  • avrDude path: is the location of the windows tool that uploads the .hex file to your robot. A copy has been included in this release. If you have Arduino software installed it will try to use that instead.
  • *.hex file: is the file to upload. This release includes a file called firmware-2021-09-10.hex.
  • Port: is the COM port your robot appears on when USB connected.
  • Refresh: will update the COM port list if you add/remove a robot.
  • Start: will initiate the upload process. It can take up to 2 minutes.

Sending code to the robot

The correct way to send a file to the robot is to use Makelangelo > Save to File/SD card. Save the *.gcode file to your SD card (included with the robot) and run your code from the robot.

Quality of Life

I want to separate the “make art” part of the app from the “drive robot” part of the app. You will find new top level menu items for all art stuff, and the right hand panel is for driving-only.

They are as follows:

  • Makelangelo > New: start over
  • Makelangelo > Open File: open an image file and begin converting it to lines.
  • Generate Art: The name hasn’t changed, only the location. The artwork does not “stack” – a new creation will replace the old one.
  • Art Pipeline: This might be renamed later to “tools”. It includes things like scaling, flipping, and the Simplify and Reorder actions. Until now every image loaded automatically ran simplify and reorder, even if you were not done experimenting with your image conversion. Now you must do it explicitly. Take note of your estimated drawing time, it will often drop by large amounts!

Final thoughts

This release does not respond to connect + drive commands. It tries to connect, does not recognize the new firmware, and then never unlocks the driving buttons. At this time I want to gauge your feelings about the new firmware and the quality of life changes.

The tool works in Windows only. It should make life easier for 99% of the artists out there. The firmware upload tool is only designed for the Makelangelo 5 robot.

This version of the Makelangelo Software app is written for Java 15. Get Java SE 15 here.

For the rest of you… please come to our Discord, introduce yourself, and we’ll figure it out together!

News

ROS 2021: intimidating and unfriendly

ROS on Windows is a needlessly difficult process. Read on for tips and thoughts.

For added fun, make it a drinking game! Every time something seems stupid, if it makes you lol, if you breath extra hard through your nose, or shake your head, take a sip. Maybe bring the whole bottle because you will be refilling and quite drunk by the end.

Installing ROS

The first place to go is https://www.ros.org/install/ . I chose “Get ROS Foxy Fitzroy on Ubuntu Linux, macOS, or Windows 10”, which leads to https://docs.ros.org/en/foxy/Installation.html . Already I’m having my doubts – where any other program would just download a windows installed and do the job, this thing wants you to start reading install documentation. I chose Binary Packages > Windows, because maybe it’s just one more click away. Nope!

The installer that should do all of that doesn’t exist? FINE, I’ll do it myself.

So how bad is installing Chocolatey?

Take a moment to find the install button. Notice how they seem to care more about why you should install than getting you installed. This is because they need you to really want it so that you will fight through the next steps, a masterpiece of understated comedy.

I came here to install, not subscribe to your newsletter.

The average person has already said “nope” and quit. But I’m in it for the lulz, I guess, so let’s see. I guess I’m an individual, so let’s pop open that administrative shell… Lenovo has a howto … and disable security on my Windows to get this thing in, always a good idea…

5. If you don’t see any errors, you are ready to use Chocolatey! Type choco or choco -? now, or see Getting Started for usage instructions.

What does “no errors” look like?

So friendly! Now keep that powershell open because the next steps (remember, the next steps? We were installing ROS) will want it.

Install Python and Visual C++ Redistributables

Actually, this was copy + paste + wait and not terrible. Not great, but not painful. Leave that powershell open for later.

Installing OpenSSL

The instructions are clear, here. The page I’m sent to looks like Geocities 1995. It looks like the emails Rachel in marketing sends, reply all, marked important. Super trustworthy.

Why would anyone need a screenshot of the installer? Who does that?

I’ve highlighted the link you’re looking for. Finally! A real installer! Wow! I bet when that was built they felt ahead of their time. Anyways, now it’s back to the ROS install steps. Which one are we on now, 203? 206?

But wait, there’s more!

Oh, apparently OpenSSL doesn’t install everything it should because reasons. They say I have to add something to the PATH variable, which is the Windows version of a vestigial organ, like a hindbrain or an appendix.

Leave this window open because we’ll be back!

Install Visual Studio 2019

Well…. no. I already have Visual Studio Code, which has a ROS extension.

Why do they call it visual studio? There’s no Auditory Studio. there’s no Tactile Studio. It doesn’t let me edit pictures, I can’t even embed meme gifs as method names. What marketing team came up with this? Was it the least garbage name still available?

Install additional DDS implementations (optional)

Since I have no idea what this means, I’m skipping it. A single sentence explanation would have been nice.

Install OpenCV and dependencies

Apparently OpenCV isn’t strictly necessary, and I’ll err on the side of caution and put it in anyways.

Next they want me to install cmake. So I’m using one installer to install another installer because nobody wants to play nice with a Windows installer. It’s starting to feel like robotics is hard because somebody wants it to be hard.

What’s next?

Please download these packages from this GitHub repository.

– asio.1.12.1.nupkg

– bullet.2.89.0.nupkg

– cunit.2.1.3.nupkg

– eigen-3.3.4.nupkg

– tinyxml-usestl.2.6.2.nupkg

– tinyxml2.6.0.0.nupkg

– log4cxx.0.10.0.nupkg

The page at the link has eight packages and you only need seven. Also the “download source” will not help you get all of them in a single click, because that would be against the ethos. That being the ethos set by people fired from the department of motor vehicles for being too frustrating.

Python problems

The instructions say to use powershell and paste this:

python -m pip install -U catkin_pkg cryptography empy ifcfg lark-parser lxml netifaces numpy opencv-python pyparsing pyyaml setuptools rosdistro

python cannot be found because it is not in the PATH variable. Rather than touch PATH again, I changed the start of the line to say c:\phython38\python -m… which worked better. And by better I mean a screaming red page of angry text.

Oh, so all of that was caused because something called pip was out of date? Why wasn’t it upgraded to the latest when I installed? I have to do it manually? Fine. c:\python38\python -m pip install –upgrade pip. After that I was able to run the previous command again and get a full install. Note that there were warnings in white text mixed into the other no-problem white text. If you don’t see the warnings do you have to worry about them?

Back to dependencies

“You agreed to having a pineapple put up your butt, but now I need you to confirm you also want lube.”

I hope you still have that PATH editor open, coz you still need it here! The instructions say I need to add C:\Program Files (x86)\GraphvizX.XX\bin and the powershell chocolatey said it installed to C:\Program Files\Graphviz\bin. I did the second one.

Downloading ROS 2

Remember ROS? We were installing ROS. Apparently we’ve made it through the desert and reached mount Sinai.

It is normal that the previous command, if nothing else went wrong, outputs “The system cannot find the path specified.” exactly once.

Well, about that.

So… the thing that was optional wasn’t actually? Hm. Well, the next step says to run demos and they don’t work. The step after that says Troubleshooting so I’ll just click o-oooooh wait a second, what is this?

This whole time it could have been

  • install chocolately
  • make chocolately install ROS.
  • C:\dev\ros2_foxy\local_setup.bat

?

Nope.

Although the earlier steps failed and the alternative ROS 2 build instructions worked, the demos fail to run. They say run these commands in two separate powershells:

  • ros2 run demo_nodes_cpp talker
  • ros2 run demo_nodes_py listener

Do they work? No. “ros2” does not exist on the system. “ros2.*” cannot be found anywhere in the c:\opt folder.

News

Cycloidal gearbox, 3D printed

I’m putting together a 2 stage 20:1 Cycloid Gearbox that’s designed in Fusion360 and 3D printed on a Prusa Mini. The motor is a NEMA17 with about 30Ncm torque. As I go I’m explaining some design features and areas to improve. I hope this is fun and educational for you. If you find this useful, please caress that like button and show it to a friend.

Here is the Thingiverse file.

I try to make these gearboxes because I have yet to find someone that can make the gearbox I want. If you are that someone, ping me.

Mad love for Levi Janssen’s video about cycloid design in Fusion360. I don’t remember who first suggested to me to use the mounting screws in this way, but to you I say thank you! Very interesting!