Using current position to create virtual lines

Started by kratzsci, May 13, 2021, 04:08:05 PM

Previous topic - Next topic

kratzsci

Good morning,

I'm trying to get the arm to detect an object and create its outline virtually based on the position of the tool tip (detecting by button touches). Is it possible to use the current position of the tool tip to generate virtual boundaries within kukaprc?

Thank you for any help!

Johannes @ Robots in Architecture

Hello,
Technically that's not a problem, the question is probably mostly the communication interface and the way of interaction.
Do you have access to KUKA mxAutomation or alternatively KUKA EthernetKRL? They are both paid software addons by KUKA.
Best,
Johannes

kratzsci

Dear Johannes,

Unfortunately I currently do not have access to KUKA mxAutomation or KUKA EthernetKRL. Would it be possible to do it without them or should I look into acquiring one of the above mentioned software before proceeding?

Thank you

Johannes @ Robots in Architecture

Hello,

Do you have a bit of experience working with .Net / Visual Studio? I could send you a utility for the communication.

Best,
Johannes

Johannes @ Robots in Architecture

Irrespective of the communication, that's the way to go towards stopping when a button is pressed:
https://www.robot-forum.com/robotforum/thread/31649-kuka-interrupts/?postID=146700#post146700
I would first do those changes by hand and then if you need them done automatically in KUKA|prc, you can either use Custom KRL components or edit the code pattern in Settings/Advanced/Code so that e.g. the interrupt is always declared. Probably you would need to use both.
Best,
Johannes

kratzsci

Johannes,

Yes, I have some experience with .NET/VisualStudio. I have been able to get the robot to stop it's movement when the button is pressed, that is not the issue I'm facing. I'm trying to get the robot to determine the boundaries of an object and then move to known locations within those boundaries.

Johannes @ Robots in Architecture

Hello,

I've uploaded some code on GitHub that you can run on the Windows side of your KUKA robot, it can access KUKA variables through two DLLs that you need to get in the right version from your robot:
KukaRoboter.Common.XmlResources.dll
KukaRoboter.LegacyKrcServiceLib.dll

Make sure those DLLs are next to the EXE after building it. You could modify to also e.g. send the status of a digital input as well, so that you only save data when the button is pressed. If you are querying the Cartesian position (e.g. $POS_ACT.X, see commented out parts) note that a tool and base need to be set.

I did that a couple years ago and don't quite remember if you need to open ports in the KUKA's NAT settings for it. Could be.

In any case, do NOT change any network settings (firewall, IP etc.) on the Windows side of the robot, you've got a good chance of breaking things.

In Grasshopper, the plugin Firefly contains a UDP listener (note that it needs an attached Timer component to check for new data), though any other socket implementation will work as well. You could also use PacketSender to check if any data is arriving.
KUKAVarProxy does something very similar, it's just a bit more effort to get to the data: https://github.com/ImtsSrl/KUKAVARPROXY

Just note that this is beyond the standard scope of Grasshopper and you will see that it can be challenging dealing with real-time data in Grasshopper. We had to do quite a few workarounds for mxAutomation in how it handles incoming, cyclical data.

https://github.com/jbraumann/KUKA-UDP-Sender

Best,
Johannes

singline


kratzsci

Thank you Johannes, I will look into that and will start working with the GitHub code you provided. Thank you so much for all your help!