Kuka PRC - Grasshopper: Robot arm with rotary table

Hello,

I’m trying to set up a rotary table with Kuka PRC to control a robot arm. Has anyone attempted this before? Any help would be appreciated. Thank you!

Hello,

KUKA|prc supports up to 4 external axes, so a turntable is not a problem! Are you using a KUKA turntable (or a custom turntable with a KUKA Motor) or do you want to build your own turntable? Because that can be a bit tricky!

We recently had an very interesting discussion on rotary axes on the Robots in Architecture forum, maybe that could be helpful to you as well! http://forum.robotsinarchitecture.org/index.php/topic,817.0.html

Best,
Johannes

We have our own turntable - not KUKA. What workflow do you suggest in this case? Thank you, I will check out the thread that you have included here.

Hello,

You need a KUKA turntable if you want to operate the turntable synchronously with the robot - i.e. when the turntable rotates, the robot stays at the same position on the workpiece.

With a custom turntable without a KUKA motor - let’s say operated by a Beckhoff stepper driver - you need to take care of that synchronization yourself. Personally, I would use a non-KUKA turntable only for positioning in between jobs. So let’s say you mill from one side, turn the piece by 180 degrees and then mill the other side.
My suggestion would be that you first find the rotation axis of the turntable. The easiest way of doing so is to mark a point at the edge of the turntable, move there with a calibrated tool, write down the XYZ position. Then rotate the turntable by 120 degrees, get the new XYZ coordinate of the same point, and repeat that a third time. With the three points you can now use Grasshopper to create a circle. And from that circle you can get the normal and center point, which would be your rotation axis.

Now you just need to rotate your planes in Grasshopper accordingly. Don’t forget that your turntable needs some time to move, so you may need a WAIT command somewhere.

But double-check if there isn’t actually a KUKA motor inside your custom turntable - then you just need to master and calibrate it. See the discussion I linked to.

Best,
Johannes

Thank you so much for your reply, Johannes. I will follow these steps and let you know how it goes! On a related note, I was trying to set up toolpaths for this job - the end effector here is a 6’ hotwire. I am able to get the toolpaths in. But the robot undertakes these initial movements that I did not program into the Kuka PRC script. Do you have any suggestions about what might be causing this problem?

Hello,
Do you mean that the robot is moving differently from the simulation? Most often that means that the tool and/or base differ - to ensure a reliable simulation, make sure that they are (close to) identical. See also here http://forum.robotsinarchitecture.org/index.php/topic,115.0.html
Best,
Johannes

Hello,

Thank you again for your reply. The robot doesn’t move properly even within the simulation and i’m not sure why. I’ve attached my GH script and Rhino file. Could you please have a quick look if you have the time? Or give me further suggestions? I’m not sure what I am doing wrong. I pick out curves for my toolpath (i’m trying to sculpt a fluted column with foam) but there are an initial set of movements that I did not program in the simulation. Also, It keeps saying that some of the positions are unreachable.

I really appreciate any help! I’m a little lost.

Thank you!
hotwire04-11_2.gh (13.9 KB)
hotwire_toolpathing.3dm (522.1 KB)

Hello,

I’ve also attached some screenshots here of the grasshopper and Rhino files.

Thanks again!

Hello,

It’s not the nicest solution, but here’s one approach that works.
Before you actually execute the program, check the approach and retraction strategy so that the robot and/or tool do not collide with the turntable.

Best,
Johannes

hotwire_toolpathing_joedit.3dm (526.4 KB)
hotwire04-11_2_joedit.gh (16.7 KB)

…it’s similar to that example: http://forum.robotsinarchitecture.org/index.php/topic,822.0.html

Best,
Johannes

Thank you so much for your help and edits! This makes infinitely more sense to me and was super helpful! I’ll keep at it and let you know how it turns out! Thank you so much for your time!

Regards,
Harini

Excellent, glad that I could help!
Best,
Johannes

Hello again!

I used the edited script that you sent me and tried to run it on the robot. It went onto its first point and instead of moving to the second, said “Work Envelope Exceeded”. It was running fine during the simulation. I figured it might be because I was using the wrong base (it was set to base 17 while the robot was at base 1), so I changed that out in the file as well. It didn’t work still. I tried the override option at the robot but that didn’t let it run either.

Moreover, when I uploaded an updated configuration file from the robot onto Grasshopper, it moved around the robot considerably. My confusion right now is how I would get what is on the computer to align with the data in the robot.

Please let me know what your thoughts are here. The home position seems to be the same. The robot is the right model. The TCP is what we measured earlier. I’m not sure what I’m still missing. My only thought now is whether it could be a difference in the position of our rotary table versus what is in the Grasshopper script.

Thank you once again for all your help.

  • Harini

Hello,

If the settings of the actual robot and the simulation do not match, you cannot get a reliable simulation. So having a different base number will definitely cause problems.

Have you tested it WITHOUT the turntable yet? So you calibrate a tool, calibrate a base, enter the values (XYZABC and tool/base number) in KUKA|prc (let’s say accurate to the first digit) and then run a simple program.
See also here: Synchronizing the Physical and Virtual Robot for an Accurate KUKA|prc Simulation
And if that matches up, the next step is to test the turntable. I’m pasting from another thread on the forum:

As the next step you would calibrate your turntable, as a result you will get the XYZABC values that signify how the turntable is located in relation to the robot’s base. So if X is 1500, the turntable would be 1.5m in front of the robot. Enter those values in the dropdown menu that you get from right-clicking the turntable component in PRC.
Finally you would calibrate an Offset system. That is the same as a Base system, but its zero-point is the origin of your turntable. So the values will be rather small, in the hundreds of millimeters probably. Enter the XYZABC values as a base in KUKA|prc.
Before you proceed with KUKA|prc, activate a calibrated tool and your offset base. Go into e.g. base movement mode and move the E1. The tip of the tool should stay at exactly the same position in relation to the turntable, it rotates with it. If it wobbles around, your calibration isn’t very accurate. Or maybe the gear ratio is incorrect.

Of course don’t re-calibrate your turntable if that was done professionally before and you think that it’s correct. The Offset option is in Startup/Calibrate, you use the same numbers as you use for “normal” bases.
But it’s important to first make sure that the setup is working at the robot, before transitioning into a simulation environment like KUKA|prc. Otherwise you will be trying to compensate “hardware” problems with software, which usually results in more problems down the road.

Best,
Johannes

…here’s an example how the turntable should behave if it’s properly calibrated - without any KUKA|prc, just by moving the robot through the panel: https://1drv.ms/v/s!AtgYyPhhrKrMmIkkxnmkJt2gO95Q1A
(this one is a bit wobbly though, we experimented with KRC2 motors on a KRC4 controller)

So you see that when you move E1 on the control panel, the tool of the robot will stay in exactly the same position in relation to the turntable.

…and one more remark: You can ignore the mesh geometry of the turntable model (which is different from your own turntable) for now, it’s mostly useful for collision checking.

HEY;
Is it possiable im missing KUKA PRC tools in Grasshopper?
in the Virtual Robot i only have arm but im missing a lot of other tool like the TURN TABLE!

what am i missing ???