-
-
Notifications
You must be signed in to change notification settings - Fork 127
Home
Grasshopper plugin for programming ABB, KUKA and UR robots for custom applications. Special care is taken to have feature party between all manufacturers and have them behave as similar as possible. The plugin can also be used as a .NET library to create robot programs through scripting inside Rhino (using Python, C# or VB.NET). Advanced functionality is only exposed through scripting.
- Get the robots.gha file from the latest release.
- Get the example files.
- Windows 7 or above
- .NET Framework 4.0
- Rhinoceros 3D 5 SR12 64 bit
- Grasshopper 0.9.0076
- Download the robots.gha file from the latest release.
- Open the folder that contains the downloaded file, right click on it, select properties and click on Unblock.
- Copy or move the file to the Grasshopper components folder. You can find this folder through the Grasshopper menu by clicking on File, Special Folders, Components Folder.
- If you plan on referencing robots.gha in a scripting component and exchange data with other components using the custom parameters of the plugin, you'll need to run the Rhino command GrasshopperDeveloperSettings and disable "Memory load *.GHA assemblies using COFF byte arrays".
- Restart Rhino or drag robots.gha to the Grasshopper canvas.
The robots.gha file already includes the robot models we use at Bartlett School of Architecture. If your robot is not included you can add it yourself by following these instructions.
-
Download the files robotsData.xml and robotsGeometry.3dm found in the Resources folder of this repository. Copy these files to the same folder as robots.gha.
-
The 3DM file contains the geometry of the robot. You can usually find CAD files in the manufacturers website. You should end up with 7 meshes (the base plus 6 joints), each in a different layer. Open the 3DM file and create a new layer with the naming convention "MANUFACTUER.MODEL", place the mesh representing the base on this layer. Create 6 sublayers named 1 to 6 and place the mesh corresponding to each joint number.
-
The XML file contains the attributes of the robot. Copy one of the robot elements as reference and replace the values. You'll find most of this data on the manufacturers website. The "a" and "d" values of the joints correspond to DH parameters. There are different conventions for DH parameters, so check the other robots to see if the values make sense, you might need to change the order.
-
To load your custom robot in Grasshopper, you'll need to change the "F" input of the "Load robot" component to TRUE. The name of the robot should be "MANUFACTUER.MODEL".
As with Rhino, the plugin uses a right-handed coordinate system. The main coordinate systems are:
- World coordinate system: It's the Rhino document's coordinate system. Cartesian robot targets are defined in this system. They are transformed to the robot coordinate system during post-processing.
- Robot coordinate system: X axis points towards the front of the robot, Z axis vertical to the robot. This is used to position the robot in reference to the world coordinate system. By default robots are place in the world XY plane.
- Tool coordinate system: Used to define the position and orientation of the TCP relative to the flange. Z axis is normal and away from the flange, X axis points downwards.
The plugin always uses the same units irrespective on the robot type or document settings.
- Length: Millimeters
- Angle: Radians
- Weight: Kilograms
- Time: Seconds
- Linear speed: Millimeters per second
- Angular speed: Radians per second
Most robot controllers from ABB, KUKA and UR support uploading a program through a USB port. Use the "Save program" component to create a file of the program and copy it to a USB drive.
The fastest way is upload the program through a network connection. If you use a LAN cable to connect directly your PC to a KUKA or UR controller, you'll need to know the IP of the controller and assign an IP manually to your PC in your network adapter settings. ABB controllers (IRC5) include a DHCP server, so you don't need to set an IP address. If you use a router with DHCP server to connect to KUKA or UR controllers you can set both the IP of your PC and controller to automatic. Following is the currently preferred upload method for each robot manufacturer (more integration of the upload process within Grasshopper is planned):
- KUKA: KUKA controllers run on top of Windows. Create a shared in the controller as you would in a Windows PC. You'll need to know the a username and password to access the shared folders. Use the "Save program" component and set the folder path to point to the shared folder. You'll then need to use the pendant to copy the program from the shared folder to the program folder to be able to select it.
- UR: If the program is not very long, use the "Remote UR" component to establish an TCP connection to the controller. If the program is long, or you want to upload multiple files, you can use an FTP client (that supports a secure connection) to upload the program to the controller.
- ABB: Install Robot Studio (you can use the free version). Click on "Online" and then "One click connect". If the program is not very long, connect a Grasshopper panel to the code output of the "Create program" component. Right click on the panel and select "Copy data only". In Robot Studio, switch to the "RAPID" tab. If the controller is in manual mode, click on "Request Write Access" in the ribbon toolbar. You'll need to acknowledge in the pendant. On the left hand side, double click on the MainModule and replace the code by pasting the code from Grasshopper. Close the module to save the file. For longer files or uploading multiple files, use the "Save program" component. In Robot Studio, switch to the "Controller" tab and click on the "File transfer" button in the ribbon.