Skip to content

18. Wildcard week

Introduction

In this documentation, I’ll be sharing my journey into the realm of parametric control of a Kuka robotic arm using Rhino Grasshopper and the Kuka PRC plug-in. This project stemmed from my passion for robotics and my desire to explore new ways of interfacing with these advanced machines.

During the couple past years, I’ve delved into robotics through three departmental electives during my university studies. These courses not only equipped me with the necessary technical knowledge but also ignited a curiosity to push the boundaries of what can be achieved with robotic systems.

My journey into programming the Kuka robotic arm using Grasshopper and Kuka PRC was further fueled by a masterclass I attended led by Karl Singline. This insightful session provided me with invaluable insights and techniques that served as a solid foundation for this project.

Throughout this documentation, I’ll walk you through the process of creating the Grasshopper file, mastering the basics of Kuka operation, calibrating the tool for precision, and conducting various tests to evaluate the capabilities of the robotic arm.

Kuka Robot Image
Islamic Drawing Image

Previous Experience with Robotics

During my Mechatronics Engineering studies, I immersed myself in robotics through three departmental electives.

Fundamentals of Robotics introduced me to the basics of robotic systems. Autonomous Robotics deepened my understanding of autonomous systems and navigation algorithms. Fanuc Robotics provided comprehensive insight into Fanuc robotic systems, including programming and simulation.

One notable project involved programming a work cell and simulating the program using Fanuc’s software. These experiences form the foundation for my current project, blending theoretical understanding with practical skills in robotic manipulation and control.

Previous Masterclass Experience

I had the privilege of attending a masterclass led by Karl Singline, a renowned expert in robotic fabrication and parametric design. Karl’s expertise in these fields is widely recognized, and his insights have had a profound impact on the way I approach robotic projects.

The masterclass spanned five days and focused on the parametric control of the Kuka robotic arm using Rhino Grasshopper and the Kuka PRC plug-in. Throughout the workshop, which was entirely hands-on, we explored various applications of robotic fabrication, including drawing with the Kuka, hot wire cutting, 3-axis milling, 5-axis milling, and clay 3D printing.

Karl’s guidance and hands-on instruction were invaluable as we delved into the intricacies of programming the Kuka and harnessing its capabilities for creative fabrication tasks. Despite the immersive experience, I didn’t have the opportunity to replicate what we did in the masterclass independently due to time constraints. However, this week presents a chance for me to revisit and build upon those learnings.

Programming the KUKA

Downloading and Installing Kuka PRC

Role of Kuka PRC Plug-in:

  • The Kuka PRC (Parametric Robot Control) plug-in facilitates communication between Grasshopper and the Kuka robot.
  • It enables users to generate robotic motion paths and control commands directly within Grasshopper’s visual programming environment.
  • With Kuka PRC, users can create parametric designs and automate fabrication processes with precision and efficiency.
  • Understanding the capabilities and functionality of the Kuka PRC plug-in is essential for integrating the Kuka robot into parametric design workflows effectively.

  • Download Kuka PRC:

    • Visit the Food4Rhino website and search for “Kuka PRC”.
    • Locate the Kuka PRC plugin and download the appropriate version compatible with your Rhino software.
  • Installation:

    • Once downloaded, extract the files from the downloaded ZIP folder.
    • Copy the extracted files to the Grasshopper plugins directory in your Rhino installation folder.
    • Typically, this directory is located at “C:\Program Files\Rhino 7\Plug-ins\Grasshopper\Components”.
  • License Selection:

    • Launch Rhino and Grasshopper to ensure that Kuka PRC is properly installed.
    • Upon first use, Kuka PRC may prompt you to select a license type.
    • Choose the appropriate license option based on your usage needs, such as evaluation, educational, or commercial license.
  • Follow the on-screen instructions to complete the license activation process.

By following these steps, you can download, install, and activate the Kuka PRC plugin, enabling you to integrate Kuka robotic control capabilities into Grasshopper for your projects.

Setting Up Grasshopper for Drawing with Kuka PRC

Grasshopper Image 1
  1. Preparation:

    • Ensure you have a new Rhino model opened.
    • Set up the location of the Kuka robot and any stationary objects within the cell, such as tables, but disable them for this tutorial.
  2. Launch Grasshopper:

    • Open Grasshopper, which you can download from grasshopper3d.com.
  3. Import Curves:

    • If you have curves in Rhino already, import them into Grasshopper.
    • Click and select multiple curves in Rhino, hit Enter, and they will be imported into Grasshopper.
Grasshopper Curves
  1. Convert to Polylines:

    • Convert the imported curves into polylines.
    • Use the ‘Curve’ tab, select ‘Util’, then ‘Curve to Polyline’.
    • Adjust the tolerance distance using a number slider to ensure desired accuracy.
  2. Generate Control Points:

    • Create control points on the polylines to guide the robot’s movement.
    • Use ‘Curve Analysis’ and select ‘Control Points’.
