Currently does not work with the newest version of the Robots Plugin. I will update the script in the future.
Realtime Feedback from Universal Robots in Grasshopper. Uses the Robots Plugin. Use at your own Risk. With this code it is possible to get the current position, accelleration, speeds and more from a Universal Robot into Grasshopper. This data can then be used further inside the Grasshopper environment.
See Below for Usage-Instructions.
Contains 2 C# scripts:
GetURDataContinuosly:
Uses a system Thread to run the Data-fetching continuously in the Background. The data is updated from the robot 1-2 times a second. I am new to threading in C# so use with caution. I am not entirely sure about the implications of constantly running a Systam-Thread in the background. Make sure to only activate it when necessary.
GetURDataOnce:
Only gets the Data when triggered by a Button but is more robust. This Component could also be used with a Grasshopper Timer but it will block the Canvas for half a second while it reconnects to the robot and fetches the data if run continuously.
C# code based on this comment about scripting in the Robots-Plugin. The continuous background-update is done in a similar manner to this comment also by Vicente Soler.
Demonstration Video: https://youtu.be/c1BiL6fXkgs
- Make sure you have the Robots Plugin installed correctly
- Download a Robot-Library with UR Robots
- Download the project folder
- If you use Windows: Unblock the .zip file
- open the
UR-Robotfeedback01.ghx
file in Grasshopper - connect to the same network as a Universal Robot or a URSIM-Software
- See this Repository for more information on installing URsim and using it with Grasshopper
- Set the IP adress of the Robot or the virtual machine in the Panel named
Robot IP Address
Tested with Rhino 6 on Windows. On opening the Grasshopper definition you may be prompted to specify the location of the Robots.DLL file. It is located in your Grasshopper Library Folder (where you install GH-plugins)
There may be an issue with the C# script consuming uneccesary amounts of RAM. I hope to fix this soon.
- Test on mac (onetime script seems to work fine)
- Investigate Memory Leak
- Annotate GH Definition
- Comment C#-script code
- make explanation Video
- Add Get TCP Function
- rename functions in c#scripts
- output the meaning of the datatree branches from the script component
- GetDataOnce
- GetDataContinously
- put description and license into the gh file
- gh function docstrings
- better explanations