Home › Forums › AR Sandbox Forum › Adding assigned water keys when other modifications are already present
Tagged: drain button, key assignment, sandbox mods
- This topic has 4 replies, 2 voices, and was last updated 1 year, 11 months ago by Sean Robinson.
-
AuthorPosts
-
December 16, 2022 at 9:02 am #2411FOCWParticipant
Hello!
Our sandbox is now running with water simulation. The previous users had already set it up to autorun with fullscreen on boot, as well as set up a desktop icon for double-click launching. To this I would like to add permanent rain/drain keys. I did a search of the archived forum, which led me back to the current Installation page, Step 15, as the most up to date instructions for this. However, the instructions are for adding multiple enhancements in a single go. I don’t want to mess up what was already done, so I wanted to check that the code I’m adding is correct and going in the correct place.
The original post had the code and I think that’s what got it stuck in moderation. If this posts successfully I will add more info in a reply.
December 16, 2022 at 9:03 am #2412FOCWParticipantBelow is the code in the shell script in the desktop icon (i.e. what you get when you right-click the icon and open with text editor). Could someone explain what the syntax is telling the computer to do here, and what I need to add to make it reference SARndbox.cfg?
#!/usr/bin/env bash if [[ $1 -ne 0 ]]; then sleep $1 fi ~/src/SARndbox-2.3/bin/SARndbox -mergeConfig ~/src/Vrui.cfg -uhm -fpv
I did a file search on our system and SARndbox.cfg exists and contains the following:
# Configuration file for SARndbox application # Copyright (c) 2016 Oliver Kreylos section SARndbox section Camera # Configuration parameters for Kinect v1 compressDepthFrames true smoothDepthFrames false endsection endsection
December 16, 2022 at 9:05 am #2414FOCWParticipantLooking at Step 15 in the instructions, it looks like I would add only the following to SARndbox.cfg:
section Tools section DefaultTools # Bind a global rain/dry tool to the "1" and "2" keys: section WaterTool toolClass GlobalWaterTool bindings ((Mouse, 1, 2))
And then with the endsections adjusted the file would look like this?
section SARndbox section Camera # Configuration parameters for Kinect v1 compressDepthFrames true smoothDepthFrames false 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
According to Step 17 in the instructions, once I add the correct reference to the startup icon script, the autorun will reference it and I should be all set.
December 16, 2022 at 9:06 am #2415FOCWParticipantBonus round: I think I read something about changing the drain/evaporation rate somewhere on the forum, but can’t find it now. Is there a setting for this, or would it require another script addition? The installation is primarily for school-age children, so a faster or even instant drain rate would help with keeping their attention.
December 19, 2022 at 7:08 am #2416Sean RobinsonParticipantI suspect there are several versions of Vrui, Kinect, and SARndbox simultaneously installed on your sandbox. While this is not a problem for the software, it can lead to confusion for the person maintaining the sandbox. As an example, the desktop icon shell script seems to be running SARndbox v2.3, but the latest version is 2.8. If you run
ls -ld ~/src/*
in a terminal window, it should show all the versions currently installed.Your changes to SARndbox.cfg look generally good. I don’t know enough about your specific sandbox configuration to say whether this will definitely add water tools.
Bonus round
Run the sandbox from a terminal window with the
-h
option to see a list of all options and their defaults. One option is-evr
to set a constant evaporation rate.IIRC, draining happens just as fast as raining. They’re the same absolute magnitude, but opposite signs.
If you want to have a button press for a faster drain, I think it could be done with some pre-build patches and more scripting with the control pipe.
-
AuthorPosts
- You must be logged in to reply to this topic.