SIGVerse(English)?

SIGVerse

Summary

What is SIGVerse?

SIGVerse is a simulator system, which provides virtual environment closer to the real world compared to the existing ones. The objective of the SIGVerse is to be a platform to realize not only a virtual world for robot and physics simulation, but also sensory functions of both human beings and robots, and communication among agents.

System Architecture

The system consists of a simulation server for the virtual world, controller of agents and viewer of the virtual world.

Schematic Diagram

Physical Simulation in the virtual world

In the virtual world made up within the simulation server, agents (for example, human beings, robots and so on) and entities (for example, objects, such as a desk or/and an apple, which is not an agent) can be allocated. As the time moves in the virtual world, motion of agents and entities realized by applying external force as well as collision phenomena of agents and entities can be observed.

Control of the Agents and the Sensory Function by the Controller

Actions and behaviors of the agents can be control by attaching a controller to the agents. Agents are equipped with high or low order visual/auditory function. Communication among agents and actions according to the surrounding environment can be realized by utilizing these functions.

Requirements

Simulation Server

   *  Language Used
     C++
   * OS
     Linux
   * Library Required(Versions used for development)
     gcc(4.1.2)
     xerces-c(2.7.0)
     ode(0.8)
     JDK(1.6.0)

Viewer

   *  Language Used
     C++ (Visual C++ 2005)
   * OS
     Microsoft Windows XP, Windows Vista (32bit)
   * Library Required(Versions used for development)
     OGRE(1.4.9)
     JRE(1.6.0)
     Xj3D(1.0)
     OpenAL(1.1)

Compilation and Installation

How to Compile the simulation server

Install the Libraries

           # cd /usr/local/src
           # unzip -x ode-src-0.8.zip
           # cd ode-0.8/
           #  ./configure --disable-tests --without-x --enable-double-precision
           --with-trimesh=opcode --enable-release --enable-shared
           # make
           # make install
           

The simulation uses double-precision and the algorithm of trimesh uses OPCODE. Please configure with option --without-x if there is no X or glut-devel environment.

Compile

Initialization after extracting irwas-sim source packages

   % cat irwas-sim-XXX.tar.gz | tar zxvf -
   % cd irwas-sim-XXX
   % make init   # only for the first time

'make' after modifying JRELIBDIR of the srcs/simserver/Makefile.base according to the environment.

  ----- srcs/simserver/Makefile.base ----------------
  ...
  #JRELIBDIR = `java-config -o`/jre/lib/amd64/server
  JRELIBDIR = /usr/java/latest/jre/lib/amd64/server
  ...
  ---------------------------------------------------
     % make 

Configure X3DParser.cfg

X3DParser.cfg is a configuration file for X3D parser Xj3D. The simulation server call java implemented X3D parser, called Xj3D, from C++ through JNI.

jar files needed for simulation server execution are included in jar directory. Please change the value of java.class.path of srcs/server/X3DParser.cfg. <irwas-sim-dire> is the directory where the package was extracted <xj3d-dir> is the directory of Xj3D in full path.

  ----- srcs/server/X3DParser.cfg
  -------------------------------------------------------------
  java.library.path=./
  java.class.path=<irwas-sim-dir>/jar/X3DParser.jar:<xj3d-dir>jars/xj3d-all.jar
  ---------------------------------------------------------------------------------------------

How to Install the viewer

Each steps will be explained as below.

Preparation

Abbreviations are used for directory name in the following explanation

[SIGVIEWER_ROOT]

   The directory where the client installation packages were extracted. Any directories should work. '[SIGVIEWER_ROOT] = /MySIGViewer' is used for the following explanation. 

[JRE_ROOT]

   The directory where JRE (Java Runtime Environment) has been installed. 

Install JRE 1.6.0

Please install JRE 1.6.0, when JRE or JDK with 1.6.0 or abobe is not installed on the system. The installer of the JRE 1.6.0 is located at

[SIGVIEWER_ROOT]/downloads/JRE6/jre-6u7-windows-i586-p-s.exe

Please execute this. (it can be installed to any directory)

Please make sure to remember the directory where the JRE is installed. This directory will be referred as [JRE_ROOT] in the following explanation.

If JRE is installed at /Java/jre1.6.0_07,

[JRE_ROOT] = /Java/jre1.6.0_07

for example

