As for Ubuntu Linux, installing OpenHRP3 would become relatively easier, by following the procedures described in this page. We have confirmed successful install of OpenHRP3, on Ubuntu Linux 8.04, 8.10 and 9.04.

Before you begin

Since OpenHRP is an application based on 3D Graphics, it is necessary to confirm whether your pc is aware of handling 3D Graphics properly, before you begin installation. To confirm that, open a Terminal window and run following command;

$ glxinfo | grep rendering

  • If the result is: "direct rendering: Yes"
    Your system is capable of handling 3D graphics. Please proceed to the next section.

  • If the result is: "direct rendering: No"
    You have to install a graphics driver, that supports 3D acceleration feature.

    Note:

    1. Depending on the graphics board, sometimes the above procedure may not be applicable for your system.Even in this case, basically OpenHRP itself is working.But the 3D visualizations may become slower and would not perform effectively, due to the inactivity of 3D acceleration.

    2. Regarding the graphics board, we can assure that the boards having nVidia chipsets, would support 3D acceleration feature well in Linux platfoems.

    3. For Ubuntu guest platforms running on virtual machine environments, we have confirmed that the 3D graphics works fine even without installing a proper graphics driver.


Extracting OpenHRP3 source package

To install OpenHRP3, we use a script included in source package. To run the script, first you have to extract the downloaded source package(OpenHRP-xxx.zip).

Note:
Here, the phrase 'xxx' stands for the version of OpenHRP3, such as '3.1.0'. When you read, please substitute the version of the file you downloaded, with 'xxx'.

You may extract OpenHRP3 source, to a directory at anywhere you want. In this example, we extract to the 'OpenHRP' directory in our home directory. Open a Terminal window, and run the following commands, to extract source package.

$ cd 
$ mkdir OpenHRP
$ cd OpenHRP
$ unzip <source package download path>/OpenHRP-xxx.zip 

With these operations you will have OpenHRP3 source extracted to a new directory called 'OpenHRP-xxx' under 'OpenHRP' directory in your users home directory.


Running Package Installation Script

There is a directory called 'util', in OpenHRP3 source directory. Run 'installPackages.sh' script in this directory, with the parameters described below.

$ cd ~/OpenHRP/OpenHRP-xxx/util
$ ./installPackages.sh packages.list.ubuntu.10.04

If you are using Ubuntu-9.10, change the option to 'pakages.list.ubuntu.9.10'. Similarly change the option to 'pakages.list.ubuntu.9.04', if it is Ubuntu-9.04 .

If you are asked for license agreement during the installation, please do agree at all time you are asked.
Select 'Y'(Yes) for every confirmations.

This operation installs most of the required softwares to compile/run OpenHRP.

OpenRTM-aist-1.0.0-RC1

As announced in NEWS section this version of OpenHRP3 is now depended on OpenRTM-aist-1.0.0-RC1. Latest version of OpenRTM-aist is installed automatically by package-installation-script. 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.


Preparing to Compile

In OpenHRP-3.1.0(β) compile properties are configured by "cmake".

First, open a terminal and move to the OpenHRP3 source directory.

$ cd ~/OpenHRP/OpenHRP-xxx

Now we launch cmake using following command;

$ cmake .

With this verion of OpenHRP3 it bacame unnecessary to set macros for the default installation. However, if you made changes on CMAKE_INSTALL_PREFIX field or dependant files and library path, run following command and set the macro values as suitable.

$ ccmake .

If you made changes on macros in ccmake window, press 'c' to reconfigure the settings, and 'g' to generate Makefiles.


Compiling OpenHRP3

Move to OpenHRP3 source directory and run 'make' command.

$ make
$ sudo make install
$ sudo ldconfig

If the required softwares have been installed properly and the configuration of Make.vars has been done correctly according to the instructions of this page, OpenHRP3 execution files and scripts will be generated soon.

Eclipse

GrxUI is an Eclipse plug-in and it supports with Eclipse-3.4 . Download Eclipse All-in-one package from Download and extract to an appropriate folder.

Creating "GrxUI on Eclipse" plug-in

Eclipse settings

First we configure Eclipse compiler settings.
Select "Window" -> "Preferences" from menubar.
Select "Java" -> "Compiler" and set "Compiler compliance level" to "6.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 that located in OpenHRP-3.1.0(β) 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.

Note

Switching standard Java environment

On Ubuntu, a package called "gcj" is also available as a Java environment. However, we recommend "Sun Java environment" for the use of OpenHRP, which was already installed on your system by the above "package installation script".

Though you can select which Java to be used, when configuring OpenHRP, we recommend switching system standard Java environment.

You can switch Java environment and set the new one as default, with this command.

$ sudo update-java-alternatives -s java-6-sun

Confirm the switching from 'Java-gcj' to 'Java 1.6.xx' by running following command.

$ java -version
java version "1.6.0"
Java(TM) SE Runtime Environment (build 1.6.0-b105)
Java HotSpot(TM) Server VM (build 1.6.0-b105, mixed mode)

Note :

    We have noticed that, when applying Ubuntu regular system updates, it automatically switches the system back to 'Java-gcj' environment, which may cause to compile error or Java exceptions. If you are not willing to use 'Java-gcj' for any other applications, we recommand you to uninstall 'Java-gcj', so that the problem will be resolved. (Refer troubleshooting for more details.)


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. It will not be deleted by,

$ make clean
command. You will have to delete it manually.
Default path to bin/dos is at "/usr/local/bin/unix".