Synchronizing the Physical and Virtual Robot for an Accurate KUKA|prc Simulation

Started by Johannes @ Robots in Architecture, November 04, 2014, 06:15:48 PM

Previous topic - Next topic

Johannes @ Robots in Architecture

Hello All,

As there have been some questions, here is a possible workflow towards achieving a KUKA|prc simulation that is as accurate as possible.

...mount the tool on the spindle. Go to Start-Up/Calibrate/Tool/XYZ 4 Point
...remember the number of the tool!
...choose a point anywhere in the robot's workspace (e.g. sharp tip of another tool, wood if you want to be extra-careful) and move the tooltip there.
...press Calibrate, then move the robot away, change its orientation and move it to the same point from another direction.
...at the end the robot will ask you for the load data, either enter it or use the default values
...it should now show you the average error of your measurement (sharp tips go down to 0.1-0.2mm if you are good, regular cylindrical tools probably in the area of 0.5-0.6mm) and the XYZ values (i.e. the offset from the flange in each direction).

...to set the orientation of the spindle, go to Start/Up/Calibrate/Tool/ABC World.
...choose 5D
...align the tool vertically, i.e. facing downwards as accurately as possible (there are more accurate ways than ABC World, but it's the easiest)
...press calibrate and confirm the load data
...Write down the XYZABC values of your tool as well as it's tool number

...to define a local coordinate system, go to Start-Up/Calibrate/Base/3-Point
...set a number for the base
...for the tool, choose the number of the tool that is currently mounted
...move the tooltip to the origin of your local coordinate system (from any direction, only the tooltip counts)
...press calibrate, then move the tooltip to a point in the X direction of your local coordinate system (the further the more accurate)
...press calibrate, then move the tooltip on a point on the XY plane (in the case of a rectangular, extruded stockmodel that would be anywhere on the surface plane, but preferably not too close to the origin. It does not have to be a corner point).
...Write down the resulting XYZABC values of your base as well as it's number.

...to use the same base in KUKA|prc, go into the KUKA|prc settings
...in the section "Base Settings" choose the right base number and enter your XYZABC values.
...click apply to save

...to create a custom tool, first model (or import it from somewhere) the tool and mesh it.
...join it into a single mesh (important! multiple meshes will for some reason slow KUKA|prc to a crawl). Consider using the ReduceMesh command in order to improve performance.
...place it in a way that the tooltip is at Rhino's global origin and X+ is along the tool axis.
...now get KUKA|prc's Custom Tool component and connect the mesh to its input.
...double-click the component and enter the number of your tool, as well as its XYZABC values.
...see also here: http://forum.robotsinarchitecture.org/index.php/topic,5.0.html

...having the same base and tool numbers as well as XYZABC values ensures that the simulation will be as accurate as possible.


This workflow applies to the very first projects only, once you know your tools' XYZABC values you just have to remember the number under which they were saved. In the case of milling you can e.g. try to make a Excel formula (or Grasshopper definition) that calculates the XYZABC values based on the length of the tool. You can also use a fixed base that is e.g. clearly marked on the robot's table and place your material accordingly, instead of calibrating a new base for every object.

Note that achieving a 100% accurate simulation is never possible, as the KUKA robot's algorithms are not public domain.
All the steps above are also described in the KUKA System Software manual. It is included with your robot as a PDF on the DVD - if for some reason it isn't, it should be possible to call the KUKA hotline and have it sent to your eMail address.

Hope this helps!

Johannes @ Robots in Architecture

victorlin

Question regarding tool setup on IIWA.
In the XML I see that tool data is recorded, so I was assuming I can set the tool seperately from what's saved in the controller, but that doesn't seem to be the case.
Is this a feature to be added in the future?

Johannes @ Robots in Architecture

Hello Victor,

Would that be useful to you? This is something that we might need for another project and shouldn't be a huge effort to integrate.
I can't give you an exact ETA, though.

Best,
Johannes

victorlin

Hi Johannes,

Yes, it'd be amazing if tool settings can be set from the xml.
Will be awaiting the feature update.

Victor

Johannes @ Robots in Architecture

Hello Victor,

I don't know if we will push this out publicly, but if you want to try it yourself, just look into the CORE_RUN method.
One if its constructors is the object xmlout.
You should be able to access the tool values as a Frame object via xmlout.prcsettings.inittool and can then just set your TCP accordingly.
I'm not sure if we do the transformation from degrees to radians and cannot test it right now, so take a look at the XML file first.

Best,
Johannes