Grasshopper Polylines
  1. Establish Cartesian Directions:
    • Create XY planes at each control point to define the robot’s movement direction.
    • Use ‘Plane’ under ‘Vector’ tab, then connect it to the control points.
Grasshopper Orient Planes
  1. Setup Robot Movement:
    • Integrate Kuka PRC plug-in to control the robot’s movement.
    • Use ‘Kuka PRC’ components and connect them to the planes.
Grasshopper KUKA Command
  1. Adjust Tool Offset:
    • Set up tool offset width distance to ensure accurate drawing.
    • Use ‘Kuka PRC Tool Axis Offset’ and input desired distance with a number slider.
Grasshopper Tool
  1. Attach Robot Controller:
    • Insert a Kuka robot controller to convert commands into KRL (Kuka Robotic Language).
    • Connect the commands to the robot controller.
Grasshopper Kuka Core
  1. Include Tool Mesh:

    • Import a tool mesh, such as a pen holder, to visualize the tool’s position on the robot.
    • Use ‘Mesh’ component and connect it to the tool input.
  2. Configure Tool Orientation:

    • Adjust the tool orientation parameters to align with the drawing surface.
    • Set the tool’s position and rotation values accordingly.
  3. Simulate Robot Movement:

    • Preview the robot’s movement using a Kuka PRC play button.
    • Simulate the drawing process to ensure accuracy and avoid collisions with the table or other objects.
Grasshopper Simulation

Basics of Using the Kuka

  1. Introduction to Kuka:

    • The Kuka robotic arm is a versatile and powerful tool used in various industrial and creative applications.
    • Known for its precision, flexibility, and reliability, the Kuka robot offers advanced capabilities for automation and fabrication tasks.
    • Understanding the basic operation and components of the Kuka robot is essential for safe and efficient usage.
  2. Teach Pendant:

    • The teach pendant is a handheld device used to control and program the Kuka robot.
    • It features a user-friendly interface with buttons, joysticks, and a screen for navigating menus and executing commands.
    • The teach pendant allows operators to manually move the robot, program motion paths, and monitor its operation.
  3. Importance of Safety Precautions:
    Safety is paramount when operating any robotic system, including the Kuka robot. Proper training and adherence to safety protocols are essential to prevent accidents and ensure the well-being of operators and bystanders.

Safety precautions may include:

  1. Implementing physical barriers or safety cages to restrict access to the robot’s work area.

  2. Conducting regular risk assessments and safety inspections to identify and mitigate potential hazards.

  3. Following established emergency procedures in the event of an accident or malfunction.

By prioritizing safety, operators can minimize the risk of injury and maintain a secure working environment when using the Kuka robot.

Calibrating the Tool

Kuka Tool Image

Calibrating the tool is a crucial step in setting up the Kuka robotic arm for precise and accurate movements. The XYZ 4-point calibration method is commonly used to determine the Tool Center Point (TCP) and ensure that the robot’s end-effector is accurately positioned.

XYZ 4-Point Calibration:

The XYZ 4-point calibration involves measuring the positions of four reference points in the robot’s workspace. These reference points should be strategically chosen to cover a range of motion and provide accurate calibration data. By recording the coordinates of each reference point relative to the robot’s base, the calibration software can calculate the TCP and adjust the robot’s motion accordingly.

Importance of Accurate Calibration:

Accurate calibration is essential for achieving precise robotic movements and maintaining consistency in fabrication tasks. Proper calibration ensures that the robot’s end-effector is aligned with the desired coordinates, minimizing errors and inaccuracies in the fabrication process. By prioritizing accurate calibration, users can optimize the performance of the Kuka robotic arm and achieve high-quality results in their fabrication projects.

Executing XYZ 4-Point Calibration:

Tool Calibration Image
  1. Switch User Group to Expert Mode: From the teach pendant interface, change the user group to “Expert” mode to access advanced calibration options.

  2. Access Calibration Tools: Navigate to the “Tools” menu on the teach pendant interface.

  3. Add Tool and Choose Calibration Method: Select the option to add a new tool from the menu. Choose the “Calibrate” option and then select “XYZ 4 Point” calibration method.

  4. Move Robot to Reference Points: Follow the prompts on the teach pendant to move the robot to each of the four reference points. Ensure that the robot reaches each point from different angles and with varying joint configurations to capture a comprehensive range of motion.

  5. Automated Calculation Process: Once the robot is positioned at each reference point, the calibration software automatically calculates the transformation and rotation of the Tool Center Point (TCP). The calibration process is completed, and the TCP is now accurately calibrated for precise robotic movements.

By following these steps, users can execute the XYZ 4-Point Calibration method on the Kuka robotic arm, ensuring accurate positioning and alignment of the TCP for fabrication tasks.

