[[SIGVerse(English)]]

&size(24){SIGVerse};

#contents
''Summary''



* What is SIGVerse? [#f00c31e6]

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.

&size(18){''System Architecture''};

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

&size(18){''Schematic Diagram''};

&size(18){''System Architecture''};
Physical Simulation in the virtual world
&size(18){''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.

&size(18){''System Architecture''};
Control of the Agents and the Sensory Function by the Controller
&size(18){''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 [#d23a0c2e]

** Simulation Server [#t1b792c7]

    *  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 [#bdf17c2d]

    *  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 [#lbe1ab7b]

** How to Compile the simulation server [#h1d49d1a]

Installation of Libraries
*** Install the Libraries [#b8310f09]

    * JDK6
- JDK6
~Install JDK6 to your system. The JDK6 can be downloaded from [[Sun's download page:http://java.sun.com/javase/downloads/index.jsp]]

      Install JDK6 to your system. The JDK6 can be downloaded from Sun's download page
- xerces-c, xerces-c-devel
~Install the packages through a package management system of the designated distribution

    * xerces-c, xerces-c-devel
- ode
~Download ode-src-0.8.zip from ODE project page(sourceforge.net) then, compile and install as below.

      Install the packages through a package management system of the designated distribution

    * ode

      Download ode-src-0.8.zip from ODE project page(sourceforge.net) then, compile and install as below.

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

    * Xj3D
- Xj3D
~Download Xj3D-1-0-linuxx86.jar from [[Xj3D download page:http://www.xj3d.org/download.html]], then install it to the system.

      Download Xj3D-1-0-linuxx86.jar from Xj3D download page, then install it to the system.
*** Compile [#xa18c5b8]

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 ----------------
   ----- srcs/simserver/Makefile.base ----------------
   ...
   #JRELIBDIR = `java-config -o`/jre/lib/amd64/server
   JRELIBDIR = /usr/java/latest/jre/lib/amd64/server
   ...
   ---------------------------------------------------

...
      % make 

#JRELIBDIR = `java-config -o`/jre/lib/amd64/server
JRELIBDIR = /usr/java/latest/jre/lib/amd64/server
*** Configure X3DParser.cfg [#of4cbce8]

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 [#r1d8a046]

Each steps will be explained as below.

*** Preparation [#ub0759d3]

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 [#ecce0a81]

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 [#ca9039bc]

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) [#ca94c99e]

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

    % make 

Configure X3DParser.cfg
If the result is shown as above on the screen,

X3DParser.cfg is a configuration file for X3D parser Xj3D. The simulation server call java implemented X3D parser, called Xj3D, from C++ through JNI.
(1) proper installatoin of Xj3D library
(2) operation of VMML parser java program 

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.
are confirmed.

----- srcs/server/X3DParser.cfg -------------------------------------------------------------

java.library.path=./
*** Install Visual C++ 2005 SP1 Redistributable Package [#c0646def]

java.class.path=<irwas-sim-dir>/jar/X3DParser.jar:<xj3d-dir>jars/xj3d-all.jar
---------------------------------------------------------------------------------------------
Next, we will install an runtime to run executable files compiled by Visual C++ 2005 SP1.

** Install the viewer [#r1d8a046]
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 [#k4c34af8]

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 [#m8db5315]

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 [#jc2757c7]

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) [#lceb2692]

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 [#e0f53a20]

*** Uninstall Xj3D library [#s8463888]

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 [#d71f73ce]

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


*** Change the PATH Environment variable [#u061bad2]

Remove the path to jvm.dll.

* How To Use [#x5afcaa2]

** Start the simulation server [#d4b98422]

** Start voice recognition service provider [#cfbcf2d1]

** Start the viewer [#o18cb30c]

** How to use the viewer [#u3ec2338]

* Create World File [#u550ef4f]

** coordinate system [#v5c343fe]

** Definition of Agent and Entity Class [#t8831c85]

** Configuration of the Agent and the Entity [#h3793008]

** World File [#b04bca0f]

* Control of the agent by a controller [#ud4323d3]

** Displacement Mode and Control Mode [#if130f5a]

** Create the controller [#z8cad858]

*** Create a controller to do nothing [#kb06c528]

*** Compile [#e74cd304]

*** Attach to an agent (Execute a test) [#u05241a2]

** A Sample of a controller [#laad5227]

** Reference [#n9930c41]





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


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