If JDK is install instead of JRE, the directory name 'jre' under the JDK's top directory will be [JRE_ROOT].

(ex) when JDK 1.6.0_07 is installed to /Java/jdk1.6.0_07

[JRE_ROOT] = /Java/jdk1.6.0_07/jre

is assigned

Install Xj3D library

Run Xj3D-1-0-windows-full.exe located at directory [SIGVIEWER_ROOT]/downloads/Xj3D.

Xj3D installer will automatically run an installer of JRE 1.4.2.

JRE 1.6.0(or above) is already installed at the last step, so this procedure needs to be skept. Please terminate the JRE installation by pressing 'cancle' on the display. (The installer of Xj3D library itself will be run even the installation of JRE is canceled)

After skipping the JRE installation, the installation of Xj3D library will start. The display should like as below.

After clicking 'Next' for some times, installation directory of the Xj3D will be needed to specified.

specified the installation directory as [SIGVIEWER_ROOT]/Xj3D For example, if [SIGVIEWER_ROOT] is /MySIGViewer, specified the path as below.

Press 'Next' after confirming the path is correct. Continue the installation as instructed.

Assurance Test(1)

Confirm the installation of the Xj3D library by an assurance test program. Modification of go.bat

go.bat is a batch file to start java class files that is spcecified as arguments.

Run cmd, then move to [SIGVIEWER_ROOT]/x3d/parser/java/X3DParser/bin. We modify the go.bat file in this directly for the assurance test.

In go.bat, there is a line to specify the location of the Xj3D library. Please change the location to where the Xj3D was installed in the previous step.(Red portion of the following line)

@echo off

java -Djava.library.path=/SIGViewer/x3d/parser/java/X3DParser/bin -classpath .;/SIGViewer/Xj3D/jars/xj3d-all.jar %1 %2 %3 %4 %5 %6

For example, if

[SIGVIEWER_ROOT] = /MySIGViewer

change the line as below.

@echo off

java -Djava.library.path=/MySIGViewer/x3d/parser/java/X3DParser/bin -classpath .;/MySIGViewer/Xj3D/jars/xj3d-all.jar %1 %2 %3 %4 %5 %6

Run go.bat

Type as below at the command prompt.

go X3DParserTest 0 list2-1.x3d

(Note) 'go X3DParserTest.class 0 list2-1.x3d' will not work properly. (Do not type .class)

It is successful if the parse result is displayed as below. (partially omitted)

WorldRoot

 Background
	[ groundAngle ] :
	[ groundColor ] :
	[ skyAngle ] :
	[ skyColor ] : 1.0 1.0 1.0

...

 [ geometry ]
	Box
	  [ solid ] true
	  [ size ] 4.0 3.0 2.0
 [ bboxSize ] -1.0 -1.0 -1.0
 [ bboxCenter ] 0.0 0.0 0.0

If the result is shown as above on the screen,

(1) proper installatoin of Xj3D library (2) operation of VMML parser java program

are confirmed.

Install Visual C++ 2005 SP1 Redistributable Package

Next, we will install an runtime to run executable files compiled by Visual C++ 2005 SP1.

Installer of the Visual C++ 2005 SP1 runtime is

[SIGVIEWER_ROOT]/downloads/VC2005_sp1_redist/vcredist_x86.exe

Please run this executable file.

Dialog shown as below will appeared when it is run. Installation is completed once the dialog disappeared. (there will be no message such as 'installation complete')

Install Direct3D9

Next, let's install runtime of DirectX 9 to the system.

The Installer of the DirectX 9 runtime is

[SIGVIEWER_ROOT]/downloads/directx_nov2008_redist/directx_nov2008_redist.exe

Please runt this executable file.

As a dialog appeared as below, asking for location to extract the files. Please specify a directory as your need.(below is an example with c:\dxRuntimeSetup as the directory)

Please run DXSETUP.exe, which can be found in the directory where the files are extracted, to install DirecX 9 runtime. (The extracted files can be deleted after the completion of the installation)

Install OpenAL library

Next, let's install OpenAL runtime library. The installer of the OpenAL runtime is in

[SIGVIEWER_ROOT]/downloads/OpenAL/oalinst.zip

Please extract this file and run oalinst.exe. Press 'OK' as the dialog shown. This will execute the installation.

Configuration for running the viewer

Add the path to jvm.dll

