SIGVerse.org | SIGVerse Forum | SIGVerse Wiki (JP) | SIGVerse Web
SIGVerse Web
SIGVerse Web とは? †
SIGVerse Web はSIGVerseアプリケーションを構築するためのウェブインタフェースシステムです. SIGViewerと一緒に使う事で,Cygwinのようなターミナルコンソール経由でのコマンドラインでの開発環境を用いることなく開発を進めることができます.プログラムはウェブベースでの簡易テキストエディタで作成することになります.コンパイルや設定ファイルの配置,プログラム実行などがクリックするだけで実行できます.ブラウザがあれば,開発環境が整っていないPCからでも簡単に開発を進めることができるわけです.
SIGVerse Web の主な特徴は以下の通りです:
- ウェブベースでのプログラムエディタとコンパイラ
- SIGServerの遠隔操作(実行・停止・設定ファイルの整備など)
- クラウド上でのプログラム開発環境の提供
セットアップ †
Webuser アカウントの登録 †

SIGVerse のインストール/アンインストール †
- ログインの次に,あなたのワークスペースにSIGVerseサーバをインストールします.このSIGVerseサーバを修正・変更していくことで,あなたの実行したい実験の世界を作ることになります.別の言い方をすると,他人が作ったSIGVerseの世界を用いる場合には,このインストールは必要無い,という事になります.
- メインページの, Connect to Socio の所にSIGVerse Web のサーバーホスト名(socio2.iir.nii.ac.jp)が記載されている事を確認し,Connect ボタンを押します.ここでsocio2.iir.nii.ac.jp 以外のSIGVerse web サーバを使う場合には,そのホスト名を入力して下さい.また,Username : webuser は変更しないで下さい.
- 次に Install という項目にあるフィールドにインストールしたいSIGVerseバージョンを記入します.通所は最新版のバージョンが既に記載されているので,何もしなくて結構です.Install ボタンを押すことで,あなたのワークスペース上にSIGVerseサーバがインストールされます.
- *重要* Install ボタンをクリックした後,作業完了まで5分程度かかることがあります.ログが出力され,インストールが完了したことが確認できるまで,他のボタンを押さないでください.
- インストールの完了後,Go ボタンをクリックして, Workspace にアクセスして下さい.

* NIIで運用するSIGVerseサーバー上のアカウント †
- 国立情報学研究所(NII)で運用しているSIGVerseサーバに接続するためには,サーバでのユーザアカウントが必要になります.
- ※だたし創発システムシンポジウムにご参加の方はワークショップ当日に限り,アカウントをこちらで用意致します
- NIIで運用するサーバ上のアカウント発行には制約条件がありますので,稲邑(inamura@nii.ac.jp)までご連絡をお願い致します.
- もしくは,1ヶ月間の有効期限付き評価用アカウントの発行も可能です.評価用アカウントの利用方法は以下の通りです.
評価用アカウントの利用方法 †
- SIGVerse Web にログインした直後のメインページからSSH-Keyをダウンロードして下さい.ダウンロードしたファイルを展開をすると二つのファイル(id_rsa and id_rsa.pub) が得られるので,C:\Program Files\SIGViewer-<version>\SIGViewer\.ssh というディレクトリに置いて下さい.
- SSH接続に用いるパスフレーズ(passphrase)は,展開ファイルのうちの一つpassphrase.txtに記載されています.
- 評価用アカウントは毎月末に期限が切れます.月が新しくなったら再度上記のSSH-Keyをダウンロードして設定を行って下さい.
- SIGViewerの機能を用いたSSHによるサーバーへの接続方法は,(SSH Connection)を参照して下さい.
基本的な開発ガイド †
ワークスペースの概要 †

