This tutorial is valid only for SIGVerse later than v2.1.0. This tutorial explains how to start up the SIGVerse server and connect to the server from the SIGViewer.

Test 1

Setting of environment variables (in case of bash)

Open the .bashrc to add configuration for the SIGVerse.

$ emacs ~/.bashrc

Add the following two lines to the .bashrc

export SIGVERSE_PATH=/home/<username>/sigverse-<version> export PATH=$PATH:$SIGVERSE_PATH/bin

Set a path name of your SIGVerse directory to an environment variable SIGVERSE_PATH.

username> and <version> should be replaced according to your configuration.

Initialize the bash environment.

$ source ~/.bashrc

If you upgrade the SIGVerse, please modify the version number in your .bashrc file.

Execution of SIGVerse server

Execute SIGVerse server on the server.

 $ cd ~/sigverse-<version>/bin

You can execute the SIGVerse server, using shell script sigserver.sh put on ~/sigverse-<version>/bin.

$ sigserver.sh

+ '[' -z ']'
+ LD_LIBRARY_PATH=/usr/lib/jvm/java-6-openjdk-amd64/jre/lib/amd64/server
+ SIGVERSE_X3DPARSER_CONFIG=/home/hoge/sigverse- 2.1.0/share/sigverse/etc/X3DParser.cfg
+ SIGVERSE_RUNAC=/hoge/okamoto/sigverse-2.1.0/bin/sigrunac
+ SIGVERSE_DATADIR=/home/okamoto/sigverse-2.1.0/share/sigverse/data
+ export LD_LIBRARY_PATH SIGVERSE_X3DPARSER_CONFIG SIGVERSE_RUNAC  SIGVERSE_DATADIR
+ /home/hoge/sigverse-2.1.0/bin/sigserver
[SYS]  ///////// //////////////////////////////////////////////////
[SYS]  ////////////// World number 0  (port 9000) ///////////////
[SYS]  ///////////////////////////////////////////////////////////
[SYS]  data directory :
[SYS]       [1]  /home/hoge/sigverse-2.1.0/share/sigverse/data/xml/
[SYS]       [2]  /home/hoge/sigverse-2.1.0/share/sigverse/data/shape/
[SYS]  world file : MyWorld.xml
[SYS]  building entity (entName=(Robot-nii), className=(Robot), X3DFileName= (/home/hoge/sigverse-2.1.0/share/sigverse/data/shape/robot_nii_v2.x3d))
read /home/hoge/sigverse-2.1.0/share/sigverse/etc/X3DParser.cf g
*** JavaVMOption ***
options[0].optionString = (-Djava.class.path=/home/hoge/sigverse- 2.1.0/share/sigverse/jar/X3DParser.jar:/home/hoge/sigverse- 2.1.0/share/sigverse/jar/xj3d-all.jar)
options[1].optionString = (-Djava.library.path=/tmp)
Java VM start ok
[SYS]  waiting for connection...

The above messages indicate that the SIGVerse server has started successfully.

If you did not specify a port number, the port number and world number are assigned automatically. In the above case, world number 0 and port number 9000 are assigned.

Connecting the SIGViewer to the server

Next, execute the SIGViewer to connect to the server. Double click the SIGViewer.exe to start the SIGViewer.

Setting of a service name

Set a service name after the SIGViewer window opened. Communication between the SIGVerse server are controlled by service name. Especially, image capture function are embedded in the SIGViewer; transfer of image data requires service name. In this case, put service name "SIGViewer" as the default name.

In a case not using SSH connection

Input the hostname of SIGVerse server and the world number (or port number) assigned in the above process.

connectServer1.PNG

In a case that SSH connection on Cygwin

Read CygwinによるSSH接続 and finish the configuration of SSH connection. Input "localhost" in the hostname field; input the port number used in the port forwarding function.

connectServer2.PNG

In a case that SSH connection via SIGViewer

Finish the configuration written in SIGViewerによるSSH接続? before this tutorial. Input the hostname of the SIGVerse server and the world (or port) number. Check the 'Connected by SSH'. Next, input your account name and pass phrase of SSH connection.

connectServer3.PNG

Connection

You will see the following robot agent with clicking the "Connect" button.

connectServer4.PNG

You can change the direction of eyesight, by pushing Ctrl button and click right button of the mouse while putting the mouse pointer over the frame of SIGViwer.

If the connection succeeded, the following messages should be appeared at the server side. [SYS] waiting for connection... [SYS] SIGViewer is connected [SYS] Service: "SIGViewer" is available

Stop of SIGVerse server

To pause the simulation, click the STOP button on the right buttom tray of the SIGViewer. To quit the simulation, click the "Quit Simulation" button. You can terminate server process from the SIGViewer.

If you want to terminate the server process on the server side, click the "Disconnect" button. Then, push Ctrl+C on the server's shell window. If the SIGVerse server keeps on running even though the termination, please terminate again using the following command:

$ sigkill.sh

 

You can check running processes by the command:

$ ps aux | grep $(whoami)

Back?
Next (Sample of dynamics simulation) ?

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