Robots in Architecture Forum

KUKA|prc - parametric robot control for Grasshopper => Support => Topic started by: jschmidt on April 24, 2018, 11:07:52 PM

Title: Best scripting language to learn to program alongside KUKA|prc?
Post by: jschmidt on April 24, 2018, 11:07:52 PM
Hello!

I am looking for suggestions on a scripting language to learn that can be used with Grasshopper and possibly with KUKA|prc. I was thinking Python, but only because I'm familiar with the name from my peers in architecture school.
I've also met someone who used Visual Studio and Microsoft Excel to completely bypass the KSS and program the motions for A1-A6 individually. This seems extreme, but he was not having the problem that I'm having, which I believe is a loss in translation from the source code to the KSS.

I'm choosing to branch out of KUKA|prc because of a problem that I'm having with the A7 external kinematic: when running a program that uses A1-A7, the robot flange moves in a circular motion rather than its programmed path (http://forum.robotsinarchitecture.org/index.php/topic,824.msg2130.html#msg2130)

I'm neither an expert on KUKA|prc, Grasshopper or my KR 150 L150 robot, so I'd like to circle back to learning the fundamentals of how to write a program rather than trying to solve the problem through the very polished KUKA|prc. I feel that because I don't actually know how to program anything, and I just jumped right into KUKA|prc after my only prior experience with "scripting" was Grasshopper,  I'm just making uneducated guesses at solving this problem.

So! I just finished a beginners course on JavaScript (to get my feet wet) but I'd love some recommendations on which language would be best to move forward with.

Thank you in advance!
All recommendations welcome!
Title: Re: Best scripting language to learn to program alongside KUKA|prc?
Post by: Johannes @ Robots in Architecture on April 25, 2018, 08:21:32 AM
Hello,

That's a tough questions. In general in the scientific field Python is popular, so learning it definitely does not hurt. For real-time stuff C++ is also useful.
Personally I mostly work in C# (which is also the language in which I wrote KUKA|prc) which I feel very comfortable with, in large part due to Visual Studio being such as nice IDE. I also transition very easily to Java (e.g. for the KUKA iiwa) and to a certain degree to JavaScript, because the languages are quite similar.
That being said, if you want to create your own robot logic, I wouldn't look as much at the language, than at the environment you want to work in. Because having a good geometric library and fast 3D viewport is really important. On the one hand, you have got Rhino itself of course (C# and C++), but you could also look at game engines like Unity (C#) and the Unreal Engine (C++). Unreal also has got a nice visual programming environment. Or you do it all in a browser with Javascript and Three.js, if you want to go that route.
So there really isn't a "best" language, I'd just go whatever feels best for you. The next KUKA|prc (no exact ETA) should make external scripting via C# quite a bit easier as well, but we haven't decided yet by how much we can open it up to users.

Best,
Johannes
Title: Re: Best scripting language to learn to program alongside KUKA|prc?
Post by: jschmidt on April 25, 2018, 04:01:05 PM
Thank you for all of that information!
I will make some more decisions on my end and then move forward.
Title: Re: Best scripting language to learn to program alongside KUKA|prc?
Post by: umaojha on May 15, 2018, 09:38:33 AM
I personally think that you should go step by step in programming if you want to become a professional in it.
As that'll help you a lot while practically applying that knowledge.
Title: Re: Best scripting language to learn to program alongside KUKA|prc?
Post by: singline on May 17, 2018, 05:08:57 AM
While Johannes has provided a pretty comprehensive answer, I personally use python mainly because I want to quickly access and manipulate data that can be used to drive computation design. Both for architectural and robotic design.
Title: Re: Best scripting language to learn to program alongside KUKA|prc?
Post by: jschmidt on May 30, 2018, 03:50:34 PM
@umaojha: could you explain what you mean by this? Step by step programming?

and thank you @singline! I've recently started an edX course in Python.
Title: Re: Best scripting language to learn to program alongside KUKA|prc?
Post by: jschmidt on May 30, 2018, 03:52:56 PM
@umaojha: could you explain what you mean by your comment? Step by step programming?

and thank you @singline! I've recently started an edX course in Python.
Title: Re: Best scripting language to learn to program alongside KUKA|prc?
Post by: singline on June 01, 2018, 06:27:10 AM
That's the course I've done. You won't find one better for getting a good grasp on Python. You'll immediately start to identify ways in which it can be used to drive better and more advanced use of both KUKA|PRC and Grasshopper!