SIGVerse(English)?
SIGVerse
Summary
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.
* 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)
* 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)
Install JDK6 to your system. The JDK6 can be downloaded from Sun's download page
Install the packages through a package management system of the designated distribution
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.
Download Xj3D-1-0-linuxx86.jar from Xj3D download page, then install it to the system.
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
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 ---------------------------------------------------------------------------------------------
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.
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
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)
INSERT IMAGE HERE
After skipping the JRE installation, the installation of Xj3D library will start. The display should like as below.
INSERT IMAGE HERE
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.
INSERT IMAGE HERE
Press 'Next' after confirming the path is correct. Continue the installation as instructed.
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 installation of Xj3D library
(2) operation of VMML parser java program
are confirmed.
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')
INSERT IMAGE HERE
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 run 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)
INSERT IMAGE HERE
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)
INSERT IMAGE HERE
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.
INSERT IMAGE HERE
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 viewer
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
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.jar;/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 view is completed, and the viewer can be started by running SIGViewer.exe. (for the detail, please read 'Start the Viewer').
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.
No registries are modified at the installation. Please delete the SIGViewer.exe file.
Remove the path to jvm.dll.
The following command starts the simulation server with port number assigned. The default port number 5678 will be assigned when it is not specified.
% cd irwas-sim-XXX/src/server % ./simserver.sh -p 6000
The following is the option available for the simulation server.
% ./simserver.sh [-v <number>] [-p <number>] [-c <dir>] [-w <file>]
OPTION : -p <number> : server port number -c <dir> : configure file directory (default: ./conf) -w <file> : world file (default: MyWorld.xml) -v <number> : verbose number
SIGVerse system provides voice recognition service with julius. The controller of the agent can obtain the text recognized from the voice data, through the voice recognition service.
SIGVerse system uses Julius_sp as a voice recognition service provider. Julius_sp is a stand alone executable application. To use the voice recognition service, start the Julius_sp after starting the simulation server.
julius_sp accesses to the simulation server as it starts to inform the simulation server of its existence. Start it specifying the port number of the simulation server as below.
% cd irwas-sim-XXX/src/julius-sp % ./julius_sp -p 6500
The default port, number 6000, will be used if not specified.
Options available for the voice recognition service provider are as below.
% ./julius_sp [-p <number>] [-sp <number>] [-mp <number>] [-ap <number>] [-e <path>] [-C <config.jconf>]
OPTION : -p <number> : server port number -sp <number> : julius_sp service provider port number -mp <number> : julius module mode port number -ap <number> : julius adinnet port number -e <path> : julius location (default: /usr/local/bin/julius) -C <config.jconf;> : config file for julius
The julius_sp uses module-mode of julius for the communication. Also it uses adinnet for voice data connection. The adinnet uses voice input port via network provide by the julius. Specify the module-mode port number by -mp option, and connection port number for the adinnet by -ap option.
-e option is used to specify the absolute path where the julius executable is located. -C option specify the configuration file of the julius. For instance,
% ./julius_sp -e /usr/local/bin/julius-4.1.2 -C myconf.jconf
would make the julius start with executing
/usr/local/bin/julius-4.1.2 -C myconf.jconf
A configuration file named jsp.cfg can be used without specifying command line option. Command line option will be executed when the jsp.cfg and the command line option specifies the same options.
Please refer to the Julius manual for the configurations of the Julius in detail.
Run SIGViewer.exe.
The following dialogue will appear only on the first boot.
INSERT IMAGE HERE
This dialogue is to configure the graphical environment of the lettering.
Please choose either OpenGL or Direct3D9 for the sub lettering system use. (Both systems should work. Choose OpenGL if you are not sure.)
(CAUTION) Be sure to set"FullScreen"as"No"during the set-up dialogue.
(Note) The configuration will be saved as ogre.cfg. This configuration file will be used from the second boots. The dialogue box will not be appeared after the second boots.
If you would like to change the configuration, delete the ogre.cfg, and re-start the SIGViewer.exe. (The configuration dialogue will appear.)
Press "OK", then the configuration will be saved and the viewer will start.
INSERT IMAGE HERE
-s hostname
Specify the host name of the simulation server. The default is localhost.
-p portno
Specify the port number of the simulation server. The default is 7000.
-sp portno
Specify the port number opened by the viewer as a service provider. The default is 8000.
(Example)
myserver.co.jp as a simulation server, 7500 as the port number. Specify as below.
> SIGViewer –s myserver.co.jp –p 7500
When the startup.cfg is located in the same directory as SIGViewer.exe, startup.cfg will be used as the configuration file.
If the hostname of the simulation server, port number and other options are configured in advance and saved, it will be used automatically as the viewer starts.
Available items in the configuration file.
SERVER Assign the hostname of the simulation server. Unless specified, localhost is used as a default.
PORT Assign the port number of the simulation server. Unless specified, 7000 is used as a default.
SERVICE_PROVIDER_PORT Assign the port number opened by the viewer as the service provider. Unless specified, 8000 is used as a default.
MAIN_CAMERA_INIT_POS Assign the position of the main camera at the start up.
MAIN_CAMERA_INIT_DIR Assign the line of the sight direction of the main camera at the start up.
BACK_GROUND_COLOR Assign the background color of the main window.
MSG_WINDOW_LIMIT_TEXT_SIZE Assign the maximum length of the string displayed in the message window. Assigning as 0(zero) will enable to display as long as 2GBytes, which is the maximum. If you are not sure, leave it as 0.
SYS_MSG_WINDOW_LIMIT_TEXT_SIZE Limit the text size displayed in the message window. Same as above.
ATTR_NAMES_TO_SHOW Assign the name of attribute which will be displayed on the right hand side of the screen. All the attributes will be displayed if nothing is assigned.
SHOW_GROUND_GRID Assign whether display the grid on the flow or not. The default displays the grid.
GROUND_GRID_SIZE Assign the mesh spacing of the floor's grid. The default value is 10.
SHOW_AXIS_ARROW Assign whether display arrows of x, y, z axis. The default displays the allows.
AXIS_ARROW_LENGTH Assign the length of the arrows of the axis. The default value is 10.
VIDEO_RECORD_RATE Assign the fps in milli-second for recording the motion pictures. The default value is 500[msec]
VIDEO_RECORD_COMPRESS Assign whether compress the recorded video file(.svd) or not. The default value is true (compress).
Any line starting with # is considered as a comment.
[An example file of startup.cfg]
# # *************************************************** # # SIGviewer configuration file # # *************************************************** # ------------------------------------------------ # Host name and port number of the simulation server # ------------------------------------------------ SERVER=myserver.co.jp PORT=7000 # ------------------------------------------------ # Port number opened by the viewer as a service provider # # ------------------------------------------------ SERVICE_PROVIDER_PORT=8000 # ------------------------------------------------ # Position and line of sight direction # ------------------------------------------------ MAIN_CAMERA_INIT_POS=(30, 20, 50) MAIN_CAMERA_INIT_DIR=(-30, -20, -50) # ------------------------------------------------ # Background color # defined by R, G, B color component value (0.0 ~ 1.0) # ------------------------------------------------ BACK_GROUND_COLOR=(0.7, 0.7, 0.8) # ------------------------------------------------ # Maximum size of the text displayed in the message area # # 0 (default) = max size (2G chars) # ------------------------------------------------ MSG_WINDOW_LIMIT_TEXT_SIZE=0 SYS_MSG_WINDOW_LIMIT_TEXT_SIZE=0 # ------------------------------------------------ # Attribute name displayed in the attribute area # # Assigning nothing will display all the attributes # ------------------------------------------------ ATTR_NAMES_TO_SHOW=(name, class, x, y, z, qw, qx, qy, qz, vpx, vpy, vpz, vvx, vvy, vvz, scalex, scaley, scalez, x3dCenterOfMass, visStateAttrName, switch, visual) # ------------------------------------------------ # Show grids on the floor # ------------------------------------------------ SHOW_GROUND_GRID=true # ------------------------------------------------ # The grid size on the floor # ------------------------------------------------ GROUND_GRID_SIZE=10 # ------------------------------------------------ # Show arrows of x, y, z axis # ------------------------------------------------ SHOW_AXIS_ARROW=true # ------------------------------------------------ # Arrow length of x, y and z axis # ------------------------------------------------ AXIS_ARROW_LENGTH=10 # ------------------------------------------------ # Video recording frame rate [frame/msec] # ------------------------------------------------ VIDEO_RECORD_RATE=500 # ------------------------------------------------ # Flag of compression for video recording # ------------------------------------------------ VIDEO_RECORD_COMPRESS=true
(Note) Command line option will be executed when the startup.cfg and the command line option specifies same options.
Last modified: Mon Feb 25 11:13:10 JST 2008