AR Sandbox post-installation setup

Home Forums AR Sandbox Forum AR Sandbox post-installation setup

This topic contains 19 replies, has 12 voices, and was last updated by  sbarringer 4 months, 1 week ago.

Viewing 15 posts - 1 through 15 (of 20 total)
  • Author
    Posts
  • #102724

    Oliver Kreylos
    Keymaster

    Note: As of 04/20/2018, I am freezing this post. The forum format is tedious to update, and the discussion, which conflicts with the up-to-date instructions, are confusing and daunting to first-time users. The AR Sandbox complete installation instructions, including these post-installation setup steps, are now located on the main AR Sandbox project page at http://idav.ucdavis.edu/~okreylos/ResDev/SARndbox/LinkSoftwareInstallation.html.

    The following instructions are no longer up-to-date.

    There are a few additional steps one might want to do after successfully installing and calibrating the AR Sandbox software that I left out of the full installation instructions for brevity. These are minor tweaks: ensuring that CalibrateProjector and SARndbox always run in full-screen mode, automatically binding calibration or water management tools to keys, and automatically hiding the mouse cursor if the mouse isn’t moved.

    These steps involve creating custom configuration files, which open up another host of possible fine-tuning options if one wants to go there. The following assumes an installation of Vrui-4.2-005 or newer, and SARndbox-2.3 or newer.

    As of version 4.2, Vrui supports per-application configuration files. These are stored in a directory ~/.config/Vrui-<version>/Applications, and given the same name as the application to which they apply, plus a .cfg extension. In the following, replace Vrui-4.2 with your actual Vrui version, and replace pluma with another text editor if you do not use the MATE desktop environment. For example, the Gnome text editor is called gedit.

    First, create a configuration file to force CalibrateProjector to start in full-screen mode, and bind the calibration tool to two buttons:

    mkdir ~/.config/Vrui-4.2
    cd ~/.config/Vrui-4.2
    mkdir Applications
    cd Applications
    pluma CalibrateProjector.cfg

    Into the new file, paste the following text exactly:

    section Vrui
        section Desktop
            section Window
                windowFullscreen true
            endsection
            
            section Tools
                section DefaultTools
                    section CalibrationTool
                        toolClass CaptureTool
                        bindings ((Mouse, 1, 2))
                    endsection
                endsection
            endsection
        endsection
    endsection

    and then save the file and exit from the text editor.

    If you now start CalibrateProjector, its window will cover the entire screen, with no title bars or panels remaining. If you press the “1” key, the program will capture a tie point, and if you press the “2” key, the program will re-capture the background, indicated by the screen turning red for two seconds.

    You can replace the “1” and “2” key names in the “bindings” tag with any other keys you like.

    Next, create a configuration file to set up the SARndbox itself. In the same terminal, run:
    pluma SARndbox.cfg

    Into the new file, paste the following text exactly:

    section Vrui
        section Desktop
            section MouseAdapter
                mouseIdleTimeout 5.0
            endsection
            
            section Window
                windowFullscreen true
            endsection
            
            section Tools
                section DefaultTools
                    section WaterTool
                        toolClass GlobalWaterTool
                        bindings ((Mouse, 1, 2))
                    endsection
                endsection
            endsection
        endsection
    endsection

    and then save the file and exit from the text editor.

    As in the first case, this will force SARndbox to start in full-screen mode, ensuring that the calibration created using CalibrateProjector exactly matches the one used in the actual AR Sandbox. In addition, the “mouseIdleTimeout 5.0” setting will hide the mouse cursor after five seconds of inactivity. To get the cursor back, simply move the mouse. Finally, the “WaterTool” section binds a tool to add or remove water from the AR Sandbox globally, by pressing “1” to rain, and “2” to drain. As above, set the binding to whatever keys you prefer.

    If you run the AR Sandbox from a laptop, or if your computer has a main display screen in addition to the projector, and you are using “extended desktop” mode where the two displays are logically placed next to each other, then the CalibrateProjector or SARndbox windows might show up on the wrong display. To automatically force them to the correct display, you can use Vrui-4.2’s output naming functionality.

    Open up the SARndbox.cfg configuration file with a text editor, and insert the following into the “Window” section:

    section Window
        ...
        outputName Foo
        ...
    endsection

    then save the file and exit from the text editor. Now run SARndbox with the -vruiVerbose command line option:

    cd ~/src/SARndbox-2.3
    ./bin/SARndbox -uhm -fpv -vruiVerbose

    This will print a lot of information to the console, including the names of all video outputs and monitors connected to your PC. Note the name that corresponds to your projector, and enter it in the configuration file in place of “Foo” above. Then apply the same change to the CalibrateProjector.cfg configuration file.

    • This topic was modified 2 years ago by  Oliver Kreylos. Reason: Added section about output names
    • This topic was modified 2 years ago by  Oliver Kreylos. Reason: Added mkdir ~/.config/Vrui-4.2
    • This topic was modified 7 months, 3 weeks ago by  Oliver Kreylos. Reason: Freezing post, redirect
    #102766

    Shot
    Participant

    That’s helpful information. Thanks. However, for our installation, I would like to bind the left mouse button to the rain tool and the right mouse button to the evaporate (dry) tool. I’m using Vrui 3.2 and Sandbox 1.6. Is that possible?

    -Steve

    #102785

    Oliver Kreylos
    Keymaster

    You would have to replace bindings ((Mouse, 1, 2)) with bindings ((Mouse, Mouse1, Mouse3)), which are the names of the left and right mouse buttons (the middle button is Mouse2).

    However, the left and right mouse buttons are already used by other tools, and attempting to rebind them like this will be ignored, and cause a warning message on start-up.

    You can redirect those other bindings by inserting the following sections into the DefaultTools section in your patch configuration file:

    section MouseNavTool
      bindings ((Mouse, 1, z, LeftShift, MouseWheel))
    endsection
    
    section MenuTool
      bindings ((Mouse, 2))
    endsection

    That will re-bind the mouse navigation tool to use the 1 key instead of the left mouse button, and the main menu will pop up by pressing the 2 key instead of the right mouse button.

    #102816

    Shot
    Participant

    Thanks, Oliver! Sorry for the double post. I didn’t realize you had answered my question! (I keep forgetting to check the “Notify me…” box!)

    -Steve

    #102819

    williamHsu
    Participant

    hi~ Oliver~ helpful information. Thanks. now i have globaWatertool 1 , 2
    and if i want to add local rain function ( on the tool menu is named ” manage water Locally)
    i should use what’s toolClass name? (where can i find this? i didn’t see it in the vrui/tools )
    and should i just add the bold text ?? or i should copy all the section Tools ……endsection?

    section Vrui
    section Desktop
    section MouseAdapter
    mouseIdleTimeout 5.0
    endsection

    section Window
    windowFullscreen true
    endsection

    section Tools
    section DefaultTools
    section WaterTool
    toolClass GlobalWaterTool
    bindings ((Mouse, 1, 2))
    endsection

    section WaterTool
    toolClass xxxxWaterTool
    bindings ((Mouse, 3, 4))
    endsection

    endsection
    endsection
    endsection
    endsection

    thanks a lot : ))

    #102825

    Oliver Kreylos
    Keymaster

    The tool class name is “LocalWaterTool”. In general, the easiest way to find out these things is to save the input graph from within a Vrui application. Input graph files have the same tool binding structure as configuration files. You can copy over desired tool sections verbatim.

    #103151

    techsupport
    Participant

    Oliver could you please paste an example of your own SARndbox.cfg with 2 screens working? projector and monitor, please, thanks.

    #103201

    liudr
    Participant

    Sounds great! I didn’t know you can bind some keys so you don’t have to define them every time. What about the water simulation control? Can they be bound to say some joystick sliders or is it not possible? If not possible, will it be possible to bind keys to specific values of a slider, say press ‘1’ to have speed 1 and press ‘0’ to have speed 0.5?

    #103674

    jjfoerch
    Participant

    Hello,

    I have a system with two screens, but the -vruiVerbose option does not display the names of the outputs as indicated.

    I am using SARndbox-2.3 and Vrui-4.2-006. Is there something else I can try?

    Thank you.

    #108359

    mkaszuba
    Participant

    Hi Gang. After much effort, trying to get software to work as desired, I will attempt to describe my completed “post installation” steps that I went through. I have used various tips and tricks from other users here. I will try to note them as I go. Please note, I am assumig that you have completed the steps from the Complete Setup guide found here. So this means you are using Vrui 4.2-006, Sandbox 3.2 and kinect 3.2 software, and it turns on and works accordingly. My computer setup is an Alienware Alpha (excellent form factor, with a core i5 CPU, Nvidia m970 video card (yes that works well enough) and 8 gigs of ram)

    The things I have done are:

    • Setup the two Application Configuration files noted above in this post. (this is where you hardcode buttons or keyboard keys to run scripts and functions) I used keyboard keys at this time. Button instructions are available here
      1. keys 1 and 2 are global flood and drain
      2. keys 3 and 4 are local flood and drain (wherever the pointer is)
      3. key 5 is a screen capture tool (thanks Peggy) it does require you to install a new package on your linux called “scrot”
      4. Key 6 is the “change weather” or “change substance” tool (thanks ajy00)
    • Created a ~/src/ScreenShots folder to receive the scrot images (when the 5 key is pressed)
    • Created a ~/src/scripts folder to place the various scripts (thanks again to Peggy)
    • Collected many shader files for changing the colour of the “rain”/weather even though I only use 4 (thanks to INTPTT and Oliver mostly)

    Here is a image of what is contained in my zip file.
    Contents of the Zip file

    After completing the Complete installation guide, and the Post installation follow up:

    1. Download the zip file above
    2. From the zip file, Copy the two .cfg files (from the dot-config/Vrui-4.2/Applications folder in your .config/Vrui-4.2/Applications folder (note: the .config folder is hidden in your home folder. You may need to turn on “show hidden files” if you are using “file explorer” on the desktop
    3. In your src folder, create a new folder called ScreenShots<\li>
    4. In your src folder, copy the scripts folder from the zip file<\li>
    5. copy the contents of the shaders folder from the zip file to the `/src/SARndbox-2.3/share/SARndbox-2.3/shaders folder<\li>
      </ol

      Possible issues with trying things out.
      <li>run each script from the terminal to make sure it works.<\li>
      <li>edit the scripts to reflect your folder structure. The script files will allow a relative folder reference such as “`/src” but the .cfg files will not<\li>

    6. Edit the SARndbox.cfg file to reflect your folder structure. Where you see “/home/sandbox/…” replace sandbox with your username on you system.<\li>
    7. Check the spelling of your code! I can not tell you how many times I had to reboot my machine just because I missed an “s” for an “S” LinuxMint uses is a case sensitive file system<\li>

      If all works out when you run your sandbox software, keys 1-6 should do something. If you come across a key which presents the interactive menu from the sandbox software then something went wrong with the assignment of the keys, Check the spe

    • This reply was modified 1 year ago by  mkaszuba.
    • This reply was modified 1 year ago by  mkaszuba.
    #108363

    liudr
    Participant

    Awesome! Thanks for sharing. I have thought about Alienware Alpha. I’m glad that it works. I am considering the model with i3 instead of i5. When you are running the simulation with water flowing all over the place, how much cpu are you using anyway? I am doing ok with an i3-7100 with nvidia cards.

    #108364

    mkaszuba
    Participant

    Not sure what happened there. I lost my edit access to the main post…. 🙁

    #108367

    Niemeyer
    Participant

    Hi Oliver
    Our sandbox has been a fantastic teaching tool here at Nagle Catholic College in Australia.
    Is it possible to create more contour line so that the landscape more closely replicates a topographic map?

    Thanks
    John

    #108368

    williamHsu
    Participant

    @mkaszuba hi~ thanks your zip file ~i follow your step but has some file does not exist (https://drive.google.com/file/d/1mhQcmDAvVQUD85a0zoctxl0lTR0BTiTt/view?usp=sharing)

    it’s tells
    Vrui: Merging configuration file /home/eerise/.config/Vrui-4.2/Vrui.cfg… does not exist
    Vrui: Merging configuration file /usr/local/etc/Vrui-4.2/Applications/SARndbox.cfg… does not exist
    Vrui: Merging configuration file ./Vrui.cfg… does not exist
    Vrui: Initializing Vrui environment… error
    Caught exception FactoryManager DSO error: FileLocator::locateFile: Could not find resource libScriptExecutorTool.so while initializing Vrui state object

    i think i dont know how to do this two step, (sorry i m very new to learn this)

    Possible issues with trying things out.

  • run each script from the terminal to make sure it works.<\li>
  • edit the scripts to reflect your folder structure. The script files will allow a relative folder reference such as “`/src” but the .cfg files will not<\li> ”

    “.cfg will not ” means i need to remodify some .cfg files path ? or ? can you help me thx

#108376

mkaszuba
Participant

Hi Williamhsu, Did you complete the Steps from the Complete Installation guide? Did the software work prior to making my changes? If the answer is no to either of those two questions please try again. Verify the software works before you use my files.

Just to reiterate, the folder structure is vital, and spelling is also vital. Folder locations I used/modified are:

  • /home/sandbox/.config/Vrui-4.2/Applications for the two cfg files as noted above in this thread
  • /home/sandbox/src/SARndbox-3.2/share/SARndbox-2.3/shaders for the shader files.
  • /home/sandbox/src/ScreenShots to receive the screen capture files.<\li>
  • /home/sandbox/src/scripts to place all the script files.<\li>
  • /home/sandbox/src/Vuri-4.2-006/Vrui/Tools for the extra two code files to allow scripting.

After you copy the two code files to the tools folder you must “remake” the vrui app to include the new two new code files. The details can be found this post here

Viewing 15 posts - 1 through 15 (of 20 total)

You must be logged in to reply to this topic.

Comments are closed.