- プロジェクトディレクトリ
- The left panel consists of a file navigation for project directory. You can create new project folder and file, upload project file, and even import a whole project (Refer to Import below).
- 編集エリア
- The center area is the editor for programming code developments. It supports multiple programming languages with syntax highlight, search and replace, and multi-tab for working of several files in parallel.
- コントロールパネル
- The lower panel is the Control Panel for code compiling and execution.
- Make - To make controller codes with a Makefile. Please make sure to prepare the Makefile.txt as below (sample):
Makefile.txt
- Build - To "build" the project files into the current SIGVerse version (indicated on the right end of Control Panel).
- Import (.zip) - To import a project from local machine, upload the zip file of the project (with all files inside) onto Project Directory. Press Import to extract it (refresh to view the new folder).
- Export - To download a project in zip format.
- Delete - To delete a project (with all files inside).
- Execute [Admin] - For administrative purpose only.
SIGServer の実行 †
- Run - To execute SIGServer (./sigverse.sh).
- Check - To view output of the execution (for possible error).
- Kill - To terminate SIGServer.
SSH 接続 †
- Input host name, user name and pass phrase
- Run SIGViewer.exe on local machine.
- From the top Setting menu, select SSH Connect.
#ref(): File not found: "ssh_connect1.jpg" at page "SSH接続"
- Input the server host name (or IP address), user name and passphrase on the dialogue box.
- For temporary access,
- Server host name: socio2.iir.nii.ac.jp
- User name: testuser
- Passphrase: (as written in passphrase.txt)
#ref(): File not found: "ssh_connect2.jpg" at page "SSH接続"
- Check the Use RSA key to login.
- Enable port forwarding (in most cases blocked by firewall) by the following steps.
- Check Local port forwarding with login and input the following details:
- Local port: Port on local machine
- Listen host: Listening machine(normally localhost)
- Remote port: Port on server
#ref(): File not found: "ssh_connect3.jpg" at page "SSH接続"
- Check Remote port forwarding with login and input the following details:
- Server port: Port on local machine
- Listen host: Listening machine(normally localhost)
- Local port: Port on server
#ref(): File not found: "ssh_connect4jpg.jpg" at page "SSH接続"
- * In normal cases, please use 9001 and above for local port forwarding, and 8001 and above for remote port forwarding. If the port number is currently in used, please try other number.
- Check Download shape file for automatically update shape files from server.
- Press Connect, the SSH connection is established if the message "SSH Authentication succeeded (server host name)" appears on the bottom left of SIGViewer.
#ref(): File not found: "ssh_connect5.jpg" at page "SSH接続"
チュートリアル †
最初のテスト (Tutorial01) †
- To simulate a falling object due to gravitational and external forces.
- ① 新しいプロジェクトの作成
- Click the Add Folder icon on the top of the left Project Directory.
- Insert "Tutorial01" and click SAVE.
- A new folder named "Tutorial01" appears on the Project Directory.
- ② エージェントコントローラの作成
- An agent is an autonomous object controlled by a controller.
- Click into "Tutorial01" and click Add File to create the controller source code.
- Insert "MoveController" and select "cpp" as the file type.
- Insert the following codes into the Editor Area and click SAVE.
MoveController.cpp
- The above controller codes do nothing except execute "onAction" on every 5 s.
- ③ コントローラー·コードのコンパイル
- Create a file named "Makefile" with "txt" file type.
- Insert the following codes into the Editor Area and click SAVE.
Makefile.txt
- In the Control Panel, insert the project name "Tutorial01" for work/ and click Make. Refresh the Project Directory to ensure the creation of "MoveController.so" file. If "MoveController.so" file is not created, means there is a compilation error during Make. Check your programming codes. Also, in the Makefile.txt, ensure that there is no any extra space in front and behind the lines, and the spacing in front of the last line (...g++) is a tab and not multiple space bar.
- ④ エージェントと仮想世界の作成
- Create a new file named "NewWorld" with "xml" file type.
- Insert the following codes into the Editor Area and click SAVE.
NewWorld.xml
- The above codes create a virtual world named "myworld".
- In the world, an agent named "Toy_D" using the instance of "seToy_D.xml" is created.
- The "implementation" attribute attaches "MoveController.so" as the controller of the agent.
- With the "dynamics" attribute value set to "true", the agent is subjected to dynamics simulation.
- The initial position (x,y,z) and mass are set.
- ⑤ シミュレーションの実行
- On the Control Panel, build the project by using Build.
- Set "Port" to 9001 and "World" to "NewWorld.xml"
- Click Run to execute SIGVerse.
- Click Check to check the last line of the output is " Java VM start ok" for successful execution.
- If you see "cannot bind socket: Address already in use", just try another port number other than 9001.
Try bigger number, e.g. 9002, 9003, 9004, ... There are various reasons why the port is temporary being used.
- Run SIGViewer. Establish SSH connection under Setting. Set host name as "localhost" and port no. to "9001". Click Connect to SimServer.
- An agent in a virtual world appears as follows.
- * View controls for SIGViewer:
- Turn around - Right click
- Zoom - Ctrl + Right click
- Pan - Shift + Right click
#ref(): File not found: "toy_1.jpg" at page "動力学シミュレーションのサンプル"
- Click Send under SIM_CTRL_CMD (START) to start the simulation.
- The agent falls straight down the ground.
- Disconnect SimServer in SIGViewer and Kill in the Control Panel to terminate the simulation.
- ⑥ 外力の加える
- To apply an external force to the agent, edit the agent controller as follows:
MoveController.cpp
↓
- Make, Build and Run the simulation as above.
- The agent moves forward as below.
#ref(): File not found: "toy_3.jpg" at page "動力学シミュレーションのサンプル"
チュートリアルプロジェクトファイル †
- Tutorial01 -
Tutorial01.zip
- Tutorial02 -
- Tutorial03 -
- Tutorial04 -
- Tutorial05 -
- Tutorial06 -
- Tutorial07 -
- Tutorial08 -
- Tutorial09 -
- Tutorial10 -
SIGVerse Web と一般的な開発の違い †
SIGVerse Web is developed with the aim to ease and reduce learning curve for novice users (who are not familiar to Linux environment) to begin with SIGVerse development. The development process explained above is slightly different to manual programming developments illustrated in the rest of the tutorials in this wiki.
- The files system in SIGVerse Web is organized based on "Project". You can develop all related files (.cpp, .so, .xml, .wrl, .x3d, etc.) under the same project folder. By using "Build", SIGVerse Web will automatically build all the files into the respective folders of the current SIGVerse version that you are working on. This files system will provide a better files organization and enables "Import" and "Export" of projects for backup and sharing purposes.
- *違い* In World files (.xml), the path to the controller's shared object file (.so) is always at the current directory, example:
- In SIGVerse Web, you can install and execute all available versions of SIGVerse servers in the same development environment. Because of the independent files system, the same project codes can be executed in different SIGVerse versions based on your selection when you enter the workspace.
- *違い* To make sure the Makefile indicates the current SIGVerse version in your workspace during compilation, please make sure the first line of the Makefile.txt is as follows:
ライブラリー †
- World Gallery
- Living Room (Small)
- Living Room (Big)
- Kitchen
For any inquiry, suggestion, and feedback, please kindly contact Jeffrey [jeffrey@nii.ac.jp].