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

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.


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.0.5'. 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 (The directory where source package downloaded)/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.8.04

The above sample shows the argument for Ubuntu-8.04. However, if you are on Ubuntu-8.10 change the argument to 'packages.list.ubuntu.8.10'.

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.


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 1:

    we have noticed a sudden failure of simulation execution when using jdk-1.6.xx on Ubuntu 8.04. So please use jdk-1.5.xx, until we fix this issue.

      [altering java]
      $ sudo apt-get install sun-java5-jdk
      $ sudo update-java-alternatives -s java-1.5.0-sun
    
      [rollback]
      $ sudo update-java-alternatives -s java-6-sun
    
      [view existing java environments]
      $ sudo update-java-alternatives -l
      

    Detailed symptom is as follows; After loading a model and 1-2 minutes later, the connection between ModelLoader(VRML model parse server) and the other servers suddenly drops. The system get back to normal by re-starting GrxUI, but the problem will still exist until you switch to jdk-1.5.

Note 2:

    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.)


Preparing to Compile

There is a file named 'Make.vars' in source directory, that defines configuaration settings to compile OpenHRP. Usually this file needs to be re-configured before compiling OpenHRP according to the description 'About Make.vars'. However, to ease the process, here we use a pre-configured file that suit with the install instructions of this page.

First, move to the source directory of OpenHRP3, in command line.

$ cd ~/OpenHRP/OpenHRP-xxx

Then create the configuration file "Make.vars", using following copy operation.

$ cp Make.vars.ubuntu.8.10 Make.vars

After completing upto this stage with default installation, there will be no need to edit the configuaration file "Make.vars".


Compiling OpenHRP3

Within the source directory of OpenHRP3, run 'make' command.

$ make

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 by soon.

Once you have completed compilation, run a Sample Simulation, and confirm whether the compilation is successful.

!NOTICE!

In the case of after ubuntu-9.04

If you install OpenHRP on the environment after Ubuntu-9.04, sample project may not work. In such case, open terminal window and run,

$ openhrp-aist-dynamics-simulator -ORBInitRef NameService=corbaloc:iiop:localhost:2809/NameService
if you get the output as follows,
IDL:omg.org/CORBA/TRANSIENT:1.0
the problem has occured because ipv6 on Ubuntu-9.04 has not been enabled by default.

To resolve this problem, locate "/etc/hosts" file and comment-out the line "::1 localhost ip6-localhost ip6-loopback" where keeps localhost settings of IPv6.

Softwares that no more require Individual Install

This section is for users of OpenHRP previous versions. If you are using OpenHRP Ver3.0.3 for the first time, please skip this section and continue with "Switching standard Java environment".

Java 3D

This section is for OpenHRP Ver.3.0.1 or previous version users. In previous versions of OpenHRP3, we used "lg3d" as our Java3D library. But;

  • It makes duplicate package of JDK, with SUNs' official JDK package, and become redundant.
  • "lg3d" hosting servers goes down at times, and it cause to fail installing/updating packages.
  • Java3D Ver.1.5.x series has a trouble when acquisitioning depth buffer.(As of 19/09/2008)
To avoid these troublesome situations regarding with Java environment, we decided to include SUN's official Java3D(Ver1.4.1) package in OpenHRP3 source it self. Therefore Java 3D became not necessary to install individually, starting with Ver.3.0.2 .

! NOTICE !

Uninstalling lg3d

If you want to uninstall lg3d from your system, run following command;

Note:
Do not uninstall lg3d, if you hope to use Ver3.0.1 or previous versions together with new version.

$ sudo aptitude remove lg3d-java3d lg3d-jdk
Now delete "Source package download path" from "Software source", which you added when installing Ver 3.0.1 or previous OpenHRP versions.
deb http://javadesktop.org/lg3d/debian stable contrib

Java Media Framework (JMF)

This section is for OpenHRP Ver.3.0.1 or previous version users. Due to the same reason like Java3D, JMF-2.1.1e has also been included in OpenHRP3 package it self, so it is also no need to install separately.

OpenRTM-aist

In OpenHRP Ver.3.0.2 or previous versions, OpenRTM-aist-0.4.2 had to be installed separately. But starting with Ver.3.0.3, it came to be able to install by the install-script automatically.


tvmet

Starting with Ver.3.0.6, tvmet came to be able to install by the install-script automatically.