Author Topic: KUKA|prc with ghpythonlib.components  (Read 5657 times)

frenezulo

  • Robots in Architecture Members
  • Forum User
  • *
  • Posts: 7
    • View Profile
KUKA|prc with ghpythonlib.components
« on: June 11, 2014, 10:33:19 AM »
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

  • Lead Developer
  • Administrator
  • Forum User
  • *****
  • Posts: 961
    • View Profile
    • Robots in Architecture
Re: KUKA|prc with ghpythonlib.components
« Reply #1 on: June 12, 2014, 06:45:45 PM »
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

  • Robots in Architecture Members
  • Forum User
  • *
  • Posts: 7
    • View Profile
Re: KUKA|prc with ghpythonlib.components
« Reply #2 on: June 12, 2014, 11:51:24 PM »
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

  • Lead Developer
  • Administrator
  • Forum User
  • *****
  • Posts: 961
    • View Profile
    • Robots in Architecture
Re: KUKA|prc with ghpythonlib.components
« Reply #3 on: June 22, 2014, 08:08:08 PM »
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

EKing

  • Robots in Architecture Members
  • Forum User
  • *
  • Posts: 5
    • View Profile
Re: KUKA|prc with ghpythonlib.components
« Reply #4 on: March 28, 2018, 10:31:19 PM »
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

  • Lead Developer
  • Administrator
  • Forum User
  • *****
  • Posts: 961
    • View Profile
    • Robots in Architecture
Re: KUKA|prc with ghpythonlib.components
« Reply #5 on: March 28, 2018, 11:03:33 PM »
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