Created
April 8, 2015 19:50
-
-
Save jbohren/b135e543dea5d0a928e3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -e | |
sudo apt-get install git-buildpackage libudev-dev default-jdk | |
# set java alternative | |
java_selection=$(update-alternatives --query java | awk '/^Value: /{print $NF}') | |
javadoc_selection=$(update-alternatives --query javadoc | awk '/^Value: /{print $NF}') | |
echo "java: $java_selection" | |
echo "javadoc: $javadoc_selection" | |
sudo update-alternatives --set java "/usr/lib/jvm/java-7-oracle/jre/bin/java" | |
sudo update-alternatives --set javadoc "/usr/lib/jvm/java-7-oracle/jre/bin/javadoc" | |
# get openni | |
if [ ! -e /tmp/openni2 ]; then | |
mkdir -p /tmp/openni2 | |
cd /tmp/openni2 | |
git clone https://github.com/atuleu/debian-openni2.git | |
else | |
cd /tmp/openni2/debian-openni2 | |
git clean -xfd | |
git reset --hard | |
cd .. | |
fi | |
echo "override_dh_shlibdeps:\n\tdh_shlibdeps \$@ -- --ignore-missing-info" >> /tmp/openni2/debian-openni2/debian/rules | |
cd debian-openni2 | |
git-buildpackage -uc -us --git-ignore-new | |
cd .. | |
sudo dpkg -i libopenni2_2.2.0.33~beta2-1~dev3_amd64.deb | |
sudo dpkg -i libopenni2-dbg_2.2.0.33~beta2-1~dev3_amd64.deb libopenni2-dev_2.2.0.33~beta2-1~dev3_amd64.deb | |
sudo sh -c 'cat <<EOF > /etc/udev/rules.d/40-libopenni2-0.rules | |
SUBSYSTEM=="usb", ATTR{idProduct}=="0609", ATTR{idVendor}=="1d27", MODE:="0666", OWNER:="root", GROUP:="video" | |
EOF | |
' | |
sudo service udev restart | |
echo done, Please compile openni2_camera from source code by | |
echo wstool set --git openni2_camera https://github.com/ros-drivers/openni2_camera.git -v ${ROS_DISTRO}-devel | |
sudo update-alternatives --set java "$java_selection" | |
sudo update-alternatives --set javadoc "$javadoc_selection" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
from https://github.com/jsk-ros-pkg/jsk_recognition/blob/master/install_latest_openni2.sh