Beruflich Dokumente
Kultur Dokumente
Xbox Kinect camera and a Fanuc Robot arm. The interface allows the Fanuc robotic arm to interact with visual stimulus in its environment through the information obtained from the Kinect camera that is processed in LabVIEW. This setup lets new projects build applications for the Kinect and Fanuc robotic arm without rebuilding the communication between the two. If there are problems encountered during this project set up, send questions to: Andrew Schoer aschoer@wustl.edu Joshua Remba jremba@wustl.edu Ed Richter ed@ese.wustl.edu Preparation For this project setup you will need An engineering department PC o Internet connection o At least 4 GB of RAM o Graphics card that supports DirectX 9 o Windows 7 or newer o Administrator rights on the PC Fanuc Robtic Arm (LRMate 200ic) Xbox Kinect for Windows Visual Studio 2010 LabVIEW 2011 MATLAB 2012
This project is intended to be set up on a Wash U. engineering department machine. The PC and the robot must be on the same network connection for the project to work. Originally, this project was setup on PC that ran Windows 7, a first generation Xbox Kinect, and an LRMate 200ic Fanuc Robot. Newer versions of the hardware would likely work with this setup, but nothing is guaranteed. WARNING: The Fanuc robotic arm is dangerous if used incorrectly. Users of this robot should take the Fanuc Certified Education Robot Training (CERT) course before operating the robot. Everything described in this project setup is specifically for Windows 7. When setting up on another Windows operating system, the steps will be similar, but not exactly as stated
Outline of Steps 1. Download project file and Windows update a. Project .zip file b. Windows 2003 Resource Kit 2. Download Kinect and DirectX Software a. Kinect for Windows SDK v1.7 b. Kinect for Windows Developer Toolkit v1.7 c. Kinect Camera drivers d. DirectX End-User Runtimes e. DirectX Software Development Kit 3. Check PC for these programs, and install if necessary a. Microsoft Visual Studio 2010 i. Microsoft Visual Studio 2010 Service Pack 1 b. MATLAB 2012 c. LabVIEW 2011 (with Vision) 4. Make Registry Changes 5. Add SharedMem to the path 6. Modify DepthWithColor-D3D 7. Change location references in the LabVIEW code Note: If specific instructions for an installation are not given, just follow prompts and press next/accept/finish to get through the installation process.
1. Make sure the Kinect sensor is not plugged into any of the USB ports on the computer. 2. If you have the Kinect for Windows v1.0, v1.5, or v1.6 SDK currently installed, close any open samples, the Sample Browser, etc. and skip to step 5. Kinect for Windows v1.7 will upgrade the previous version. 3. Remove any other drivers for the Kinect sensor. 4. If you have Microsoft Server Speech Platform 10.2 installed, uninstall the Microsoft Server Speech Platform Runtime and SDK components including both the x86 and x64 bit versions, plus the Microsoft Server Speech Recognition Language - Kinect Language Pack. 5. Close Visual Studio. You must close Visual Studio before installing the SDK and then restart it after installation to pick up environment variables that the SDK requires. 6. From the download location, double-click on KinectSDK-v1.7-Setup.exe. This single installer works for both 32-bit and 64-bit Windows. 7. Once the SDK has completed installing successfully, ensure the Kinect sensor is plugged into an external power source and then plug the Kinect sensor into the PC's USB port. The drivers will load automatically. b) After the installation of the SDK is complete, you should be prompted to install the Kinect for Windows Developer Toolkit v1.7. If no prompt appears, the download can be found at < http://www.microsoft.com/en-us/download/details.aspx?id=36998> c) Once these installations are complete, you can plug the Kinect Camera into any USB port and the drivers will install automatically. d) DirectX End-User Runtimes can be found at < http://www.microsoft.com/en-us/download/details.aspx?displaylang=en&id=8109> e) DirectX Software Development Kit at < http://www.microsoft.com/en-us/download/details.aspx?displaylang=en&id=6812> After this step, all Kinect applications should be able to run.
b) LabVIEW 2011: If your machine does not have LabVIEW installed, speak with your project advisor to get a copy put onto your computer. a. The LabVIEW code uses VIs from the LabVIEW Vision extension which can be downloaded from < http://www.ni.com/labview/vision/>. Again, speak with your project advisor if there are any licensing issues with this download. c) MATLAB 2012: If your machine does not have LabVIEW installed, speak with your project advisor to get a copy put onto your computer.
In the window that pops up, click the Environment Variables button on the bottom right, marked 2 in Figure 2. In the environment variables window, scroll to Path and double click it in the bottom scroll pane, labeled 3 in Figure 3. Finally, in the Edit System Variables window that pops up, add the SharedMem location to the end of the list shown as 4 in Figure 3. For example, the file location that you add to the end of the Variable value field would look like this: Y:\497-summer2013\KinectFanuc497\SharedMe m\x64\Debug. Be sure to put the location of your SharedMem file, downloaded in Step 1a.
6. Modify DepthWithColor-D3D
If you have multiple versions of Microsoft Visual Studio installed, you need to make Visual Studio 2010 the default launch program for the DepthWithColor-D3D.sln solution file. Open Windows Explorer and find the solution file. Highlight it by single clicking. Look at the upper left of the window for the Open drop down menu and click choose default program from this menu, as shown in Figure 4. Selecting Visual Studio 2010 will set this file to always open in Visual Studio 2010 unless otherwise specified.
Open DepthWithColor-D3D.sln in Visual Studio 2010. Make sure that the platform window at the top says Debug and not Release, and x64 and not Win32 change these settings in their drop down menus if necessary.
When DepthWithColor-D3D.sln is opened in Visual Studio, there will be a side window called the Solution Explorer that displays all of the different parts to DepthWithColor-D3D. In the solution explorer, right click on the DepthWithColor-D3D header. Click properties in the drop down menu that appears. In the Property Pages window, shown in Figure 6, click Configuration Properties Linker General Additional Library Directories, and add the SharedMem\x64\Debug file to this field. (Example: (Y):\zipfile\SharedMem\x64\Debug)
Next, in the same Property Pages window, go to Configuration Properties Linker Input Additional Dependencies and add SharedMemDLL.lib to this field, followed by a semicolon.
In the solution explorer, double click DepthWithColor-D3D.cpp to open it. Edit the second #include statement, on line 8 to be the location of your zip file. (Example: #include "Y:\497-summer2013\SharedMem\SharedMemDLL\SharedMemDLL.h.)
Figure 9: Main VI
AcquireImage
On the front panel, there is an integrated command line field. This is what is launching the Kinect application when the VI is run. This field needs to be changed to the file location of the .exe file created to run DepthWithColor-D3D in your project setup.
Calibrate In the waitForLearn state, the location that either saves or loads the template needs to be changed to the file location that it will save/load from in your project setup.
On the right side of the VI, there is a case statement for saving or loading the transformation matrix. This location reference needs to be changed to the location of your transformation matrix. This is the same location mentioned above in changes made to the Main VI.
Figure 12: Calibrate, Transformation Matrix
MATLAB Transform On the block diagram, there is a MATLAB script node. The first line of the script node is a change directory statement. This needs to be changed to the location for your projects MATLAB files. Write cd, and then the file location.
getCoordinates-Multimarker On the left side of the block diagram, at the beginning of the while loop, there is a location reference that leads to the location of the folder that holds the three template images. This file needs to be changed to the file you are using to store the template images.
Also in getCoordinates-Multimarker, in the findMarker state, there is change directory line in a MATLAB script node that needs to be changed to the project MATLAB folder. This folder is the same as the one changed earlier in the MATLAB Transform VI.
www.eyerobot.weebly.com