Automating drainage key mapping

Home Forums AR Sandbox Forum Automating drainage key mapping

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
  • #100656


    Firstly thanks for sharing this awesome project Oliver. Everyone who sees ours loves it 🙂

    Just wondering if there is a way to automatically assign the key to drain the basin when the SARndbox application starts? I’ve forgotten to do this a few times after a restart so it would be great to automate this.



    Oliver Kreylos

    There are two ways, and the easier one is probably the following:

    * Start the application, and manually set up your tools as you want, e.g., bind your favorite keys to the water management tool etc.

    * In the application’s main menu (right mouse button), select “Vrui System” -> “Devices” -> “Save Input Graph…” An input graph is the full set of virtual input devices and tool bindings that are currently active in an application.

    * In the file selection box that pops up, either enter a name for your input graph file (press F1 to go to “text entry mode,” enter the filename, then press F1 again to go back to regular mode), or go with the default name. Press OK to confirm.

    * After exiting the application, find the file you just saved. If you didn’t give it a meaningful name from within the application, rename it using the file manager or command line.

    * When starting the application the next time, add -loadInputGraph <input graph file name> to the command line, where <input graph file name> is the name of the file you saved.

    If you use a script or icon to start the application, append the command line arguments in there.


    Hi Oliver

    There seems to be an extra trick to this to get it working.

    I kept getting a segmentation fault when I pressed one of the water management keys after loading the input graph from the command line. I then loaded it manually (Vrui System -> Devices -> Load Input Graph…) and everything worked fine.

    It seems that you have to click one of the mouse buttons after loading the input graph from the command line. After doing this the it works as expected. If I don’t click a mouse button before pressing a water management key I get a core dump every time. Looks like a bug.

    Thanks for your help

    Oliver Kreylos

    Unfortunately, the “mouse click before key press” issue is a known bug in the current release that’s already fixed in the upcoming next version, see elsewhere on this forum.


    Hi Oliver,
    Are these instructions still applicable to the current version?
    I tried following them but it is not working for me. I get a “command not found” in the terminal window for “-loadinputgraph”
    I set the buttons, saved the file, found the file and named it “watermanager.inputgraph”.
    I get an error in tereminal if I tried the “-loadinputgraph watermanager.inputgraph”
    I also get an error in terminal if I copy all the text from that file into the terminal window.

    Do you know what it is that I am doing wrong?

    I would like this to run on boot. I did successfully make a .sh for launching the sandbox on boot and in full screen which works great. I tried copying the text from the save file to that file and it also gives the error.

    Thank you for any input you can give me!


    Hi Brett,

    You said you made a successful .sh for launching the sandbox on boot and in full screen?

    Could you possibly share with me how you did this? I just created my AR Sandbox and this is one of the many things I would like to accomplish. I’m pretty new to Linux so any explanation would be perfect.



    Sorry it took me so long to see this. I used the instructions in the reply to this post.

    Oliver Kreylos

    From a terminal, run

    $ ./bin/SARnbox <usual command line arguments> -loadInputGraph watermanager.inputgraph

    that should do the trick.


    Hi Dr Kreylos,

    When I try and load a saved view on our 2 screen setup (LCD display and Projector) using your instructions in this thread I get the following error:

    ~/src/SARndbox-2.3/bin $ ./SARndbox -uhm -fpv -wi 1 -uhm -uhs -rws -loadInputGraph front.inputgraph -vruiVerbose

    Terminated Sandbox due to exception: Misc::File: Error opening file /home/sandbox/src/SARndbox-2.3/bin/front.inputgraph in mode rt

    Am I doing something obviously wrong?

    (Running Mint 18.1, SARndbox 2.3, Vrui 4.2-006, Kinect 3.2)

    Thanks in advance.

    Oliver Kreylos

    Vrui is not finding a file it needs, and is looking in a strange place.

    Before trying to fix that, please look at this guide on a simpler way to set up additional AR Sandbox features, including binding water keys.

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.

Comments are closed.