KUKA|prc with ghpythonlib.components

Started by frenezulo, June 11, 2014, 10:33:19 AM

Previous topic - Next topic

frenezulo

Hi,
first, thanks for this interesting tool, KUKA|prc. I've just started playing around with it and it seems promising for my intents.
I would like to use KUKA|prc components inside Grasshopper Python Script Editor (and Rhino Python Script Editor) using ghpythonlib.components. It seems, that these Kuka components are able to import, but I can't get it work. Even if I connect the same components to the inputs of the Python script (as seen in the attached image) with ghcomp.KUKA.KUKAXprcCore() component as to the standard KUKA|prc CORE, I can't get any output.
Do you know, where the problem could be?

Thanks,
Tomas

Johannes @ Robots in Architecture

Hello Tomas,

I'm not an expert on Python, but I've asked someone who referenced KUKA|prc in Grasshopper-Python before. I'll get back to you once I hear back from him.
In the meantime I'll see if there is a way to open up KUKA|prc more to "hacking", e.g. by not protecting the classes.

Best,
Johannes


frenezulo

Hi Johannes,
thank you, I'll be looking forward to the news from you.
I'm not an Python expert to, but I was able to use other Grasshopper components in this way, so I was hoping to use KUKA|prc components. Hope it will be possible in some way.

Best regards,
Tomas

Johannes @ Robots in Architecture

Hello Tomas,

As by my eMail, it should now be possible to "manually" define robots and tools using C# and probably also Python code.
The most recent KUKA|prc release is available in the protected member section. An example file is provided as well, basically you have to create the same classes as used in KUKA|prc and then serialize them for transport. Just referencing the GHA file always resulted in problems, e.g. when the menu is being loaded.

Best,
Johannes

ethan

Hello Johannes,
I was curious about calling KukaPRC from python and found this old thread.
I would like to ask for any further information on how the newest PRC interacts with python...
I am interested in calling PRC commands from python and am not sure if this is possible.
Any advice or examples are appreciated.
Many thanks
Eden

Johannes @ Robots in Architecture

Hello,
I'm still not a Python expert, but for .NET it will make sense to wait a bit longer. The next major release will have it's own component library, that you can easily call from .NET or Python. The Grasshopper stuff is then just very thinly wrapped around it.
That being said, I thought that Python had the possibility to work directly with components, as they are on the canvas? See https://stevebaer.wordpress.com/2013/12/11/ghpython-node-in-code/
In which case that should already work nicely today. Never tried it out, though.
Best,
Johannes