Great and easy startup script

Home Forums AR Sandbox Forum Great and easy startup script

This topic contains 6 replies, has 5 voices, and was last updated by  dsl101 3 weeks ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #102284

    GrantWells
    Participant

    Forum member Malamaker has made a great startup script that make all the install process much more user friendly. Mod’s please pin this as its buried at the moment.

    original post here

    Malamakers startup script screenshot

    Instructions and post here https://rivercitylabs.org/augmented-reality-sandbox-setup-configuration-menu-add/

    GitHub: https://github.com/malamaker/UC-Davis-AR-Sandbox-Configuration-Menu

    #103188

    Angelo
    Participant

    I tried your setup but it does not work, I get this when I try I choose an option in the utility
    Make a selection from the following List
    1) Align your kinect sensor
    2) Align your projector
    3) Calibrate sensor and projector
    4) Start AR Sandbox
    5) Exit
    Selection: 1
    Starting Kinect Sensor Alignment tool
    /home/arsandbox/UC-Davis-AR-Sandbox-Configuration-Menu/startAugmentedSandbox.sh: 20: /home/arsandbox/UC-Davis-AR-Sandbox-Configuration-Menu/startAugmentedSandbox.sh: /home/arsandbox/Vrui-3.1/bin/RawKinectViewer: not found
    any suggestions?

    #103203

    elisek
    Participant

    Hi Angelo,

    This setup tool runs for the old version of the software which is why it can’t find the folder Vrui-3.1.
    In startAugmentedSandbox.sh you will need to change the paths to the executives to match your versions (and your folder paths). Therefore, Vrui-3.1 should be replaced by Vrui-4.2, SARndbox-1.6 should be SARndbox-2.3 and Kinect-3.2 where applicable (provided you’re using the newest version of the software). Furthermore, in point 1 the path to RawKinectViewer is in the Kinect folder and not the Vrui folder so that line should probably be:
    ~/Vrui-3.1/bin/RawKinectViewer -compress 0

    I hope that helps.
    Elisa

    #103208

    Angelo
    Participant

    Thank you!!! I made the changes and it works!! I had a feeling I had to do something like that but I was a little hesitant because I have not used Linux for 10 years and that was back in college and they just showed us the basics.

    #103316

    GrantWells
    Participant

    I’ve just banged into the same problem and taken a stab at correcting the paths for the sandbox 2.3 / kinect 2.8 / vrui 4.2 combination and new locations.

    I’ve not run the complete physical setup yet so not certain its 100% correct but seems to be working – can someone with actual skill check and validate please.

    Replace the contents of startAugmentedSandbox.sh in ~/UC-Davis-AR-Sandbox-Configuration-Menu folder with the following:

    
    #!/bin/sh
    # 
    # Author: Malamaker (J.Malavolti) Created: 2016-03-23 Last Updated: 2016-03-24
    # fixed paths GW 2017-05-24 to suit sandbox 2.3 / kinect 2.8 / vrui 4.2
    
    echo "Welcome to the Augmented Reality Sandbox Configuration and Start Menu"
    
    while true; do
    	echo "Make a selection from the following List"
    	echo "  1) Align your kinect sensor"
    	echo "  2) Align your projector"
    	echo "  3) Calibrate sensor and projector"
    	echo "  4) Start AR Sandbox"
    	echo "  5) Exit"
    	read -p "Selection: " userSelection
    
    	case "$userSelection" in
    		1) 	echo "Starting Kinect Sensor Alignment tool"
    			cd /usr/local
    			./bin/RawKinectViewer -compress 0
    			;;
    			
    		2)	echo "Starting Projector Alignment tool"
    			cd /usr/local
    			./bin/XBackground
    			;;
    			
    		3)	echo "Starting calibration tool"
    			read -p "Enter projector witdth: " calWidth
    			read -p "Enter projector height: " calHeight
    			cd ~/src/SARndbox-2.3
    			./bin/CalibrateProjector -s $calWidth $calHeight
    			;;
    
    		4)	echo "Starting AR Sandbox"
    			cd ~/src/SARndbox-2.3
    			./bin/SARndbox -uhm -fpv
    			;;
    
    		5)	echo "Exiting Augmented Reality Sandbox Menu"
    			exit
    			;;
    	esac
    	
    	sleep 2
    	echo "\n\n"
    done
    #103419

    malamaker86
    Participant

    Thanks for the involvement with keeping this script current. Time doesn’t always allow you to circle back around to fun projects like this. @grantwells let me know how your updates work and I will update the github project with the changes just as you have things written.

    #103424

    dsl101
    Participant

    Having a portable sandbox, I was finding creating the BoxLayout file every time quite fiddly. So I wrote this short bash script which does the necessary processing on the RawKinectViewer output. It’s quite fragile and has no error checking, but if you’re careful, it will create a valid config. Run it from src/SARndbox-2.3/bin like this:

    $ ./createBoxLayout.sh > ../etc/SARndbox-2.3/BoxLayout.txt

    Source:

    
    #!/bin/bash
    set -f
    while read x 
    do
    	if [[ "$x" =~ "Camera-space plane equation:".* ]]
    	then
    		words=($x)
    		echo "${words[5]} ${words[6]} ${words[7]}, ${words[9]}"
    	fi
    
    	if [[ "$x" =~ ^"( ".* ]]
    	then
    		echo "$x"
    	fi
    done < <(/usr/local/bin/RawKinectViewer -compress 0)
    
    • This reply was modified 3 weeks ago by  dsl101. Reason: Formatting
    • This reply was modified 3 weeks ago by  dsl101. Reason: Typos
Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.

Comments are closed.