This page holds complete, step-by-step installation and set-up instructions for the AR Sandbox software, starting from a blank desktop PC with an Nvidia GeForce graphics processing unit (GPU). These instructions are based on the current version of the Linux Mint operating system. Due to increasing weirdness in recent versions of Mac OS X (starting with version 10.7), we can no longer recommend Mac computers and Mac OS X to drive AR Sandbox installations.
These instructions are up-to-date with the following software versions:
cd ~ wget http://idav.ucdavis.edu/~okreylos/ResDev/Vrui/Build-Ubuntu.sh bash Build-Ubuntu.sh
cd ~/src wget http://idav.ucdavis.edu/~okreylos/ResDev/Kinect/Kinect-3.5.tar.gz tar xfz Kinect-3.5.tar.gz cd Kinect-3.5 make sudo make install sudo make installudevrules ls /usr/local/bin
cd ~/src wget http://idav.ucdavis.edu/~okreylos/ResDev/SARndbox/SARndbox-2.5.tar.gz tar xfz SARndbox-2.5.tar.gz cd SARndbox-2.5 make ls ./bin
sudo /usr/local/bin/KinectUtil getCalib 0
cd ~/src/SARndbox-2.5 RawKinectViewer -compress 0
- 画面内の描画はマウスホイールで拡大縮小できます.
- 画面のパン(移動)はZキーを押しながらマウスをドラッグします.
- これで1キーにこの機能が割り当てられます.
- 左下の赤いコーナーにカーソルを合わせて1キーを長押しすると機能登録が取り消されます.
- BoxLayout.txtはSARndboxのソースディレクトリ内のetc/SARndbox-<version>にあります.
- BoxLayout.txt の例(ここで設定するのは一番上の行です)
(-0.0302053, -0.0164072, 0.999409), -100.1997 //水平面(海水準)のパラメータ(鉛直ベクトルと深さ) ( -28.4518, -36.6135, -99.2554) //sandboxの四隅(左下) ( 36.3453, -36.2071, -100.039) //sandboxの四隅(右下) ( -28.321, 35.1049, -102.783) //sandboxの四隅(左上) ( 36.313, 34.6932, -99.9503) //sandboxの四隅(右下)
cd ~/src/SARndbox-2.5 pluma etc/SARndbox-2.5/BoxLayout.txt &
【巧みの技: 】テキストを異なるウィンドウ間ですばやくコピペする方法
- : コピー元の画面のテキストをマウスで反転させます
- : コピー先の画面にマウスを移動させてペーストしたい箇所で中ボタンをクリックします.
BoxLayout.txt の例(ここで設定するのは2〜5行目です)
(-0.0302053, -0.0164072, 0.999409), -100.1997 //水平面(海水準)のパラメータ(鉛直ベクトルと深さ) ( -28.4518, -36.6135, -99.2554) //sandboxの四隅(左下) ( 36.3453, -36.2071, -100.039) //sandboxの四隅(右下) ( -28.321, 35.1049, -102.783) //sandboxの四隅(左上) ( 36.313, 34.6932, -99.9503) //sandboxの四隅(右下)
XBackground
cd ~/src/SARndbox-2.5 ./bin/CalibrateProjector -s <width> <height>
./bin/CalibrateProjector -s 1024 768
重要
CalibrateProjectorはフルスクリーンで起動してください. その後,動画の10:10以降の説明に従ってください.
cd ~/src/SARndbox-2.5 ./bin/SARndbox -uhm -fpv
/.config/Vrui-<version>/Applications
mkdir -p ~/.config/Vrui-4.5/Applications
xed ~/.config/Vrui-4.5/Applications/CalibrateProjector.cfg
section Vrui section Desktop section Window # Force the application's window to full-screen mode: windowFullscreen true endsection section Tools section DefaultTools # Bind a tie point capture tool to the "1" and "2" keys: section CalibrationTool toolClass CaptureTool bindings ((Mouse, 1, 2)) endsection endsection endsection endsection endsection
(上のテキストをコピペしてエディタに貼り付けてください.)
xed ~/.config/Vrui-4.5/Applications/SARndbox.cfg
section Vrui section Desktop # Disable the screen saver: inhibitScreenSaver true section MouseAdapter # Hide the mouse cursor after 5 seconds of inactivity: mouseIdleTimeout 5.0 endsection section Window # Force the application's window to full-screen mode: windowFullscreen true endsection section Tools section DefaultTools # Bind a global rain/dry tool to the "1" and "2" keys: section WaterTool toolClass GlobalWaterTool bindings ((Mouse, 1, 2)) endsection endsection endsection endsection endsection
xed ~/src/SARndbox-2.5/RunSARndbox.sh
#!/bin/bash # Enter SARndbox directory: cd ~/src/SARndbox-2.5 # Run SARndbox with proper command line arguments: ./bin/SARndbox -uhm -fpv
chmod a+x ~/src/SARndbox-2.5/RunSARndbox.sh
xed ~/Desktop/RunSARndbox.desktop
#!/usr/bin/env xdg-open [Desktop Entry] Version=1.0 Type=Application Terminal=false Icon=mate-panel-launcher Icon[en_US]= Name[en_US]= Exec=/home/<username>/src/SARndbox-2.5/RunSARndbox.sh Comment[en_US]= Name=Start the AR Sandbox Comment=
chmod a+x ~/Desktop/RunSARndbox.desktop
PCを起動したときに自動的にAR Sandboxも起動するようにするには,
例) /home/<username>/src/SARndbox-2.5/RunSARndbox.sh
xrandr | grep connected
xrandr はPCで使えるビデオ出力ポートのリストを表示し,それぞれのポートに接続されているモニターやプロジェクターの情報を教えてくれます.以下のように表示されます.
DVI-I-0 disconnected primary (normal left inverted right x axis y axis) DVI-I-1 connected 2560x1600+0+0 (normal left inverted right x axis y axis) 641mm x 401mm HDMI-0 disconnected (normal left inverted right x axis y axis) DP-0 disconnected (normal left inverted right x axis y axis) DVI-D-0 connected 1600x1200+2560+0 (normal left inverted right x axis y axis) 367mm x 275mm DP-1 disconnected (normal left inverted right x axis y axis)
xed ~/.config/Vrui-4.5/Applications/CalibrateProjector.cfg xed ~/.config/Vrui-4.5/Applications/SARndbox.cfg
section Window ... # Open the window on a specific video output port: outputName <port name> ... endsection
xrandr --output DVI-I-1 --auto --primary --output HDMI-0 --auto --right-of DVI-I-1
xrandr --output DVI-I-1 --auto --primary --output HDMI-0 --off
xed ~/.config/Vrui-4.5/Applications/SARndbox.cfg
section Vrui section Desktop # Open a second window: windowNames += (Window2) ... endsection endsection
section Vrui section Desktop ... section Window ... endsection section Window2 viewerName Viewer screenName Screen windowType Mono # Open the window on a specific video output port: outputName <port name> # Open the window to full-screen mode: windowSize (800, 600) windowFullscreen true endsection ... endsection endsection
xed ~/src/SARndbox-2.5/RunSARndbox.sh
The simple command line entered in Step 16 only has two arguments:
./bin/SARndbox -uhm -fpv
These instruct SARndbox, in order, to apply the default elevation color map, and to lock the display to the projector calibration matrix captured in Step 11. By default, SARndbox applies display options from the command line to all windows it opens, but this can be overridden by using a -wi <window index> argument, where <window index> is the zero-based index of a window. After seeing that argument, SARndbox will apply all following display options to all windows with the same or a larger index, and also reset the -fpv option. Thus, append the following to SARndbox's command line:
./bin/SARndbox -uhm -fpv -wi 1 -rws
The (optional) -rws argument will draw water as a three-dimensional surface instead of applying it to the topography as a texture, as is the default setting. This will create a better representation of water flow when seen from oblique angles. After these changes, the AR Sandbox will show a navigable three-dimensional view of the 3D topography model, including water drawn as a real 3D surface, on the secondary display. The secondary display can be rotated, translated, and scaled as in many other 3D graphics software, using a combination of mouse buttons and keyboard keys. Most importantly, pressing the left mouse button will rotate the view around the center of the window, and pressing the "Z" key while moving the mouse will translate the view in the window's plane. Pressing the left mouse button and "Z" key together, while moving the mouse up and down, will scale the view (zoom in or out), as will rolling the mouse wheel. Finally, pressing the left mouse button, the "Z" key, and the left Shift key, while moving the mouse up or down, will "dolly" the view in or out of the window's plane, as will rolling the mouse wheel while pressing the left Shift key.
On start-up, SARndbox will show a default view of the 3D topography in its secondary window. If you would like to show a different view on start-up, you can use the navigation techniques described in the previous paragraph to create the perfect view that you want, and then save it. To do this, press and hold the right mouse button to show the main application menu. Move the mouse to the last entry, "Vrui System", and from there to the "View" sub-menu, then to the "Save View..." entry, and there release the right mouse button. This will open a file selection dialog where you can specify a file name and location for the view file about to be written. Leave the default file name ("SavedViewpoint0001.view") and default location (the AR Sandbox's project directory) alone, and press the "OK" button. This will close the file selection dialog and save the current view to the selected file.
After exiting from SARndbox, change the command line in the RunSARndbox.sh shell script again, this time appending a command to load the view file you just saved. Run in a terminal:
xed ~/src/SARndbox-2.5/RunSARndbox.sh
and change the command line to:
./bin/SARndbox -uhm -fpv -wi 1 -rws -loadView SavedViewpoint0001.view
If you changed the name of the view file before saving it (or renamed it later), use the correct name here. Afterwards, the AR Sandbox will start up with your preferred view displayed in its secondary window.
“AR Sandbox post-installation setup” では,起動の自動化やより細かなチューニングについて説明しています.