Reply To: Great and easy startup script

Home Forums AR Sandbox Forum Great and easy startup script Reply To: Great and easy startup script

#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 years, 3 months ago by dsl101. Reason: Formatting
  • This reply was modified 3 years, 3 months ago by dsl101. Reason: Typos

Comments are closed.