Best scripting language to learn to program alongside KUKA|prc?

Started by jschmidt, April 24, 2018, 11:07:52 PM

Previous topic - Next topic

jschmidt

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!

Johannes @ Robots in Architecture

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

jschmidt

Thank you for all of that information!
I will make some more decisions on my end and then move forward.

umaojha

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.

singline

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.

jschmidt

@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.

jschmidt

@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.

singline

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!