Skip to content

Realtime Feedback from Universal Robots in Grasshopper. Uses the "Robots" Plugin (visose/Robots).

License

Notifications You must be signed in to change notification settings

robin-gdwl/GH_Robots_URRealtimeFeedback

Repository files navigation

Important

Currently does not work with the newest version of the Robots Plugin. I will update the script in the future.


overview Image UR feedback

GH_Robots_URRealtimeFeedback

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.

UR Realtime Feedback01

Demonstration Video: https://youtu.be/c1BiL6fXkgs

Grasshopper Canvas:

UR Realtime GH-Canvas

Usage:


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.

TODO:

  • 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

About

Realtime Feedback from Universal Robots in Grasshopper. Uses the "Robots" Plugin (visose/Robots).

Topics

Resources

License

Stars

Watchers

Forks

Languages