jvm.dll is a JNI (Java Native Interface) related DLL. X3D program is written in C++ and call the Xj3D library through JNI. In order to do this the path to jvm.dll is needed to be added.

The jvm.dll is located at

[JRE_ROOT]/bin/client

in general.

Please add this directory to the path.

Modify X3DParser.cfg X3DParser.cfg is located at

[SIGVIEWER_ROOT]/SIGViewer/release

and used by the viewr

Please modify the X3DParser.cfg to configure the class path of java. Specify the path for your need, as same as in go.bat test program. (Red portion in the following line)

#

# Library Path

# java.library.path=/SIGViewer/x3d/parser/java/X3DParser/bin

#

# Class Path

# java.class.path=.;/SIGViewer/Xj3D/jars/xj3d-all.jar;/SIGViewer/x3d/parser/java/X3DParser/bin

For example, if

[SIGVIEWER_ROOT] = /MySIGViewer

then, change the portion as below(blue part)

#

# Library Path

# java.library.path=/MySIGViewer/x3d/parser/java/X3DParser/bin

#

# Class Path

# java.class.path=.;/MySIGViewer/Xj3D/jars/xj3d-all.jar;/MySIGViewer/x3d/parser/java/X3DParser/bin

Assurance Test(2)

Let's confirm whether the Xj3D library can be called through JNI.

Please open the command prompt and move to the directory as shown below.

cd [SIGVIEWER_ROOT]/SIGViewer/release

Next, run X3DParserTest.exe.

X3DParserTest.exe

It should be displayed on the screeen as below.

usage: X3DParserTest.exe testNo VRMLFile [args] [-MFMax nMFMax] [-log logfile] testNo ... Test Number

0 : VRMLFile parser
1 : List child nodes of the root node
2 : Display node names
3 : Display fields
4 : Display the field of Box node
5 : Display the field of Transform node
6 : Calculation of simple geometry
7 : Display files in OpenHRP format
8 : Display all DEF names
9 : Display contents of specified DEF node

nMFMax ... Display values of MF field with abbreviated notation (>0) logfile ... Redirect logs (default is stderr) (ex) X3DParserTest.exe 0 sample.x3d X3DParserTest.exe 1 sample.x3d -MFMax 3 # Display only three MF fields X3DParserTest.exe 5 sample.x3d -log out.txt # redirect the log to out.txt

If the displayed contents are not like above, it is possible that the Visual C++ 2005 SP1 runtime is not installed properly.

Next, let's confirm whether the call through JNI functions properly. Please type as below.

X3DParserTest.exe 1 apple.wrl

It is successful if you see contents like below on the screen.

testNo : 1 nMFMax : 0 logfile : stderr

*** JavaVMOption *** [#j07ce002] options[0].optionString = (-Djava.library.path=/MySIGViewer/Xj3D/bin) options[1].optionString = (-Djava.class.path=.;/MySIGViewer/Xj3D/jars/xj3d-all.ja r;/MySIGViewer/x3d/parser/java/X3DParser/bin) Java VM start ok

**** Children of Root Node **** [#g9c5a1b2] WorldInfo NavigationInfo Switch Group

Now,

(1) Execution of programs compiled with Visual C++ 2005. (2) VRML parser program written in java can be called from C++ properly.

are confirmed.

Preparation to start the vier is completed, and the viewer can be started by running SIGViewer.exe. (for the detail, please read 'Start the Viewer').

Uninstall the viewer

Uninstall Xj3D library

Uninstall the Xj3D library by using uninstaller.jar, which is located at directory [SIGVIEWER_ROOT]/Xj3D/Uninstaller. Please type as below.

java -jar uninstaller.jar

Uninstallation will be complete by following instructions.

Uninstall SIGViewer.exe

No registries are modified at the installation. Please delete the SIGViewer.exe file.

Change the PATH Environment variable

Remove the path to jvm.dll.

How To Use

Start the simulation server

Start voice recognition service provider

Start the viewer

How to use the viewer

Create World File

coordinate system

Definition of Agent and Entity Class

Configuration of the Agent and the Entity

World File

Control of the agent by a controller

Displacement Mode and Control Mode

Create the controller

Create a controller to do nothing

Compile

Attach to an agent (Execute a test)

A Sample of a controller

Reference

Last modified: Mon Feb 25 11:13:10 JST 2008


Front page   New List of pages Search Recent changes   Help   RSS of recent changes