Synchronizing KUKA Robot with DKP400 Turntable

Started by luie.fr, July 03, 2024, 09:36:50 AM

Previous topic - Next topic

luie.fr

Hi everyone,

I'm currently working on a project where I need to synchronize a KUKA robot with a DKP400 turntable in Grasshopper. My goal is for the robotic arm to move with its tool always vertical, following a trajectory based on a reverse L-shaped pipe (and hopefully more complex shapes in the future). Here are the details of the setup and the problem I'm encountering:

Setup:
- The curve is an L shape:
  - Starts from (0,0,0) to (0,0,400).
  - Then from (0,0,400) to (0,400,400).
  - These two lines are joined by a fillet of 50.
- I've divided the L curve every 6 mm and created Pframes.
- Created a pipe and sectioned it with the Pframes.
- Aligned curve seams, opened the curve, and divided the open curves into smaller segments.
- Retrieved the Z value from the Pframes to create new planes.
- Aligned these new planes with the X vector, deconstructed the planes, and created new planes with the origin and Y vector only.
- Performed the linear movements that result in the command for the robotic arm and DKP400.

Goal:
- The robotic arm and turntable should follow a trajectory around the pipe from bottom to top.
- The turntable remains still for the first part.
- At the bend, the turntable rotates 90 degrees around the world Z-axis.
- The turntable tilts following the bend to end up being tilted at 90 degrees around the world Y-axis, allowing the last part to be done vertically.

Problem:
- I can currently achieve this by setting the dynamic value by vector in the external kinematics, rotary axis value, at x=0, y=1, and z=9. These values were found by trial and error (and i am not sure i really understand how it works).
- The issue is that the tool is not always vertical, and I still receive a yellow warning: "The toolpaths contain possible singularities that can lead to excessive axis speed. Proceed with care."

Question:
1. How can I achieve my goal of keeping the tool always vertical throughout the entire trajectory ?while tilting and rotating the table, and eliminate the yellow warning correctly? Please tell me  if you have a better way to do this.

Additional questions :
2. By dividing the curve as I did, I encounter a "pinch" effect at the bend. The distance between two planes is shorter on the internal angle than on the external angle. I would like to correct this and have thought about using the geodetic method with a sphere (useful for non-planar surfaces) to maintain a consistent distance between section points. How can i do this.

3. While I am currently using the DKP400, I will need to replicate this with a custom turntable. In reality, I have a custom turntable with KUKA motors. How should I approach this in Grasshopper?

Additionally, I will replicate this setup with a second curve, which is a reverse L with another 90-degree bend.

Thank you for your help!

Johannes @ Robots in Architecture

Hello,

There are a LOT of things here, I'm happy to help with the technical details but for the pathplanning you will have to be more specific.

1) A singularity is not necessarily terrible, usually the worst thing that could happen is that the robot goes into an E-stop due to excessive speed when (usually) A4 spins. I would not recommend using the Dynamic Value for a 2-axis positioner. I've attached an example (dkp_orientation.gh) that may be helpful for creating your own orientation strategy.

2) That's a very specific question that definitely needs a proper example, otherwise I would just guess what you are trying to achieve. I see what you mean with the inner and outer distances, but how to approach such a problem is very much up to your specific process. From your screenshot I'm assuming you are using additive manufacturing? So you could try to reduce the extrusion speed when the spacing is very tight.

3) An example for a custom DKP is included (customdkp_2.gh). We don't support it by default, so a scripting component is needed and you may have to adjusts the paths to the KUKA|prc libraries.

Best,
Johannes

luie.fr

Thank you very much for your answers and exemples files !
I am looking into it and will be getting back to you.

Best regards

luie.fr

Thank you again for the dkp orientation, I managed it successfuly !

For the custom table I have more questions. My C#script component present the error : Error (CS0246): The type or namespace name 'KUKAprcGH' cannot be found (is a using directive or assembly reference missing?) (line 13).
What do i have to do to solve this ?
For information, i am using Rhino 7 and I already changed the library at the beginning.

Best

Johannes @ Robots in Architecture

Hello,

What do you mean by changing the library? I guess that it is looking for the folder location from my PC, so you will have to right-click the component and change the path to the KUKAprcGH library.

Best,
Johannes

luie.fr

Hello,

Thank you, this was an easy fix in the managing assemblies of the C#component. I saw that my paths to the 2 .dll files were corrects (when i changed the path to the library) but indeed the KUKAprcGH.gha file was still with you as a user.

But i still have some errors comming out of my C#Script :

 "Error (CS0012): The 'System.Object' type is defined in an assembly that is not referenced. You must add a reference to the 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' assembly (line 61).
Error (CS0012): The type 'System.Collections.Generic.List`1<T0>' is defined in an assembly that is not referenced. You must add a reference to the 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' assembly (line 62).
Error (CS0021): Impossible to apply indexing using [] to an expression of type 'System.Collections.Generic.List`1<KUKAprcCore.PRC_Classes.PRC_ExtAxData>' (line 62)
Warning (CS1701): Assuming the assembly reference 'Grasshopper, Version=1.0.0.20, Culture=neutral, PublicKeyToken=dda4f5ec2cd80803' matches 'Grasshopper, Version=7.36.23346.16351, Culture=neutral, PublicKeyToken=dda4f5ec2cd80803', you may need to provide a runtime strategy
Warning (CS1701): Assuming that the assembly reference 'RhinoCommon, Version=5.1.30000.17, Culture=neutral, PublicKeyToken=552281e97c755530' matches 'RhinoCommon, Version=7.36.23346.16351, Culture=neutral, PublicKeyToken=552281e97c755530', you may need to provide a runtime strategy."

Do i have to add some references in the managing assemblies of the C# script component to solves these errors?

I haven't changed anything yet in the C# script you provided.

Best regards

Johannes @ Robots in Architecture

Hello,

The netstandard.dll is no longer necessary in the more recent versions. Please download a more current release from the member section. As you don't seem to have access yet, I need to know which institution you are affiliated with, and then I will unlock your account!

Best,
Johannes

luie.fr

Hi,

Thanks for your answer,
I will reply again by email to let you know with wich institution i am.
Best

Johannes @ Robots in Architecture

Thank you! My email is johannes@robotsinarchitecture.org, let's continue the conversation there!
Best,
Johannes