Take a look at the video tutorials below to get started. They are in order from top to bottom, and each video is associated with a downloadable example file. See the "downloads" section under "Robot Control [Crane]" menu above to access these files.
Example 01 - IK simulation with end arm tool and multiple targets, with code generation.
This example uses the standard Crane Inverse Kinematics solver and visual simulator to preview robotic motion and generates the data required to produce VAL3 programs. The targets are generated in this example by dividing a curve into points, and placing an XY plane at each of the points. Planes are always used as targets in IK, where the X axis (red) points up or forwards, and the Y axis (green) is to the left. The base (Pedestals) component contain the locations of the black pedestals in the robot house @ SCI-Arc. The VAL3 program generated is a flexible template that can be edited easily in VAL3, with most of the options available in the Init() function. The component has a series of input options that will format the val3 code appropriately. Hover the mouse over the inputs for text descriptions of what each input does.
Example 02 - Inverse Kinematic simulation using a single target, and optionally streaming joint data to val3
This example uses the standard Crane Inverse Kinematics solver and visual simulator to preview robotic motion. The single target in this example is generated by interpretting a series of curves in Rhino as a plane. The curves in rhino are a specific group of curves contained in the "crane reticle.3dm" file. To set the group of curves in the "target" input of the "Target to Plane (Aim)" component, select the group in rhino and then right click on the "target" input. Select "set multiple curves". In the example rhino file associated with this example Grashopper file, the reticle is located at robot 1 (RX160). The joint data generated by the IK component can then be formatted into a single text string (Which is done by the "UDP text formatter" component. This data should be sent over UDP using a UDP sender from GHowl. You have to also run a python script (script is located on the right - copy and paste into the python IDLE editor and save). To stream the data, you must create a VAL3 file with move type set to 2 (stream joints). Then load the file on the pendant, make sure your UDP ports match here and in the python script, and that the IP addresses match in the python script and on the socket named "syn" (on pendant > menu > controller config. > IO > socket). This IP address should match your computer's IP exactly and the port should match the python script.
Example 03 - reading joint angles from previously created VAL3 files, also with a heads up display
This example reads a text file (specifically the .DTX file associated with a val3 project). This is useful if for example you create a motion path in Maya and want to bring it into grasshopper. To reference the file, type in the full path to the .dtx file, using the format below. The usrapp folder is where all your Val3 projects should be located. These will be in your Documents folder (inside Staubli\CS8...etc.) The DTX file is read and the joint angles are output. Then the Angles to Planes component generates a series of planes to which the robot's meshes will be oriented. It also generates the target planes located at the robot's TCP location. The example file (in the path below) can be downloaded and placed in your "usrapp" folder. Once you have placed it there, make sure your file path is accurate. My User folder is on my E: drive - yours may be different. Make this path below match your setup. The HUD just takes the current angle values and displays them on the screen. Use the screenX and Y parameters to place the HuD at the desired location. If you cannot see the hud, decrease these values until it comes into view.
Example 04 - Interpolating multiple targets (planes) using the Crane Reticles
This file takes a series of planes (which in this case are defined by multiple Crane reticles (shown in example 02) and interpolates the planes to create a smooth motion path that goes through each of the input planes. Try moving the 3 targets around (near robot 04) to see how the interpolated planes change. The divNum determines the number of divisions between each key plane (input plane) and the pivNum sets the number of interpolated planes that are created when the two planes being interpolated between share the same origin point (which would otherwise create a zero-length line/curve segment).
Example 05 - Using joint data streamed from VAL3 during a program to drive an FK model in Grasshopper
This example requires that the jHere option be enabled (set to true) when a val3 file is created. Then when the file is being run, the python script (on the right) streams joint data (and if the user presses buttons 1-3) back to grasshopper. This can be used to get real time simulation data from the program. The python script should be running before the program is started on the pendant. AS is the other streaming example, the UDP ports and IP addresses/ports need to be matching. This example also requires a UDP receiver from GHowl. Enable the timer below when using this example (by double clicking on it).
Example 05 - Using joint data streamed from VAL3 during a program to drive an FK model in Grasshopper
This example requires that the jHere option be enabled (set to true) when a val3 file is created. Then when the file is being run, the python script (on the right) streams joint data (and if the user presses buttons 1-3) back to grasshopper. This can be used to get real time simulation data from the program. The python script should be running before the program is started on the pendant. AS is the other streaming example, the UDP ports and IP addresses/ports need to be matching. This example also requires a UDP receiver from GHowl. Enable the timer below when using this example (by double clicking on it).
Example 06 - Simple Forward Kinematics Simulation
This basic example controls a TX90L (in this example it is mounted upside down on Pedestal 3 in the robot lab) using 6 joint angles. These angles can be recorded using the FK record component, or the joint input slider can be copied and pasted multiple times for precise manual control.
Example 07 - A closer look at the inputs of the Val3 project creator.
Example 08 - A brief look at the VAL3 studio interface and the scripts generated by Crane.