Saturday, June 15, 2019

Finished Ceramic Forms

This post contains images of some of my latest ceramic work done with a robot. These are finished with a glaze called Floating Blue. It runs off the high spots in the form and leaves a golden brown finish. In the crevices where the glaze pools it turns a bright turquoise color. In other areas you can see the swirls as it runs. I have these pieces and many others on sale at the University of Michigan Museum of Art (UMMA) as well as the Ann Arbor Art Center (AAAC). They are also for sale at Clay Works Studio.

Tuesday, February 26, 2019

Kuka Robot Troubleshooting at Taubman College

This post is a list of Frequently Asked Questions for the Kuka robots East and West at Taubman College. If you find the robot won't operate as expected please review these common problems and solutions to see if they can get you going.

1) Problem: You plug in a USB key but it doesn't show up in the list of drives.

Solution: You are likely not logged in. Log in as Expert and then your drive will appear. 

2) Problem: Your program simulates perfectly. Yet when you go to run it on the robot it stops right away and won't run. 

Solution: This is likely a tool definition problem. Make sure that the values you used to define the tool in Kuka|prc or SMT exactly match those entered on the pendent. A common mistake is to only enter the Z length. If you don't enter A, B and C to match you'll surely have problems.

3) Problem: You go to paste your program into a folder but you get a message "(filename) no physical memory available". 

Solution: The robot has a limited memory for storing programs. You need to delete some to free up space. Do so, delete some programs. This is a reminder - please delete all your programs when you are finished using the robot. 

4) Problem: Your program simulates correctly in Kuka|prc but it won't run at the robot - nothing happens. 

Solution: You are likely in simulation mode. In that mode the programs runs but it doesn't actually move the robot. To fix this uncheck all the boxes on the Roboteam screen. If the Roboteam screen isn't showing press the button on the left side which toggles its display. See the image above which has the settings correctly configured.

5) Problem: The pendant is operating the wrong robot

Solution: You need to set it so it's operating the robot you want! You can tell which robot is set to work by looking at the label at the top of the pendant. Below East is currently set:

To change robots turn the key switch at the top of the pendant - rotate it to the right. This will bring up the list of available robots. Below is shown the correct configuration for using East. Note that it is selected (blue dot appears). A checkbox appears in the control on the right (small button with two robots shown). There is no checkbox in the same control associated with West. Make sure T1 is selected under East. These settings are all shown in red below:

Once you have it set as shown above turn the key at the top of the pendant to the left. This will close up the robot selection screen. You are now controlling the East robot.

6) Problem: You go to run your program and the robot says "Submit Interpreter is Not Active". 

Solution: Cancel any selected program. Click on the S button at the top of the pendant display. Choose Select/start button from the SUBMIT Interpreter dialog. You'll then be able to run your code. Note that you may need to press Stop and/or Deselect before you can press Select/Start again. 

7) Problem: The hold an enabling switch doesn't activate the robot.

Solution: You likely need to clear the errors from both robots, East and West. Using the key switch discussed above activate West. Use the Confirm All button to clear any error messages. Switch back to East. Do the same to clear any errors. You should now be good to go.

8) Problem: The robot won't operate with an error about the Ethernet Driver.

Solution: You need to be logged in as Expert. From the main menu select Display > Input/outputs > IO drivers:

A dialog will appear. Press the Reset button to fix the problem.

9) Problem: The program or jogging stops with the message: Stop due to workspace violation.

Solution: The problem is the TCP has been moved beyond the workspace volume. For example it got too close to the table, or it moved beyond the borders of the table. As a safety precaution the robot stops its motion in these conditions. To restore normal operation follow these steps:

Make sure you are logged in as Expert.

From the Main Menu choose Configuration > Miscellaneous > Workspace monitoring > Override.

Press the Confirm all button to clear the error.

You can now jog back into the valid workspace region. You may need to modify your code if a running program generated the message.

Sunday, February 3, 2019

Methods of Moving the Robot with Kuka|prc

This post shows a few different ways to move a Kuka robot using Grasshopper and the Kuka|prc plug-in. The methods cover moving to a single points, and moving between parametrically generated points. Also presented is the ability to automatically lift up between motion. This is useful for robot methods which engage material. You may wish to lift up and start at a new position without touching the material during the traverse to the new point.

Kuka|prc and Planes

The software Kuka|prc is a plug-in to Grasshopper to control a Kuka industrial robot. PRC stands for Procedural Robot Control.

