Robots in Architecture Forum

KUKA|prc - parametric robot control for Grasshopper => Support => Topic started by: anjakunic on May 17, 2021, 11:05:03 PM

Title: Setting up properly milling spindle and managing tool lengths
Post by: anjakunic on May 17, 2021, 11:05:03 PM
Hi Johannes,

I am working with a milling setup consisting of KUKA KR240 R3330 robot, a linear rail and a turntable. I would like to set everything up properly in KUKA PRC so I have quite a list of questions :)

1 - Spindle orientation in Rhino: I read from your post (,115.0.html) that the tool tip should be placed in rhino origin, with tool axis in +X. However, when I follow this logic, my spindle mesh on the robot gets all messed up and rotated in the wrong way. The only way I managed to have it properly attached to the robot is when I place the spindle mesh in such a way that the flange connection is in the rhino origin. Is this alright or am I missing some step? Also, if the tool tip should go to the origin, which tip should I consider? The reference tip which I used for TCP calibration? In that case, what happens when the tools of other lengths are implemented during the process?

2 - Custom tool data: In the custom tool values, should I insert the values I received from the 4-point TCP calibration or the values from my config.dat file (here the coordinate system is rotated from the one on the flange to the one of the spindle tcp). For now I made it work with the first case, but I am not sure if this is the proper way, and maybe is related to the error that I get in (1).

3 - Various tool lengths: In which way should the different tool lengths be approached in the algorithm? I tried using "change tool" and feeding a new "custom tool" component with the values specific to the tool I want (calculations from config.dat file), but the robot then start moving in a strange (and wrong way). I tried with both A, B and C values set to 0, or e.g. A 0.5 °, B -89.9 °, C178.7 °. But none worked well. - Again probably something caused by some of the (1) and (2) issues.

4 -  Base setup: Besides the tool issues, I wonder if a reference base can be set in a way that it gets displaced in relation to the robot (robot staying in Rhino origin), and not the whole robot system being displaced in relation to the base? This is just because in rhino I have some tables modeled and I would like my milled part to stay on the table instead of staying in the origin and then the whole system keeps moving around especially if I have different bases for different wood pieces to be milled.

I attach a gh file where probably all my questions and issues will be more clear and make sense.

Thank you in advance for your help.

Title: Re: Setting up properly milling spindle and managing tool lengths
Post by: Johannes @ Robots in Architecture on May 18, 2021, 08:27:19 AM
Hello Anja,

For the tool, the mesh and the tool values are separate. My recommendation would be to put the robot into a known axis position and then place the mesh so it fits with the physical mounting. Use ReduceMesh to get the complexity down to a few thousand faces. The Rhino origin is equivalent to the flange of the robot.

The calibration is separate from the mesh, depending on how you set your ABC angles you might want to change from X to using Z as a tool axis (I tend to stay with X, though). And yes, get the XYZ from the four-point process. For ABC on spindles I tend to calibrate a long and a short tool via the 4-point method and then calculate the ABC angles from the vector between those two points. Feels more accurate than the usual KUKA way.

1 Measure short tool with XYZ 4-point, enter XYZ in GH
2 Measure long tool with XYZ 4-point, enter XYZ in GH
3 Get ABC from the message baloon on top of the custom tool component
4 C is the rotation around the tool axis which cannot be set by the vector. You can define it geometrically via the Orient Plane component or try leaving it at 0

For various tool lengths I would just create an algorithm that adjusts the mesh and sets the XYZABC values directly. Super important: The values on the robot need to match, i.e. you need to be careful. The better approach is to set up multiple tool numbers that represent multiple tools, even if they are mounted on the same spindle.

For the cell setup please use the robot cell component, that geometry will "move" with the robot.

Title: Re: Setting up properly milling spindle and managing tool lengths
Post by: anjakunic on May 21, 2021, 11:49:23 AM
Hi Johannes,

thank you for the instructions.

For some reason it didn´t work while I had a Z-axis as a tool axis (probably I messed something up somewhere), but when I kept it X, then everything seemed fine.