These files should be downloaded to the following directory: slkinect/Samples/win
The file is a Simulink model, which can be easily rebuilt. It should be noted that within the TransformCoordinates function, there exist three equations. Each equation pertains to the transformation, translation, and scaling of the Kinect coordinate axis to the XR-4 coordinate axis specific to my setup. These equations are based on very specific information regarding the layout of the Kinect and the XR-4 and are further explained on this page.
Rhino XR-4 Function Files
This file is the main script, main.m script. It was written to reach, grab, and pick up the object. Then place it back down, return to the base, and then prompt the user if they would like to continue with another run.
These files can be used to write new code
This file initializes the connection between the computer and the Rhino XR-4 Robotic arm and saves the serial connection as the variable 's'. It contains the information needed to initiate the serial connection. This file also assumes that the serial COM1 is used, if you are not using COM1 change it to the right serial port.
This file moves the XR-4 gripper to the specified location (x,y,z) in mm in relation to the origin of the Rhino XR-4. The 'a' refers to the angle of the gripper in relation to the Z-axis of the XR-4 coordinate system and the 't' refers to angle of the gripper in relation o the X-axis of the XR-4 coordinate system.
This file sends commands to the XR-4. These commands were obtained from the XR-4 manual. Some commands include 'TH' which commands the XR-4 to go into Host mode, to allow it to be controlled from the computer and 'HH' which tells the XR-4 to go into hard-home. Hard-home allows the XR-4 to start from a more accurate reference.
This file tells the XR-4 to wait for a specified amount of time.
This file is very important to close and delete the serial port connection.