Up:Tutorial?
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.
Open the .bashrc to add configuration for the SIGVerse.
$ emacs ~/.bashrc
Add the following three lines to the .bashrc
export SIGVERSE_PATH=/home/<username>/sigverse-<version> export PATH=$PATH:$SIGVERSE_PATH/bin export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
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.
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.
Next, execute the SIGViewer to connect to the server. Double click the SIGViewer.exe to start the SIGViewer.
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.
Input the hostname of SIGVerse server and the world number (or port number) assigned in the above process.
If you cannot use general port number such as 9000 to connect to the server due to some security reasons, port forwarding between your server and client is required.
If you always use your favorite port forwarding application. Input "localhost" in the hostname field; input the port number used in the port forwarding function.
If you don't have any port forwarding application. You can use SSH connection function in the SIGViewer. Finish the configuration written in SSH connection by SIGViewer 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.
You will see the following robot agent with clicking the "Connect" button.
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
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)
Up:Tutorial?