[[SIGVerse(English)]]
&color(red){&size(20){This information is old. Please do not refer this page, but [[Tutorial]]};};

&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){''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){''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]

*** Install the Libraries [#b8310f09]

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

- xerces-c, xerces-c-devel
~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.

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

*** Compile [#xa18c5b8]

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

Abbreviations are used for directory name in the following explanation

*** Preparation [#ub0759d3]

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

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.


*** 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


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.


*** Install Visual C++ 2005 SP1 Redistributable Package [#c0646def]

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


*** 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 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


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

INSERT IMAGE HERE

*** 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 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



*** 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.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>#AnchorSTW]]').


** 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]

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



** Start voice recognition service provider [#cfbcf2d1]

SIGVerse system provides voice recognition service with [[julius:http://julius.sourceforge.jp/]]. 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.

** Start the Viewer &aname(AnchorSTW); [#p188e0b1]

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


- Command Line Options

''-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


- Configuration File

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.

** How to use the viewer [#u3ec2338]

*** Start up screen [#nbfef36f]

INSERT IMAGE HERE

(1) Main window~
(2) Sub window~
(3) Lower panel tab~
(4) Right side panel tab~

The following explain each item.

*** Main window [#q4e94e6a]

- Displacing the point of view

Dragging the mouse keeping right button clicked will move the point of view.

, Operation , Behavior of SIGViewer 
, Drag holding right button down , Rotation of the point of view 
, Drag holding right button + SHIFT down , Displacement of point of view (up and down / right and left) 
, Drag holding right button + CTRL down , Displacement of point of view (depth) 


- Selecting objects

An object can be selected by left clicking on the mouse.~
Dragging the mouse while holding left button down moves and rotates the object.

, Operation , Behavior of SIGViewer 
, Left click , Select the object 
, Drag holding left button down , Rotate the object 
, Drag holding left button + SHIFT down , Move the object (up and down / right and left) 
, Drag holding left button + CTRL down , Move the object (depth) 

*** Sub window [#t7bd5c49]

Displays the view from the viewpoint of selected agent by mouse click

INSERT IMAGE HERE

*** Lower panel [#c63bd271]

- Message tab

Displays speech of the agent(s)

INSERT IMAGE HERE

- Syslog tab

Displays the system log

INSERT IMAGE HERE

- Comm. Tab

Operation of communication with the server

INSERT IMAGE HERE

-- "Connect to Sim Server" button~
    Connect to the simulation server.
    Host name of the server and the port number need to be specified either in the startup.cfg or in the start up option.

-- "Disconnect Sim Server" button~
    Disconnect from the simulation server.


-- "Start World Update" button~
    Obtain the simulation status of the server sequentially and reflects in the main window. (perform toggle)

    While "Start World Update" button is "ON", simulation status on the server will be displayed every moment.
    (in the mean time, the objects cannot be moved by mouse operation)

    When the button is "OFF", the objects displayed in the viewer can be moved and rotated freely.


-- "SIM_CTRP_CMD" area~
    Start/Stop the simulation.
    Select command, such as "START", "STOP" and so on, from the drop down list.
    Press "Send" sends the selected command to the server.



- Video tab

Record/Play the simulation.

INSERT IMAGE HERE

-- (1) Video file name input area~
    Specify the name of video file to play/record.
    The extension of the video file is .svd, which is a SIGVerser original video format.


-- (2) "Refer" button~
    Open a dialogue to specify the name of video file.
    Selecting a file displays the selected file's name and the path to "(1) the Video file name input area".


-- (3) "Load" button~
    Load a video file specified in "(1) Video file name input area".


-- (4)Video playback control button~
    Press "(3)button" to play the loaded video.
    Available operations are Play, Pause, Rewind, Fast-forward, and so on.


-- (5) "Start Record" and "Stop Record" button~
    Pressing "Start Record" records the ongoing simulation.
    Pressing "Stop Record" saves the recorded result to the assigned file at(1) 




*** Right side panel [#ka910330]

- Attributes tab

Display the agent's attributes and other information.

-- Attributes~
    Display attributes of a selected agent.

INSERT IMAGE HERE

Displayed attributes can be specified at ATTR_NAMES_TO_SHOW in the startup.cfg file.~
(Assigning nothing will display all the attributes)


-- Detected Entities~
    Display names of other agents or entities seen from the selected agent viewpoint.

INSERT IMAGE HERE

-- Camera Info~
    Display location and the direction of the main camera, which is displayed on the main window.
    Assigning MAIN_CAMERA_INIT_POS, MAIN_CAMERA_INIT_DIR in startup.cfg file will start the viewer with specified viewpoint.

- Command tab

Send command to an agent.

Combo box just beneath the tab specify the type of message sent to the controller.~
There are two type of tabs, "general" and "voice" at this moment, as of 2009/05/08

-- general~
    Panel to send arbitrarily messages to an agent.

(1),(2) specifies the agent to send the message.

Press "select agent" to send message, select an agent by clicking the agent at agent selection mode. The name will be displayed in (2).

Name of the agent can be specified directly in (2) by typing the name.

(3) Area to input the message to be sent~
One string in each line.

(4) Send the message to the controller of agent.

The above example sends four strings, "move", "0", "0" and "-140" to toy_D_000

-- voice~
    Panel to send voice data to an agent

(1), (2) specifies the agent to send the message.

Press "select agent" to send message, select an agent by clicking the agent at agent selection mode. The name will be displayed in (2).

Name of the agent can be specified by typing the name directly in (2).

(3) Pressing "Rec Start" button starts recording from microphone.

(4) Pressing "Rec End" button ends recoding from the microphone and save the voice data as capture.wav file.

(5) Pressing "Send Voice" button opens a dialogue to specify a .wav file to send to an agent. Choose captured capture.wav file.~
(Any .wav file can be selected and can be sent to an agent.)

 Send voice data can be received by a method onRecvSound() of the controller.

* Create World File [#u550ef4f]

This part explains how to create world-definition file, which describes virtual world in the simulation server. 

** Coordinate system [#v5c343fe]

The system uses following three coordinate systems.
- World coordinate system

Coordinate system that represents location of the agents and the entities.~
Vertical upward is the +Y direction.

- Agent coordinate system

Coordinate system that represents position of parts of the agent and/or entity.~
The center of the agent and/or entity is the origin.~
The agent face to +Z direction, +Y direction is the upward and +X direction is left hand side of the agent.~

- Line of sight coordinate system

Coordinate system that represents location of items from agent's point of view.~
The origin is the viewpoint of the agent.~
The agent faces to -Z direction, right hand side is +X direction and upward is +Y direction. 

INSERT IMAGE HERE

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

"Agent" and "Entity" are defined as below.

''Agent'' : Object that moves autonomously

''Entity'' : Object that does not move autonomously or stays still

''Objects in the virtual world are defined by XML files.''~
''User needs to define a new class using XML file when an object with new properties is required in the virtual world.''

''Agent and Entity classes are already defined. (Entity.xml, Agent.xml). Please do not change these files.'' (UPDATE LINKS ON FILES ?)

- Inheritance relationship

Agent class is as same as Entity class except that it has autonomous motion capability and sensory function.~
Therefore, Agent class inherits Entity class.

Entity class is the base class in the virtual world.~
All the classes are required to inherit Entity class, either directly or indirectly.~
A newly created class, which moves autonomously, needs to inherit the Agent class.~
A new immovable class needs to inherit Entity class.~

TO COMPLETE ? Entity class, Agent class, Class definition

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

The shape of the agent/entity is defined in shape-file and assigned at the class definition.

- Shape-file

The shape of the agents and/or entities are defined either by X3D file or by SIGVerse original XML format file, based on a framework of HAnime.

- Specify the shape-file in class definition

Assign the shape-file when defining a class. The following example is Robot class.~
The shape-file robot-body.xml is assigned in the Robot class.

-- Assign X3D-shape-file

   <?xml version="1.0" encoding="utf8"?>
   
   <define-class name="Robot" inherit="Agent.xml">
   
      <x3d>
         <filename>robot.x3d</filename>
      </x3d>
   
   </define-class>

-- Assign SIGVerse original XML shape-file

   <?xml version="1.0" encoding="utf8"?>
   <define-class name="Robot" inherit="Agent.xml">
   
      <body filename="robot-body.xml"/>
   
   </define-class>

- X3D shape-file

Configure the following items in X3D shape-file.

-- Configuration of Joint Axis

The joint angles can be specified in the controller.~
The axis of rotation is specified in jointAxis tag under joint tag.

   <?xml version="1.0" encoding="UTF-8"?>
   
   <X3D profile="Immersive" version="3.0">
   
   ...
     <ProtoInstance name='Joint' DEF="WAIST_JOINT1" containerField='children'>
   
       <fieldValue name='name' value='WAIST_JOINT1' />
   
       <fieldValue name='translation' value='15.0 0.0 0.0' />
   
       <fieldValue name='jointType' value='rotate' />
   
       <!-- Axis of rotation of WAIST_JOINT1 is (1.0, 0.0, 0.0). This is available when jointType is "rotation" -->
   
       <fieldValue name='jointAxis' value='1.0 0.0 0.0' />
   
       <fieldValue name='jointId' value='26.0' />
     ...;
     </ProtoInstance>

** World File [#b04bca0f]

The initial state of the virtual world is described in XML file (World-file-sample)

- Define World(<world>)

   Property of the World and Agents/Entities appeared in the virtual world is described within world tag. Name can be assigned to the world as an attribute.

- Specify the gravitational acceleration(<gravity>)

   Assign the gravitational acceleration in x, y and z direction.

- Create an instance(<instanciate>)

   Make agents/entities appeared to the virtual world by using "instanciate" tag within world tag.
   Specify the name and the initial position (x, y, z) by using set-attr-name tag.
   The external force by ODE physics simulation can be turned off by setting dynamics to false.

- Specify agent controller

   Controller can be assigned to the agent by specifying a library to implementation attribute.
   The value for language is c++ only, at this moment. (as of 2009/05/07)

InSERT SAMPLE OF WORLD FILE HERE 

* 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]



[[SIGVerse(English)]]


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

Front page   Edit Diff Backup Upload Copy Rename Reload   New List of pages Search Recent changes   Help   RSS of recent changes