Before you begin

Please confirm that if your "Computer Name" is not longer than 8 letters and contains alpha-numeric letters only. Unless the Nameserver will not be started normally. Please refer here for more details.

Setup Environment

At first, please install required softwares to compile/run OpenHRP3 as belowing procedures.

If you have already installed a compatible version of following software, you can simply skip that part of installation and use the currently installed package. Also you are free to browse and change the installing path and set where ever you wish to install. If you choose a different location instead of default installing path, please beware to specify that in "CMake Build" properties explained below.

As announced in NEWS section OpenHRP3-3.1.0 is depended on OpenRTM-aist-1.0.0-RELEASE. Current version of OpenHRP3 may not be supported with some sample codes and can not be compiled upon OpenRTM-aist-0.4.2 (previous version) environment.However, OpenHRP3 core modules are still supported and could be compiled upon OpenRTM-aist-0.4.2. This supporting is implemented for the user who wish to use current version of OpenHRP3 upon previous version of OpenRTM-aist.

Installing Visual C++ Compiler

Currently we support Visual C++ 2008 as C++ compiler for Windows.

You can use Express Edition(free distributed) as well as commercial editions of Visual C++ provided by Microsoft. If you wish to install the Express Edition, use the following link and download the web-installer of "Visual C++ 2008 Express Edition". Proceed the installation process, according to the installer instructions. You don`t have to change the installer options. Just keep it as default.

If it is "Visual Studio 2008 Standard Edition", please install both C++ and C#.

Installing JDK

Please download "JDK for windows" from the download page of JavaSE at http://java.sun.com/. Currently, we have checked and confirmed the compatibility issues with versions of JDK5 and JDK6.

Once you run the downloaded file, installer of JDK will be launched. Please install as guided by the installer. You can proceed with the default installer settings, witout making any changes.


Installing supported softwares

Installing with "Environment Configurator"

To complete the environment configuration, there are some other supported softwares other than above mentioned, need to be installed on your system. To make the download and install process of those softwares ease and automate, we have developed and introduced an "Environment Configurator" package, starting from OpenHRP Ver.3.0.3 .

If you are newly installing OpenHRP3 on your system, please visit Downloading related softwares page in this site; then download and run following package. It will handle rest of the configurations of your system environment.

  • Environment Configurator -Windows: Package-1.2.0.zip
  • Please note that, this configurator requires "Windows Installer 3.1" and ".NET Framework 3.5" or later version installed on your system.

    • "Windows Installer 3.1" should have alrerady been installed on your system, since it comes with Windows system updates. Detailed referance and installer is available at here.
    • ".NET Framework 3.5" should have alrerady been installed on your system, since it comes with VC++ application updates. Detailed referance and installer is available at here.

If you are updating OpenHRP3 or if you hope to install those supported softwares individually, please go through "Softwares Install by Environment Configurator".


When you download and extract "Package-1.2.0.zip", you will have a folder called Package. Within the Package folder find the file "install.cmd" and run it.

.¥Package¥Install.cmd

This will start downloading supported softwares and installing automatically.
If you are on Windows Vista, run as administrator as shown in Figure1.


Figure 1: Run as Administrator


During the installation process, a sub-installer called PyYAML will be pop-out in GUI mode (Figure 2). Proceed the sub-installer pressing Next button with the default installer settings.


Figure 2: PyYAML Installer


When the installation completed successfully, it will be showed as Figure 3;


Figure 3: Build Completed


After the completion of installation process, you may delete the Package folder.

Followings are the supported softwares you just installed;

  • OpenRTM-aist Ver.1.0.0-RC1
  • omniORB Ver.4.1.2
  • python Ver.2.4.4
  • PyYAML Ver.3.05
  • Jython Ver.2.2.1
  • tvmet Ver.1.7.2
  • CLAPACK Ver.3.1.1
  • Boost Ver.1.35.0

Except for these, OpenHRP-3.1 series needs some other additional softwares installed individually, to complete the environment configuration.

CMake

Visit CMake-2.6 release's page and locate ver.2.6.2 release for Windows; simply download and install it.

Note:
On Windows environments, having both Cmake-2.4.x and Cmake-2.6.2 installed at the same time, causes problems when generating VC++ project files. Please beware to uninstall previous versions of OpenHRP3, before you move to CMake-2.6.2.

Eclipse

GrxUI is an Eclipse plug-in and it supports with Eclipse-3.4 versions. Please download all-in-one packages of EclipseSDK v3.4.2(Ganymede SR2) at "Downloads" page in this site. These all-in-one packages includes all the plugins that required for compiling and executing GrxUI.

Note:
If you are on Windows Vista environment and extracting the package using system default extractor, you will be lead to a message saying "Source path is too long". Even we haven't noticed any problems by selecting "skip" option, it is recommend to use a dedicated extracting software for this purpose.

Extracting OpenHRP3 Package

Please download the OpenHRP3 source archive from "Downloading OpenHRP3" page and extract it to a appropriate directory.

Note:
When extracting, we recommond you to select a path where that does not contain commas or unicode characters. Or move the extracted directory to a path where that does not contain those characters. So then you can prevent the failiures that could be occured due to faulty path, during the project build or at runtime.


Generating Build-files with CMake

Launch cmake and locate following fields at the top.

where is the source code:
where to build the binaries:

Specify OpenHRP3 home directory for them both.
Then check "show Advanced Values" checkbox.
Click "Configure" button and select "Visual Studio 9 2008" in the "Select Generator".
Errors will be displayed, when it can not locate the path to specified dependant libraries.
Click "OK" to pass those errors or "Cancel" to supress further messages.
Enter the correct path to the appropriate field and click "Configure".
Repeat the process until all the errors get cleared.

If you installation proceeded according to the default settings explained in this tutorial, cmake will configure everything for you automatically. If not you will have to change the appropriate fields and reconfigure.

You can customize the OpenHRP3 install directory, by changing "CMAKE_INSTALL_PREFIX" field.

The "OK" button next to the "Configure", will be activated when all the errors are gone. Click the "OK" button and build files (project files, Makefile etc) will be generated according to your configuration settings and placed in the source directory. Click "OK" to pass the warning dialogs during the process.


Project Compilation using Visual C++

How to open project

Go to the directory where you have extracted OpenHRP3(the home directory of OpenHRP3). Locate and double click on the file called "OpenHRP.sln"(Figure 4).


Figure 4: Solution file

OpenHRP3 Project will be open in Visual Studio, as shown in Figure 5.


Building the Project

Once properties are configured correctly, you can build the project as below.

  1. Select Solution Explorer.
  2. Select Release.
  3. Select "Solution Build" from "Build" menu.
  4. Build starts and results will be displayed.


Figure 5: Build

Finally, the results will be shown as

========== Build: 37 succeeded, 0 failed, 2 up-to-date, 1 skipped ==========

If there is no errors, your build has been succeeded.
Number of sucesses may differ from version to version, but the important point is whether there is 0 failed.

In case of compilation failiure, recheck the Setup Environment from the beginning and confirm whether everything went correctly. Open the "Error list" window of Visual C++, and check the error in detail.(To open Error list: Select 'View' -> 'Other winows' -> 'Error list'. Error winodow will be displayed at the bottom of Visual C++ window, along with 'output' window.)

Next, build the "INSTALL" project to get copied execution files, to the OpenHRP3 install directory where you specified in "CMAKE_INSTALL_PREFIX".


Figure 6: Building INSTALL project

Build the INSTALL project using the popup menu, as shown in Figure 6. Popup menu can be viewed as follows;

  1. Select "Solution Explorer"
  2. Select INSTALL project
  3. Right-click on INSTALL project

Note:
On Windows Vista environments, UAC(User Account Control) may prohibit copying files to C:\Program Files folder due to security reasons, and cause to end up the project build with errors. In that case, try one of the following method and rebuild the INSTALL project.

Abolishing bin/dos

Using of bin/dos folder in OpenHRP3 program directory is abolished starting from OpenHRP3.1.0(β2). Therefore if you upgraded from a prior version of OpenHRP3, you may delete bin/dos folder at the path where you specified in CMAKE_INSTALL_PREFIX field.
Default path is C:/Program Files/OpenHRP/bin/dos.


Defining Environment Variables

Now you are to launch Eclipse, but before that you have to define some environment variables that could be used during Eclipse execution. These variables can be defined in Eclipse startup batch file or as systems's environment variables. However, if you have several installtions of OpenHRP3 and want to use each of them individually, it would be better to prepare individual batch file for each installation rather than changing system environments frequently.

Here we show how to define in a startup batch file.

cd <Eclipse extracted folder>/eclipse
set BIN_DIR=<OpenHRP3 installed folder>/bin
set BIN_SFX=.bat
set PROJECT_DIR=<OpenHRP3 installed folder>/share/OpenHRP-3.1/sample/project
set PATH=%PATH%;%BIN_DIR%
eclipse.exe

Note: <OpenHRP3 installed folder> : Location specified in CMAKE_INSTALL_PREFIX


Creating "GrxUI on Eclipse" plug-in

Installing Java3D plug-in

Launch Eclipse using batch file (or directly running eclipse.exe, if you registered the environment variables as system variables).
Close "Welcome" Panel.
Select "Help" -> "Software Update" -> "Find and install" from menubar.
Select "Search for new features to install" and click "Next".
Click "New Archived Site" button and browse the downloaded "java3declipse-xxxx.zip".
"Edit Local Site" dialog will be displayed and click "OK". Confirm that the selected package is checked in "Sites to include in search" list and click "Finish".
Check "java3declipse-xxxx.zip" in "Select the features to install" panel and click "Next".
Read the license agreements and select "I accept the terms in license agreements" and click "Next".
Keep the "Install Location" as it is in default and click "Finish".
"Verification" dialog will be displayed and click "Install All".
Now you will be asked whether to restart the Eclipse and click "Yes".

Eclipse settings

First we configure Eclipse compiler settings.
Select "Window" -> "Preferences" from menubar.
Select "Java" -> "Compiler" and set "Compiler compliance level" to "5.0" or higher.
Click "Apply" to save the settings.
Here you will be asked whether to rebuild the project and click "Yes".

Now we configure, the encoding type of workspace.
Select "General" -> "Workspace" and click "Other" in "Text file encoding".
The nearby menu will be activated and select "UTF-8" in it.
Click "Apply" to save the settings, and "OK" to close the window.

Eclipse.ini settings

Here we describe improving peroformance of saving log files by setting heap memory. Locate the Eclipse.ini file placed in Eclipse installed folder, and open it in text editor.

-Xms40m
-Xmx256m
You will see the values defind for -Xms and -Xmx options.
Setting a larger value as heap memory (a value greater than -Xms but smaller than -Xmx) would improve the performance of Eclipse from the time it is started.
For example,
-Xms1024m
-Xmx1024m
These settings assign a 1GB heap memory for GrxUI (in Eclipse), from the time it is started. However, you must be aware of how much you can assign for heap, within the available system memory.

GrxUI plug-in's Import / Compile / Export / Install

Import

Select "Window" -> "Open Perspective" -> "Other" from menubar.
Select "Plug-in Development" and click "OK".
You can see the perspective has been changed from "Java" to "Plug-in Development" at the top-right corner.

Select "File" -> "Import" from menubar. Project import wizard will be opened.
Select "General" -> "Existing Projects into Workspace" and click "Next".
Click the "Browse" button next to "Select root directory" textbox and select "GrxUIonEclipse-project-0.9.8" directory located in OpenHRP3 source directory.
Confirm that "com.generalrobotix.ui.grxui" is checked in the "Projects" list and click "Finish".

Note:
If you get type mismatch error in source code, please refer Troubleshooting.

Compile

When you complete the above process, the projejt will be build automatically. You can see the prograss bar indicator at the right-bottum corner of the status bar. It will be disappeared when the project build is completed.

Export

Select "File" -> "Export" from menubar. Project export wizard will be opened.
Select "Plug-in Development" -> "Deployable plug-ins and fragments" and click "Next".
Check "com.generalrobotix.ui.grxui(0.9.8)" in "Available Plug-ins and Fragments" list.
Select "Options" tab and uncheck "Package plug-ins as individual JAR archives".
Then select "Destination" tab and specify an appropriate directory to export the plug-in; then click "Finish".
This will create "plugins" directory inside the specified directory. The "com.generalrobotix.ui.grxui_0.9.8" directory that generates inside the "plugins" directory, is supposed to be the GrxUI plug-in.

Note:
Please refer Can not export 'GrxUI on Eclipse'. (17-09-2009 update)

Install

Exit from Eclipse and copy the generated GrxUI plug-in directory to the "eclipse/plugins".

Starting GrxUI

Start Eclipse and select "Window" -> "Open Perspective" -> "Other" from menubar.
Select "GrxUI" perspective and it will be launched.
Here, we would like to mention a general behavior for Eclipse. When a plug-in is newly installed and starting for the first time;

$ eclipse -clean

edit the batch file and add "-clean" option to the Eclipse starting command.