Difference between revisions of "Software Installation Guide"

From David Vernon's Wiki
Jump to: navigation, search
(DREAM Repository)
 
(17 intermediate revisions by the same user not shown)
Line 1: Line 1:
ThIs guide provides a step-by-step guide to downloading, installing, and checking the software required to develop DREAM software and write and run DREAM robot applications.  
+
ThIs guide provides a step-by-step guide to downloading, installing, and checking the software required to develop software for the CINDY Cognitive Architecture and write and run CINDY applications.  
  
 
== Operating System ==
 
== Operating System ==
  
We assume you are running Windows 7.
+
I assume you are running Windows 10.
  
== C/C++ Compiler ==
+
I strongly recommend you turn on the option in File Explorer to show file extensions. To do this, open File Explorer, click the View tab and click on the file name extensions checkbox so that it shows a tick.  If it is not ticked, you will have problems identifying certain files later on (e.g. invoking the CINDY.sln solution file to launch the C++ compiler).
  
Download the Microsoft Visual C++ Express compiler, version 10.0 (also known as Visual C++ 2010).  It is important to use this version; earlier versions are no longer supported by Microsoft and later versions cause problems with YARP.
+
== C/C++ Compiler ==
  
This is significant because you will be downloading the YARP binaries in the next step and these are version-specific.  
+
Download the Microsoft Visual C++ Express compiler, version 10.0 (also known as Visual C++ 2010 or MSVC++ 2010). It is important to use this version; earlier versions are no longer supported by Microsoft and later versions cause problems with YARP.
  
 
You can download the required compiler from [http://www.visualstudio.com/downloads/download-visual-studio-vs here].
 
You can download the required compiler from [http://www.visualstudio.com/downloads/download-visual-studio-vs here].
Line 15: Line 15:
 
Run the installer and follow the instructions.
 
Run the installer and follow the instructions.
  
Once the compiler is installed, try compiling a simple program.   Some versions of Windows 7 may need the the Microsoft Visual Studio 2010 Service Pack 1 to be installed.   If you get an error trying to compile and run a simple program, this may be the problem.   CMake (see below) will also fail in this case.
+
You will need to register Visual C++ 2010 Express to continue using beyond the initial 30-day evaluation period. To do this, from the Microsoft Visual C++ 2010 Express menu, select Help > Register Product. You will then have to log in to your Microsoft account, if you have one, or create a new one, if you don't. After filling in some forms you will get the product key which you enter into the dialogue box that popped up when you selected Help > Register Product.
  
 
== YARP ==
 
== YARP ==
Line 26: Line 26:
 
== CMake ==
 
== CMake ==
  
Download CMake binaries from [http://www.cmake.org/download/ here].   
+
Download CMake binaries from [http://www.cmake.org/download/ here].  At time of writing the latest version is 3.10.1.
  
You can opt for either the WIN32 installer or the Windows zip file. The installer has the advantage that it gives you the option to update your system path automatically (which you should take by clicking the appropriate radio button during the installation process).
+
You can opt for either the WIN32 installer (cmake-3.10.1-win32-x86.msi) or the Windows zip file. The installer has the advantage that it gives you the option to update your system path automatically (which you should take by clicking the appropriate radio button during the installation process). If you choose the installer option, note that if you already have CMake version 3.4 or earlier you must uninstall it first.
  
 
== OpenCV ==
 
== OpenCV ==
  
Download and install OpenCV from [http://sourceforge.net/projects/opencvlibrary/files/opencv-win/ here].  Choose the version 2.4.9 self-installer, download it, and execute it, and extract the library to <code>C:</code>.
+
Download and install OpenCV from [http://sourceforge.net/projects/opencvlibrary/files/opencv-win/ here].  Choose the version 2.4.10 self-installer, download it, and execute it, and extract the library to <code>C:</code>.
  
 
Add <code>C:\opencv\build\x86\vc10\bin</code> to the PATH environment variable and add a new environment variable <code>OPENCV_DIR</code> with the value <code>C:\opencv\build</code>, as follows.
 
Add <code>C:\opencv\build\x86\vc10\bin</code> to the PATH environment variable and add a new environment variable <code>OPENCV_DIR</code> with the value <code>C:\opencv\build</code>, as follows.
  
* From Windows 7 toolbar, select ''Control Panel > System and Security > System > Advanced System Settings''
+
* From Windows 10 toolbar, select ''Settings''.  
* Click ''Environment Variables''
+
* Type ''Environment Variables''  in the ''Find a Setting'' dialogue box. This will bring up a new Systems Properties window. 
* Select <code>Path</code> from ''System Variables''
+
* Click the ''Environment Variables ...'' button. This will bring up a new Environment Variables window. 
* Click ''Edit''
+
* Select ''Path'' from System Variables. Click ''Edit''.  Click ''New'' and insert <code>C:\opencv\build\x86\vc10\bin</code>. Click ''OK''.  
* Add <code>C:\opencv\build\x86\vc10\bin</code> (be sure to separate different paths with a semi-colon)
+
* Under ''User variables'', click ''New''. Insert <code>OPENCV_DIR</code> in the Variable name box and <code>C:\opencv\build</code> in the ''Variable'' value box. Click ''OK''.  
* Under ''User variables'', click ''New''  
+
* Click ''OK'' in the ''Environment Variables'' window. 
* Insert <code>OPENCV_DIR</code> in the ''Variable name'' box and <code>C:\opencv\build</code> in the ''Variable value'' box
+
* Click ''OK'' in the ''Systems Properties'' window. 
* Click ''OK''
+
  
 
== FLTK ==
 
== FLTK ==
Line 64: Line 63:
 
* Select ''Build > Build Solution'' (or press ''F7'')
 
* Select ''Build > Build Solution'' (or press ''F7'')
  
The CMake files in the DREAM Repository (next section) are configured to use the various FLTK libraries in  <code>C:\FLTK\lib</code> and the include files in <code>C:\FLTK\FL</code>.
+
The CMake files in the CINDY Repository (next section) are configured to use the various FLTK libraries in  <code>C:\FLTK\lib</code> and the include files in <code>C:\FLTK\FL</code>.
  
== DREAM Repository ==
+
== CINDY Repository ==
  
The first step is to set up a working copy of the full DREAM SVN repository on your computerSpecifically, you need to install it so that you have a directory called <code>C:\DREAM</code> with a sub-directory structure shown below.  To do this, you need an SVN client.  We will use the TortoiseSVN client here (you can download it from [http://www.tortoisesvn.net/downloads.html here] and you can find the installation instructions [http://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-quick-start.html#tsvn-qs-install here]).  Once you have installed TortoiseSVN, do the following.
+
Eventually, the CINDY project will be archived on an SVN repository.  For the moment, it is available as a simple .zip file. 
 +
<!-- Download it from [http://www.vernon.eu/CINDY.zip here], -->
 +
Unzip it so that you have a directory called <code>C:\CINDY</code> with the various subdirectories in the archive.
  
* Launch Windows Explorer from the Windows 7 toolbar.
+
The next step is to build a MSVC++ <code>.sln</code> solution file so that you can compile all the CINDY executable components. To do this, you need to run CMake against the <code>C:CINDY</code> directory (where you will find the main <code>CMakeLists.txt</code> file)  
 
+
* Left-click on the ''Windows (C:)'' entry in the folder menu to select it.
+
 
+
* Right-click on the ''Windows (C:)''. This will bring up a menu: select ''SVN Checkout".
+
 
+
* In the pop-up window,
+
 
+
# Enter https://dreamproject.aldebaran.com/svn/dream in the ''URL of repository:'' dialogue box.
+
# Enter <code>C:\</code> in the ''Checkout directory'': dialogue box (NB: don't enter <code>C:\DREAM</code>  otherwise your will end up with a <code>C:\DREAM\DREAM\...</code> repository).
+
# Click "OK".  TortoiseSVN will now copy the DREAM repository to <code>C:</code>, i.e. you will now have the required <code>C:\DREAM</code> directory.
+
 
+
You will notice that <code>C:\DREAM</code> has green tick overlay.  This means that it is registered as an SVN directory.  You may also notice that many of the other <code>C:\</code> folders have a strange question mark overlay. This means that they are not registered as SVN directories.  If you would rather not have this question mark overlay, you can adjust the TortoiseSVN settings, as follows.
+
 
+
* Right-click anywhere on Windows Explorer and select ''TortoiseSVN > Settings'' from the menu.
+
 
+
* Click on ''Overlay Handlers'' in the left-hand side of the the ''Settings - TortoiseSVN'' pop-up window.
+
 
+
* Click on the ''Unversioned'' check-box to remove the option to display the overlay on the unversioned files.
+
 
+
* Click ''OK''
+
 
+
* You may have to restart Windows before these changes are effected and the question-mark overlays are removed.
+
 
+
 
+
The next step is to build a MSVC++ <code>.sln</code> solution file so that you can compile all the DREAM executable components. To do this, you need to run CMake against the <code>C:DREAM\release</code> directory (where you will find the main <code>CMakeLists.txt</code> file)  
+
  
 
* Launch the CMake GUI from the Windows 7 toolbar.
 
* Launch the CMake GUI from the Windows 7 toolbar.
  
* In the ''Where is the source code:'' input (browse to)  <code>C:\DREAM\release</code>
+
* In the ''Where is the source code:'' input (browse to)  <code>C:\CINDY</code>
  
* In the ''Where to build the binaries:'' input (browse to) <code>C:\DREAM\release\build</code>
+
* In the ''Where to build the binaries:'' input (browse to) <code>C:\CINDY\build</code>
  
* Select ''File > Delete Cache'' from the top menu (you '''must''' do this the first time in case there is an old invalid configuration in the DREAM directory)
+
* Select ''File > Delete Cache'' from the top menu (you '''must''' do this the first time in case there is an old invalid configuration in the CINDY directory)
  
 
* Click ''Configure''
 
* Click ''Configure''
Line 113: Line 89:
 
* Click ''Configure'' again and everything should be fine (unless you have forgotten to download and install OpenCV, in which case you will get an error and you will have install OpenCV and start this process again)
 
* Click ''Configure'' again and everything should be fine (unless you have forgotten to download and install OpenCV, in which case you will get an error and you will have install OpenCV and start this process again)
  
* Click ''Generate''  to create the MSVC++ <code>DREAM.sln</code> file in <code>C:\DREAM\release\build</code>
+
* Click ''Generate''  to create the MSVC++ <code>CINDY.sln</code> file in <code>C:\CINDY\build</code>
  
  
 
Next, update your environment variables.  
 
Next, update your environment variables.  
  
* From Windows 7 toolbar, select ''Control Panel > System and Security > System > Advanced System Settings''
+
* From Windows 10 toolbar, select ''Settings''.  
  
* Click ''Environment Variables''
+
* Type ''Environment Variables''  in the ''Find a Setting'' dialogue box. This will bring up a new Systems Properties window. 
  
* Select <code>Path</code> from ''System Variables''
+
* Click the ''Environment Variables ...'' button. This will bring up a new Environment Variables window. 
  
* Click ''Edit''
+
* Select ''Path'' from System Variables. Click ''Edit''.  Click ''New'' and insert <code>C:\CINDY\bin</code>. Click ''OK''.  
 
+
* Add <code>C:\DREAM\release\bin</code> (be sure to separate different paths with a semi-colon)
+
  
 
* Under ''User variables'', click ''New''  
 
* Under ''User variables'', click ''New''  
  
* Insert <code>DREAM_ROOT</code> in the ''Variable name'' box and <code>C:\DREAM</code> in the ''Variable value'' box
+
* Insert <code>CINDY_ROOT</code> in the ''Variable name'' box and <code>C:\CINDY</code> in the ''Variable value'' box
  
 
* Click ''OK''
 
* Click ''OK''
 
   
 
   
 +
* Click ''OK'' in the ''Environment Variables'' window. 
  
Now you are ready to launch MSVC++ and build the DREAM component executables.
+
* Click ''OK'' in the ''Systems Properties'' window. 
  
* Go to the <code>C:\DREAM\release\build</code> directory and open the <code>DREAM.sln</code> file.  This launches Microsoft Visual C++ 2010 Express.
+
Now you are ready to launch MSVC++ and build the CINDY component executables. 
 +
 
 +
* Go to the <code>C:\CINDY\build</code> directory and open the <code>CINDY.sln</code> file.  This launches Microsoft Visual C++ 2010 Express.
  
 
* Select <code>Release</code> in the ''Solutions Configuration'' box.
 
* Select <code>Release</code> in the ''Solutions Configuration'' box.
Line 144: Line 121:
  
  
This will compile and link the components in the the <code>C:\DREAM\release\bin</code> directory.  Check to see that both component executables are there.  If it is not, then select  ''Build > Configuration Manager'' from the menu and make sure the ''INSTALL'' check-box is ticked.  Now rebuild the project again.
+
This will compile and link the components in the the <code>C:\CINDY\bin</code> directory.  Check to see that both component executables are there.  If it is not, then select  ''Build > Configuration Manager'' from the menu and make sure the ''INSTALL'' check-box is ticked.  Now rebuild the project again.
  
 
You are now ready to run the test applications that are included in each component directory (see directory structure below) and to begin developing your own components.
 
You are now ready to run the test applications that are included in each component directory (see directory structure below) and to begin developing your own components.
  
To run the test application for the <code>protoComponent</code> example that is provided with the DREAM release, follow the instructions on the [[Software Users Guide]].
+
To run the test applications for the <code>protoComponent</code> and <code>protoComponentGUI</code> examples that are provided with the CINDY release, follow the instructions on the [[Software Users Guide]].
 
+
  
<center><strong>Logical Directory Structure of the DREAM Repository</strong></center>
 
  
[[File:directory_structure.png]]
+
----
 +
Return to [[The CINDY Cognitive Architecture]] main page.

Latest revision as of 08:15, 7 July 2018

ThIs guide provides a step-by-step guide to downloading, installing, and checking the software required to develop software for the CINDY Cognitive Architecture and write and run CINDY applications.

Operating System

I assume you are running Windows 10.

I strongly recommend you turn on the option in File Explorer to show file extensions. To do this, open File Explorer, click the View tab and click on the file name extensions checkbox so that it shows a tick.  If it is not ticked, you will have problems identifying certain files later on (e.g. invoking the CINDY.sln solution file to launch the C++ compiler).

C/C++ Compiler

Download the Microsoft Visual C++ Express compiler, version 10.0 (also known as Visual C++ 2010 or MSVC++ 2010). It is important to use this version; earlier versions are no longer supported by Microsoft and later versions cause problems with YARP.

You can download the required compiler from here.

Run the installer and follow the instructions.

You will need to register Visual C++ 2010 Express to continue using beyond the initial 30-day evaluation period. To do this, from the Microsoft Visual C++ 2010 Express menu, select Help > Register Product. You will then have to log in to your Microsoft account, if you have one, or create a new one, if you don't. After filling in some forms you will get the product key which you enter into the dialogue box that popped up when you selected Help > Register Product.

YARP

Download the YARP v. 2.3.63 binaries for x86, MSVC v. 10. Here's the link to the instructions and here is the link to the installer itself.

Run the installer and follow the instructions. The installer will do everything for you including updating your path and adding all the necessary environment variables.

CMake

Download CMake binaries from here. At time of writing the latest version is 3.10.1.

You can opt for either the WIN32 installer (cmake-3.10.1-win32-x86.msi) or the Windows zip file. The installer has the advantage that it gives you the option to update your system path automatically (which you should take by clicking the appropriate radio button during the installation process). If you choose the installer option, note that if you already have CMake version 3.4 or earlier you must uninstall it first.

OpenCV

Download and install OpenCV from here. Choose the version 2.4.10 self-installer, download it, and execute it, and extract the library to C:.

Add C:\opencv\build\x86\vc10\bin to the PATH environment variable and add a new environment variable OPENCV_DIR with the value C:\opencv\build, as follows.

  • From Windows 10 toolbar, select Settings.  
  • Type Environment Variables  in the Find a Setting dialogue box. This will bring up a new Systems Properties window. 
  • Click the Environment Variables ... button. This will bring up a new Environment Variables window. 
  • Select Path from System Variables. Click Edit.  Click New and insert C:\opencv\build\x86\vc10\bin. Click OK.  
  • Under User variables, click New. Insert OPENCV_DIR in the Variable name box and C:\opencv\build in the Variable value box. Click OK.  
  • Click OK in the Environment Variables window. 
  • Click OK in the Systems Properties window. 

FLTK

Download the FLTK Library from www.fltk.org:

  • Select the FLTK Library > Download menu item
  • Download the most recent version (1.3.2) fltk-1.3.2-source.tar.gz
  • Unzip to get the .tar file

If you do not have an application to unzip, download and install 7-zip from 7-zip.org. Note that you may have to deselect the localization component to get the English version

The fltk-1.3.2-source.tar file contains a fltk-1.3.2-source directory. This in turn contains a fltk-1.3.2 directory. Move this fltk-1.3.2 directory to C:\ and rename it to C:\FLTK

Go to C:\FLTK\ide\VisualC2010 and launch fltk.sln

  • Select Release from the drop-down Solution Configurations box (you only see this label when you hover over the box)
  • Select Build > Build Solution from the top menu (or press F7)
  • Select Debug from the drop-down option Solution Configurations box
  • Select Build > Build Solution (or press F7)

The CMake files in the CINDY Repository (next section) are configured to use the various FLTK libraries in C:\FLTK\lib and the include files in C:\FLTK\FL.

CINDY Repository

Eventually, the CINDY project will be archived on an SVN repository. For the moment, it is available as a simple .zip file. Unzip it so that you have a directory called C:\CINDY with the various subdirectories in the archive.

The next step is to build a MSVC++ .sln solution file so that you can compile all the CINDY executable components. To do this, you need to run CMake against the C:CINDY directory (where you will find the main CMakeLists.txt file)

  • Launch the CMake GUI from the Windows 7 toolbar.
  • In the Where is the source code: input (browse to) C:\CINDY
  • In the Where to build the binaries: input (browse to) C:\CINDY\build
  • Select File > Delete Cache from the top menu (you must do this the first time in case there is an old invalid configuration in the CINDY directory)
  • Click Configure
  • Select Visual Studio 10 (2010) from the drop-down menu as the generator for the project
  • Click Finish and watch CMake configure your project. The dialogue box will still highlighted in red so ...
  • Click Configure again and everything should be fine (unless you have forgotten to download and install OpenCV, in which case you will get an error and you will have install OpenCV and start this process again)
  • Click Generate to create the MSVC++ CINDY.sln file in C:\CINDY\build


Next, update your environment variables.

  • From Windows 10 toolbar, select Settings.  
  • Type Environment Variables  in the Find a Setting dialogue box. This will bring up a new Systems Properties window. 
  • Click the Environment Variables ... button. This will bring up a new Environment Variables window. 
  • Select Path from System Variables. Click Edit.  Click New and insert C:\CINDY\bin. Click OK.  
  • Under User variables, click New
  • Insert CINDY_ROOT in the Variable name box and C:\CINDY in the Variable value box
  • Click OK
  • Click OK in the Environment Variables window. 
  • Click OK in the Systems Properties window. 

Now you are ready to launch MSVC++ and build the CINDY component executables.

  • Go to the C:\CINDY\build directory and open the CINDY.sln file. This launches Microsoft Visual C++ 2010 Express.
  • Select Release in the Solutions Configuration box.
  • Select Build > Build Solution from the top menu, (if you don't see this and you see Debug > Build Solution instead, it's probably because your IDE is set to basic settings. To change this, select Tools > Settings > Expert Settings).


This will compile and link the components in the the C:\CINDY\bin directory. Check to see that both component executables are there. If it is not, then select Build > Configuration Manager from the menu and make sure the INSTALL check-box is ticked. Now rebuild the project again.

You are now ready to run the test applications that are included in each component directory (see directory structure below) and to begin developing your own components.

To run the test applications for the protoComponent and protoComponentGUI examples that are provided with the CINDY release, follow the instructions on the Software Users Guide.



Return to The CINDY Cognitive Architecture main page.