Quick Getting Started for KUKA Sunrise

Started by Johannes @ Robots in Architecture, July 04, 2019, 12:10:43 PM

Previous topic - Next topic

Johannes @ Robots in Architecture

As there are more and more iiwa users, here are some quick instructions to get you started with KUKA|prc (new, "v3" Version) and Sunrise:

Go into the KUKA|prc settings, Advanced/Code/Sunrise/Download Sunrise Library
The generated ZIP file contains a number of directories, copy them into your Sunrise project.
It should look somehow like in the attached screenshot.
Set up your tool and base in the Sunrise Workbench, make sure that the XYZABC values are the same in the KUKA|prc simulation and at the actual robot. Take care that Sunrise by default displays radians in the Workbench but degrees on the smartPad. KUKA|prc expects values in degrees.
Now modify the following lines to fit your base and tool in the PRC_RunXML.java file:

String toolname = "PolierVib"; //SET TOOL NAME
String tcpname = "TCP"; //SET TCP NAME
ObjectFrame baseFrame = getApplicationData().getFrame("/BASE1"); //OPTIONAL: SET BASE COORDINATE SYSTEM


When you run the program on the iiwa, you will get a file browser window. You can then select the XML file that was generated by KUKA|prc from e.g. a USB stick or a network share. You could also hardcode the path if you wanted to.

The UDP and SmartServo programs work in a similar way, but they need a realtime Ethernet (UDP) connection between robot and Grasshopper/KUKA|prc, so you need to set the right IPs, ports, and firewall settings.
Note that if you are not using the SmartServo tech package, you may need to delete the PRC_RunSmartServo.java file, otherwise Sunrise will complain because it's looking for missing libraries.

Also, the iiwa has some limitations that are not linked to KUKA|prc, e.g. that the motion blending needs to be at least 4mm. So you need to set that as the C_DIS value in the KUKA|prc advanced settings, in order to get motion blending.
In general, very high point density can be problematic.

Hope that helps a bit!

Best,
Johannes

evo85210

Hi Johannes,

Thanks for the tutorial, just wondering how do I setup the UDP program?
I''m connected to the iiwa, ip properly configured
i'm connecting the command to the sunrise communicator (some firewall stuff popped up, I pressed allow), and run the UDP program on the iiwa.
but I'm getting a NullPointerException error on the HMI.
Stopping task due to the following error:
java.lang.NullPointerException
at prc_core.PRC_UDP.dispose(PRC_UDP.java:334)
at application.PRC_RunUDP.run(PRC_RunUDP.java:83)

Something wen wrong. Killing Threads and comms.

Subsequent error while disposing task:
java.lang.NullPointerException
at prc_core.PRC_UDP.dispose(PRC_UDP.java:334)
at application.PRC_RunUDP.dispose(PRC_RunUDP.java:91)

Johannes @ Robots in Architecture

Hello,

Just in case I would temporarily disable the firewall. But it shouldn't cause the null pointer exception.
The line numbers from your file probably don't match up with mine due to modifications, so I would just place a few breakpoints and step through the program.
Probably culprits are that there is a typo with the tool or base - do they both exist?
Also, start with a simple program with just a few axis movements and see if they work.

Best,
Johannes