Exporting the Program and Running it on the Kuka

  1. Verify Tool and Base Configuration: Ensure that the correct tool and base configurations are selected both on the Kuka robotic arm and within the Grasshopper file. Consistency between the tool and base settings is crucial for accurate robotic movements.
Base Image
Tool Calibration Image
  1. Check Simulation for Errors: Before exporting the program, thoroughly review the simulation within Grasshopper to ensure there are no errors or unexpected behavior. Address any issues or discrepancies identified during the simulation phase before proceeding.

  2. Export KRL File: Once the simulation is error-free and the program is ready for execution, export the Kuka Robot Language (KRL) file from Grasshopper. Use the export function within Grasshopper to generate the KRL file containing the robotic commands and motion paths.

  3. Transfer KRL File to USB Stick: Copy the exported KRL file onto a USB flash drive for transfer to the Kuka robotic arm. Ensure the USB stick is formatted correctly and compatible with both the computer and the Kuka teach pendant.

  4. Load Program on Teach Pendant: Insert the USB flash drive into the teach pendant of the Kuka robotic arm. Access the teach pendant interface and switch to “Expert” user group mode for advanced functionalities.

  5. Copy .SRC File to Robot: Navigate through the teach pendant menu to locate the USB drive and the exported KRL file (.SRC format). Copy the .SRC file from the USB drive to the internal storage of the Kuka robot.

  6. Select and Run Program: Once the .SRC file is successfully transferred to the robot, select the program from the teach pendant interface. Choose the appropriate execution mode and initiate the program to begin robotic operations.

By following these steps, users can export the program from Grasshopper, transfer it to the Kuka robotic arm, and execute the fabrication tasks with precision and efficiency.

Testing Drawing with the Kuka

  1. Writing Name of Friend:

    • DESIGN:

      • Used the text object tool in rhino to write the letters of a name “LINA”.

      Rhino Text

    • Initiated a program to write the name of a friend, “Lina,” using the Kuka robotic arm.

    • Executed the program to observe the robot’s ability to accurately reproduce the letters of the name.
    • Evaluated the precision and legibility of the drawn letters, making any necessary adjustments to optimize the result.
Drawing of Lina
  1. Drawing Map of Palestine:
    • DESIGN:
      • Found a design of the palestine map with calligraphy, then used inkscape and the trace bitmap tool to turn into a vector.
      • I set the fill to none, and the stroke style to hairline then exported it into a .dxf file, then imported it into rhino.
        Palestine Inkscape
    • Developed a program to draw the map of Palestine with intricate details and contours.
    • Ran the program to assess the Kuka robot’s capability to replicate complex shapes and geographic features.
    • Reviewed the drawing output for accuracy and fidelity to the original map design.
Drawing of Palestine
  1. Creating Geometric Pattern from Islamic Art:
    • DESIGN:
    • Experimented with drawing a geometric pattern inspired by Islamic geometry and art.
    • Implemented the program to test the Kuka robot’s ability to execute precise and intricate geometric drawings.
    • Reviewed the drawn pattern for adherence to the intended design, adjusting parameters and algorithms to achieve desired aesthetic results.
Islamic Drawing

Through these tests, various aspects of the Kuka robotic arm’s drawing capabilities were assessed, including precision, complexity handling, and fidelity to intricate designs. Adjustments and refinements were made iteratively to optimize the drawing process and achieve high-quality results.

KUKA Image 4

Conclusion

Throughout the wild card week of Fab Academy, I embarked on a journey to explore the parametric control of a Kuka robotic arm using Rhino Grasshopper and the Kuka PRC plugin. This experience has been immensely rewarding, offering valuable insights and skills in programming and operating the Kuka independently.

Despite the limitations posed by the availability of tools and end effectors in the lab, I successfully executed various drawing tasks with the Kuka robotic arm. From writing the name of a friend to drawing the map of Palestine and experimenting with geometric patterns inspired by Islamic art, each task presented unique challenges and opportunities for learning.

Through this process, I gained a deeper understanding of the capabilities and intricacies of the Kuka robotic arm, honing my skills in programming motion paths and calibrating the tool for precise execution. Moreover, I developed confidence in independently programming and running the Kuka robot, expanding my technical proficiency and problem-solving abilities.

Looking ahead, the knowledge and experience gained during this week can serve as a solid foundation for future projects and collaborations involving the Kuka robotic arm. While I was limited to using the pen holder for drawing tasks, I am eager to explore the potential of utilizing other tools and end effectors in future projects. Additionally, I am excited about the prospect of designing and building custom tools for the robot, leveraging the parametric control capabilities of Rhino Grasshopper to create innovative solutions for fabrication tasks.

In conclusion, the wild card week has been a transformative learning experience, equipping me with valuable skills, knowledge, and confidence to leverage the capabilities of the Kuka robotic arm in future endeavors.

Files