Kuka|prc moves the robot using planes. You can think of a plane as an X, Y, Z axis system and an origin. You can roughly think of this as being similar to the CPlane in Rhino. You can re-orient the CPlane so it is rotated to align differently. You can also move the origin of the plane so the 0,0,0 point is somewhere else in world space. Planes in use with PRC are like that. There are X, Y and Z axes, which all are perpendicular to one another, and which can be oriented any way you wish. And you can move the origin of the plane to any location you choose.

The great thing, because it is so elegant, is that the robot will follow the planes wherever you place them - within reason. You can move a plane outside the reach of the robot and it, of course, can't get there. And robots have limits to the joint motion. So some points are unreachable. But within the joint limits, if the robot can physically reach a location, putting a plane there in virtual space will make the robot move there, and face the direction of the plane.

A Simple Example

Moving the robot to a single point in space, facing a required direction, is the simplest motion we can make. The coordinate system of the tool is aligned with the plane. The point to move to is the origin of the plane.

Here's a simple Grasshopper definition to do this:

The robot code is the standard we always use. You can read more about that set up in Robot Programming with Kuka|prc V3. In the configuration above the tool of the robot has the Z axis coming out from the center of the tool tip.

The plane to move to is created using the XY Plane component. This plane faces upward. Note that a Point component is wired into the origin of the plane. This lets you easily move the origin by dragging the Gumball widget in the viewport. (Note: When you assign the point, choose Coordinate from the command line menu. Use of Coordinate is what enables the Gumballs to work. If you aren't seeing the Gumballs after you select the Point component use the Grasshopper pull-down menu Display > Gumballs.)

The XY Plane is wired into the Plane socket of the LIN Movement component. This component generates the command to move to the point.

What happens is the tool axis is aligned with the plane. You can see that below - the robot moves from the Start Point to the plane we defined. Since the plane's Z axis is up, the robot faces upward:

If you wanted the robot to face downward you'd need to invert the Z axis of the target plane. You can do that with the Adjust Plane component. Note in the example below the Normal of the plane is set to the Unit Z component and the Factor of Unit Z is set to -1. That makes the Z vector point downward.

Now when the robot faces this plane it points down:

List of Procedurally Generate Points (follow a Sine Wave)

In this example the robot moves between a series of points. The points are generated with the math function sine. Here's the bit of the definition which generates those points:

A series of values are generated using the Series component. These are values for the X coordinate of the point. The X values are run through the Sine component. This generate the Y values. Those are wired into the Construct Point component to generate the full 3D point (Z defaults to 0).

Next these points need to be scaled up from very small to the size need to move the robot between them. They also need to be moved to a position the robot can reach. Here's that bit of the definition:

The Scale component is used to scale the points. Since they are generated starting at the origin, 0,0 is left as the default center to scale about. That way they simply move away from the center as they scale up. Next the points are moved to a position within range of the robot. This is done by the Move component. It takes the geometry to move (the list of points) and a vector to translate with. The vector is constructed using the Vector 2 Pt component. It generate a vector between the two specified points. The first is the origin (set as the value in socket A) and the second is a point the user can control. That let's the user simply select the Point component and drag that point in the viewport to place the sine curve wherever desired.

Next the points are converted to planes. This is done in the same way as the previous example, having the robot face downward by reversing the Z axis of the plane to point down using Adjust Plane with a negative Z axis. Then the planes are wired into the Linear Movement component to generate the list of linear motion commands.

Finally, the movement command list is wired into the Kuka Core component to simulate the motion and generate the code.

The result is the robot moves in straight lines between the points on the parametric sine curve.

Using Data Trees to Traverse between Planes

The next example is a definition to draw a Voronoi diagram. Let's say for the sake of example into a clay surface. The robot end-effector is a "pin tool" - a needle point tool to scratch into the surface. The definition is fairly simple. The key to it is the Safe Plane component of Kuka|prc. It allows the robot to move up between etching each curve into the surface.

Here's a Voronoi diagram draw over the points which generate it. That set of points is generated randomly in this example. For each point there is a corresponding region consisting of all points closer to that point than to any other. The diagram is the boundaries of those regions.

Here's an image showing the robot traversing between drawing the curves:

Looking at the definition, first up is to generate the curves of the diagram. Here's that bit:

The Voronoi component on the right takes a set of points as input. These are generated randomly in a rectangular region using the Pop2D component. Voronoi also takes a rectangular boundary for the cells as well as a plane. The rectangular region is generated by the Rectangle component. As we've seen several times before, the plane has a Point as input. This is the origin of the plane and the user can drag that points around in the viewport to locate the diagram to proximity of the robot.

Next up is converting the points to planes. This is similar to what was covered above with one important difference. The Voronoi diagram is a set of curves (a list of them in Grasshopper). The first thing we need to is generate the points at the corners of each curve. This is done with the Control Points component. For each input curve it will output the control points. Very important to note here is that the output of Control Points is a data tree. You can see it is a data tree by the wire - it is shown as a dashed line. It's called a data tree because that's an easy way to visualize it - each curve is a branch in a tree. Each branch contains the points for that one curve. The next branch has the points for that next curve.

As before the points are wired into a XY Plane component which is inverted using Adjust Plane.

The planes are wired into the Linear Movement component as before. The new part is the use of the Safe Plane component. It takes the motion commands as input. For each branch of the tree it generates additional movement commands to move above the first point in the branch and above the last points in the branch. It moves up to a specified "safe plane". This is a plane the user defines above the height of the diagram points. That essentially lifts the tool out of the work and above it to traverse over to the next curve to draw:

The key is that it does this independently for each branch in the data tree. Since each branch contains all the points to draw a single Voronoi cell, lifting up after and above the next point works perfectly.

Here again is the image showing the traverses (light gray) above the cells in the diagram:

Friday, February 1, 2019

Remote Control Light Baton Tool

I made a new tool for use on the robot for doing light paintings. This one can be controlled from a phone or tablet app. It has 144 RGB LED lights. This post is the documentation on using it.


The tool is made from baltic birch plywood and some electronics. The micro-controller is an Adafruit Feather 32u4 Bluefruit LE. The strip of LEDs are NeoPixels from Adafruit. There is also a board to move between the 3.7V battery and the 5V required by the pixels.

Mounting on the Robot

On the East robot, in the src\meier folder you'll find a program called AxesA6AtZero. Run this all the way to the end (past the first halt getting to the start point). That sets the rotation of A6 correctly so the tool can be installed vertically. Here's how it looks installed:


To control the tool from your phone you need the Adafruit Bluefruit LE Connect app which is available for Android or Apple iOS devices and is free.

To configure it follow these steps:

Turn the tool on using the small switch inside. Off is towards the back, on towards the front. When on the LED lights will appear in a dim blue color initially.

Once you power on the tool you'll see the tool's name appear in the app. It's called Adafruit Bluetooth LE. Press the Connect button.

The app supports controlling many devices. For our needs we want the one called Controller:

From the next screen choose Control Pad:

The Control Pad user interface is shown below. Really intuitive and attractive, right?! Yes, it's a generic UI I have no control over so I can't label the buttons. Thus it is, uh, dreadful.

Here's a labelled diagram:

The number buttons (1-4) control the mode. You can choose between:
  1. Solid color
  2. Gradient of colors
  3. A moving gradient where the colors slide along the length of the tool
  4. A moving set of random colors which slide along the tool. 

The arrows control how the modes function.
  • Pressing the Up arrow changes the hue when you are in Solid color mode. 
  • The Left arrow changes the count of lights. It cycles between 144->72->36->18->9. 
  • The Right arrow controls the speed of the moving effects. You can cycle between 100 and 10 milliseconds between updates to the motion. 
  • The Down arrow controls the intensity of the lights. You can cycle between 16 different levels of brightness to the pixels. 

Here's a video which demonstrates these modes:

You can also enable the Quaternion control. This lets you tip your device back and forth to change colors.

From the Control Pad screen use the "< Controller" button on the top of the screen to go back. From that screen toggle on Quaternion.

This mode stays enabled until you turn it off. So you may go back to the Control Pad screen and use those controls as well.

When Quaternion mode is enabled you can rotate the phone or tablet to control the color in Solid color mode. Having the phone level in front of you is Red. Tipping the phone up towards vertical cycles between the colors: Orange -> Yellow -> Green -> Cyan-> Blue -> Magenta. When fully vertical the color is Red again.

In Gradient mode you can rotate the phone to move the colors along the length of the tool.

When the Quaternion mode is on the Hue and Speed buttons has no effect. Count and Intensity work.

Here's a video showing it in use:


When you need to recharge the tool plug in a micro USB cable to the end of the tool which also has the on/off switch. Then plug the USB into a power source.

A full charge will last at least 3 to 4 hours of continuous operation.

Note: There is a similar connector on the other side of the tool however that is for programming it, not charging it. Be sure to plug into the one with the on/off switch. 

The cable and USB socket can be found in the tool cabinet: