mirror of
https://github.com/wassname/pyrobolearn.git
synced 2026-09-09 11:31:38 +08:00
add license, requirements, setup and install scripts
This commit is contained in:
Executable
+63
@@ -0,0 +1,63 @@
|
||||
#!/bin/sh
|
||||
# Install everything: for each package, ask the user if he/she wishes to install it
|
||||
|
||||
# check if user is root (i.e. running with sudo)
|
||||
if [ `whoami` != root ]; then
|
||||
echo "Please run this script with sudo"
|
||||
exit
|
||||
fi
|
||||
|
||||
# check the first argument which must be the source directory
|
||||
if [ -z $1 ]
|
||||
then
|
||||
echo "Specify the absolute location (or relative to home) where to install the various packages."
|
||||
exit
|
||||
fi
|
||||
|
||||
|
||||
## Install packages
|
||||
|
||||
# install ros-kinetic
|
||||
read -p 'Do you wish to install the `ros-kinetic` package on this computer [yes/no]?: ' reply
|
||||
if [ $reply = 'yes' ]; then
|
||||
echo "Installing ros-kinetic..."
|
||||
$PWD/install_ros_kinetic.sh
|
||||
else
|
||||
echo "Not installing ros-kinetic"
|
||||
fi
|
||||
|
||||
# install rbdl
|
||||
read -p 'Do you wish to install the `rbdl` package on this computer [yes/no]?: ' reply
|
||||
if [ $reply = 'yes' ]; then
|
||||
echo "Installing rbdl..."
|
||||
$PWD/install_rbdl.sh
|
||||
else
|
||||
echo "Not installing rbdl"
|
||||
fi
|
||||
|
||||
# install ipopt
|
||||
read -p 'Do you wish to install the `ipopt` package on this computer [yes/no]?: ' reply
|
||||
if [ $reply = 'yes' ]; then
|
||||
echo "Installing ipopt..."
|
||||
$PWD/install_ipopt.sh
|
||||
else
|
||||
echo "Not installing ipopt"
|
||||
fi
|
||||
|
||||
# install openni2 & nite2
|
||||
read -p 'Do you wish to install the `openni2`, `libfreenect`, and `nite2` packages on this computer [yes/no]?: ' reply
|
||||
if [ $reply = 'yes' ]; then
|
||||
echo "Installing openni2, libfreenect, and nite2..."
|
||||
$PWD/install_openni2_nite2.sh $1
|
||||
else
|
||||
echo "Not installing openni2, libfreenect, and nite2"
|
||||
fi
|
||||
|
||||
# install openpose
|
||||
read -p 'Do you wish to install the `openpose` package on this computer [yes/no]?: ' reply
|
||||
if [ $reply = 'yes' ]; then
|
||||
echo "Installing openpose..."
|
||||
$PWD/install_openpose.sh $1
|
||||
else
|
||||
echo "Not installing openpose"
|
||||
fi
|
||||
Executable
+7
@@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
# Install audio packages for Ubuntu which is needed for pyaudio.
|
||||
|
||||
sudo apt-get install libasound-dev portaudio19-dev libportaudio2 libportaudiocpp0
|
||||
sudo apt-get install ffmpeg libav-tools
|
||||
|
||||
pip install pyaudio
|
||||
Executable
+8
@@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
# This bash script install the gdal library and the official python wrapper
|
||||
|
||||
sudo apt-get install libgdal-dev
|
||||
export CPLUS_INCLUDE_PATH=/usr/include/gdal
|
||||
export C_INCLUDE_PATH=/usr/include/gdal
|
||||
#sudo pip install gdal
|
||||
sudo apt-get install python-gdal
|
||||
Executable
+88
@@ -0,0 +1,88 @@
|
||||
#!/bin/sh
|
||||
# File taken from CarND-MPC-Project from Udacity but modified to install python wrapper as well
|
||||
# Source: https://github.com/udacity/CarND-MPC-Project
|
||||
#
|
||||
# To use this script:
|
||||
# $ sudo ./install_openni2_nite2.sh <path/to/install/packages>
|
||||
#
|
||||
# You might need to source your .bashrc file at the end.
|
||||
#
|
||||
# IPopt installation on MacOSX:
|
||||
# brew install ipopt --with-openblas
|
||||
|
||||
# Define few variables
|
||||
currentdir=$PWD
|
||||
|
||||
# Pass the Ipopt source directory as the first argument
|
||||
if [ -z $1 ]
|
||||
then
|
||||
echo "Specifiy the location of the Ipopt source directory in the first argument."
|
||||
exit
|
||||
fi
|
||||
cd $1
|
||||
|
||||
# specify ipopt version
|
||||
version=3.12.12
|
||||
|
||||
# install gfortran
|
||||
sudo apt-get install gfortran
|
||||
|
||||
# download ipopt
|
||||
wget https://www.coin-or.org/download/source/Ipopt/Ipopt-${version}.zip
|
||||
unzip Ipopt-${version}.zip
|
||||
rm Ipopt-${version}.zip
|
||||
|
||||
cd Ipopt-${version}
|
||||
|
||||
prefix=/usr/local
|
||||
srcdir=$PWD
|
||||
|
||||
echo "Building Ipopt from ${srcdir}"
|
||||
echo "Saving headers and libraries to ${prefix}"
|
||||
|
||||
# BLAS
|
||||
cd $srcdir/ThirdParty/Blas
|
||||
./get.Blas
|
||||
mkdir -p build && cd build
|
||||
../configure --prefix=$prefix --disable-shared --with-pic
|
||||
make
|
||||
sudo make install
|
||||
|
||||
# Lapack
|
||||
cd $srcdir/ThirdParty/Lapack
|
||||
./get.Lapack
|
||||
mkdir -p build && cd build
|
||||
../configure --prefix=$prefix --disable-shared --with-pic \
|
||||
--with-blas="$prefix/lib/libcoinblas.a -lgfortran"
|
||||
make
|
||||
sudo make install
|
||||
|
||||
# ASL
|
||||
cd $srcdir/ThirdParty/ASL
|
||||
./get.ASL
|
||||
|
||||
# MUMPS
|
||||
cd $srcdir/ThirdParty/Mumps
|
||||
./get.Mumps
|
||||
|
||||
# build everything
|
||||
cd $srcdir
|
||||
./configure --prefix=$prefix coin_skip_warn_cxxflags=yes \
|
||||
--with-blas="$prefix/lib/libcoinblas.a -lgfortran" \
|
||||
--with-lapack=$prefix/lib/libcoinlapack.a
|
||||
make
|
||||
make test
|
||||
sudo make -j1 install
|
||||
|
||||
# write variables to export in the ~/.bashrc file, and source it
|
||||
cd
|
||||
echo "" >> .bashrc
|
||||
echo "# Export environment variables for IPopt" >> .bashrc
|
||||
echo "export LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:/usr/local/lib/" >> .bashrc
|
||||
# source .bashrc
|
||||
|
||||
# install python package
|
||||
pip install ipopt
|
||||
|
||||
# return to the original directory
|
||||
cd $currentdir
|
||||
Executable
+134
@@ -0,0 +1,134 @@
|
||||
#!/bin/sh
|
||||
# This bash script install the OpenNI2 and Nite2 packages (tested on Ubuntu 16.04)
|
||||
#
|
||||
# To use this script:
|
||||
# $ sudo ./install_openni2_nite2.sh <path/to/install/packages>
|
||||
#
|
||||
# You might need to source your .bashrc file at the end.
|
||||
#
|
||||
# Github repo:
|
||||
# - https://github.com/OpenNI/OpenNI
|
||||
# - https://github.com/occipital/OpenNI2
|
||||
# - https://github.com/OpenKinect/libfreenect
|
||||
#
|
||||
# References:
|
||||
# - https://roboticslab-uc3m.gitbook.io/installation-guides/install-openni-nite
|
||||
# - https://stackoverflow.com/questions/32415089/install-openni2-and-nite2-on-linux
|
||||
# - https://codeyarns.com/2015/08/04/how-to-install-and-use-openni2/
|
||||
#
|
||||
# To test kinect (with libfreenect):
|
||||
# $ freenect-glview
|
||||
# To test asus/kinect (with openni, check in the Bin and Tools folders):
|
||||
# $ NiViewer
|
||||
# $ UserViewer
|
||||
|
||||
# Define few variables
|
||||
currentdir=$PWD
|
||||
|
||||
# Check if user is root/running with sudo
|
||||
if [ `whoami` != root ]; then
|
||||
echo "Please run this script with sudo"
|
||||
exit
|
||||
fi
|
||||
|
||||
# check the first argument which must be the source directory
|
||||
if [ -z $1 ]
|
||||
then
|
||||
echo "Specify the absolute location (or relative to home) where to install the OpenNI2, libfreenect, and NiTE2 packages."
|
||||
exit
|
||||
fi
|
||||
|
||||
# move to that directory
|
||||
cd; cd $1
|
||||
|
||||
# install requirement packages
|
||||
echo "Installing prerequired packages..."
|
||||
sudo apt-get install git g++ cmake libxi-dev libxmu-dev libusb-1.0-0-dev pkg-config freeglut3-dev build-essential libudev-dev openjdk-8-jdk usbutils
|
||||
|
||||
# driver for Asus Xtion Pro Live OpenNI driver (Ubuntu)
|
||||
sudo apt-get install libopenni-sensor-primesense0
|
||||
|
||||
# install OpenNI2
|
||||
echo "Installing OpenNI2..."
|
||||
cd; cd $1
|
||||
git clone https://github.com/occipital/OpenNI2.git # We used to have a fork off 6857677beee08e264fc5aeecb1adf647a7d616ab with working copy of Xtion Pro Live OpenNI2 driver.
|
||||
cd OpenNI2
|
||||
make -j`nproc`
|
||||
sudo ln -s $PWD/Bin/x64-Release/libOpenNI2.so /usr/local/lib/ # $PWD should be /yourPathTo/OpenNI2
|
||||
sudo ln -s $PWD/Bin/x64-Release/OpenNI2/ /usr/local/lib/ # $PWD should be /yourPathTo/OpenNI2
|
||||
sudo ln -s $PWD/Include /usr/local/include/OpenNI2 # $PWD should be /yourPathTo/OpenNI2
|
||||
sudo ldconfig
|
||||
#sudo $PWD/Packaging/Linux/install.sh
|
||||
sudo cp $PWD/Packaging/Linux/primesense-usb.rules /etc/udev/rules.d/557-primesense-usb.rules # install udev rules for usb devices
|
||||
# Install prebuilt SDK from online (instead of git)
|
||||
#wget https://s3.amazonaws.com/com.occipital.openni/OpenNI-Linux-x64-2.2.0.33.tar.bz2
|
||||
#tar -xjvf OpenNI-Linux-x64-2.2.0.33.tar.bz2 && rm OpenNI-Linux-x64-2.2.0.33.tar.bz2
|
||||
#cd OpenNI-Linux-x64-2.2
|
||||
#sudo ./install.sh # this installs 'primesense-usb.rules' in /etc/udev/rules.d/, and defines environment variables 'OPENNI2_*'
|
||||
#cd; cd $1
|
||||
#cp libfreenect/build/lib/OpenNI2-FreenectDriver/libFreenectDriver.so OpenNI-Linux-x64-2.2/Redist/OpenNI2/Drivers/
|
||||
#cp libfreenect/build/lib/OpenNI2-FreenectDriver/libFreenectDriver.so OpenNI-Linux-x64-2.2/Tools/OpenNI2/Drivers/
|
||||
#cd OpenNI-Linux-x64-2.2/Tools
|
||||
#./NiViewer
|
||||
|
||||
# Test the installation
|
||||
#cd Bin/x64-Release/
|
||||
#./NiViewer
|
||||
|
||||
# install libfreenect because it contains a driver to be used with OpenNI2
|
||||
echo "Installing libfreenect..."
|
||||
cd; cd $1
|
||||
git clone https://github.com/OpenKinect/libfreenect
|
||||
cd libfreenect && mkdir -p build
|
||||
cd build
|
||||
cmake .. -DBUILD_OPENNI2_DRIVER=ON
|
||||
make -j`nproc`
|
||||
sudo make install
|
||||
sudo ldconfig
|
||||
sudo ln -s /usr/local/lib/OpenNI2-FreenectDriver/libFreenectDriver.so /usr/local/lib/OpenNI2/Drivers
|
||||
cd ..
|
||||
sudo cp platform/linux/udev/51-kinect.rules /etc/udev/rules.d/ # don't need to run the app as root
|
||||
cd wrappers/python/
|
||||
sudo python setup.py install
|
||||
|
||||
# Test the installation
|
||||
#freenect-glview
|
||||
|
||||
# Set rules to avoid needing sudo when trying to read data from the sensors connected via USB port
|
||||
sudo sh -c "echo 'KERNEL == \"ttyUSB0\", MODE = \"0777\"' > 80-persistent-local-usb.rules"
|
||||
|
||||
# install NiTE2
|
||||
echo "Installing NiTE2..."
|
||||
cd; cd $1
|
||||
wget https://sourceforge.net/projects/roboticslab/files/External/nite/NiTE-Linux-x64-2.2.tar.bz2
|
||||
tar xvf NiTE-Linux-x64-2.2.tar.bz2 && rm NiTE-Linux-x64-2.2.tar.bz2
|
||||
cd NiTE-Linux-x64-2.2/
|
||||
sudo ./install.sh # defines environment variables 'NITE2_*'
|
||||
sudo ln -s $PWD/Redist/libNiTE2.so /usr/local/lib/
|
||||
sudo ln -s $PWD/Include /usr/local/include/NiTE-Linux-x64-2.2
|
||||
cd ..
|
||||
sudo ldconfig
|
||||
# Test the installation
|
||||
#cd NiTE-Linux-x64-2.2/Samples/Bin
|
||||
#./UserViewer
|
||||
|
||||
# write variables to export in the ~/.bashrc file, and source it
|
||||
cd
|
||||
OUT_FILE=".bashrc"
|
||||
echo "" >> $OUT_FILE
|
||||
echo "# Export OPENNI and NITE environment variables" >> $OUT_FILE
|
||||
echo "export OPENNI2_INCLUDE=$1/OpenNI2/Include" >> $OUT_FILE
|
||||
if [ `uname -m` = "x86_64" ];
|
||||
then
|
||||
#echo "export OPENNI2_REDIST64=$1/OpenNI-Linux-x64-2.2/Redist" >> $OUT_FILE
|
||||
echo "export OPENNI2_REDIST64=$1/OpenNI2/Bin/x64-Release" >> $OUT_FILE
|
||||
echo "export NITE2_REDIST64=$1/NiTE-Linux-x64-2.2/Redist" >> $OUT_FILE
|
||||
else
|
||||
#echo "export OPENNI2_REDIST=$1/OpenNI-Linux-x64-2.2/Redist" >> $OUT_FILE
|
||||
echo "export OPENNI2_REDIST=$1/OpenNI2/Bin/x64-Release" >> $OUT_FILE
|
||||
echo "export NITE2_REDIST=$1/NiTE-Linux-x64-2.2/Redist" >> $OUT_FILE
|
||||
fi
|
||||
# source .bashrc
|
||||
|
||||
# return to the original directory
|
||||
cd $currentdir
|
||||
Executable
+94
@@ -0,0 +1,94 @@
|
||||
#!/bin/sh
|
||||
# This bash script install the openpose and the official python wrapper
|
||||
#
|
||||
# Github repo: https://github.com/CMU-Perceptual-Computing-Lab/openpose
|
||||
# Reference: https://github.com/CMU-Perceptual-Computing-Lab/openpose/blob/master/doc/installation.md
|
||||
# FAQ (troubleshooting): https://github.com/CMU-Perceptual-Computing-Lab/openpose/blob/master/doc/faq.md
|
||||
|
||||
|
||||
# Define few variables
|
||||
currentdir=$PWD
|
||||
|
||||
# Check if user is root/running with sudo
|
||||
if [ `whoami` != root ]; then
|
||||
echo "Please run this script with sudo"
|
||||
exit
|
||||
fi
|
||||
|
||||
# check the first argument which must be the source directory
|
||||
if [ -z $1 ]
|
||||
then
|
||||
echo "Specify the absolute location (or relative to home) where to install the Openpose package."
|
||||
exit
|
||||
fi
|
||||
|
||||
# move to that directory
|
||||
cd; cd $1
|
||||
|
||||
# clone repository
|
||||
git clone https://github.com/CMU-Perceptual-Computing-Lab/openpose
|
||||
cd openpose
|
||||
git pull origin master
|
||||
|
||||
# Prerequisites
|
||||
sudo apt-get install cmake-qt-gui
|
||||
sudo apt install cmake-curses-gui
|
||||
read -p 'Do you wish to install the CUDA8 on this computer [yes/no]?: ' reply
|
||||
if [ $reply = 'yes' ]; then
|
||||
echo "Installing CUDA8..."
|
||||
sudo ./scripts/ubuntu/install_cuda.sh
|
||||
else
|
||||
echo "Not installing CUDA8"
|
||||
fi
|
||||
read -p 'Do you wish to install the cuDNN5.1 on this computer [yes/no]?: ' reply
|
||||
if [ $reply = 'yes' ]; then
|
||||
echo "Installing cuDNN5.1..."
|
||||
sudo ./scripts/ubuntu/install_cudnn.sh
|
||||
else
|
||||
echo "Not installing cuDNN5.1"
|
||||
fi
|
||||
sudo ./scripts/ubuntu/install_deps.sh
|
||||
sudo apt-get install libopencv-dev
|
||||
sudo apt-get install nvidia-modprobe
|
||||
|
||||
mkdir build && cd build
|
||||
echo "Check https://github.com/CMU-Perceptual-Computing-Lab/openpose/blob/master/doc/installation.md#openpose-configuration for more information on how to configure the openpose package"
|
||||
#cmake-gui
|
||||
# to build with python 2.7
|
||||
#export PYTHON_EXECUTABLE=/usr/bin/python2.7
|
||||
#export PYTHON_LIBRARY=/usr/lib/x86_64-linux-gnu/libpython2.7.so
|
||||
cmake -DBUILD_PYTHON=ON -DPYBIND11_PYTHON_VERSION=2.7 ..
|
||||
make -j`nproc`
|
||||
sudo make install
|
||||
sudo cp python/openpose/pyopenpose.so /usr/local/lib/python2.7/dist-packages/
|
||||
cd ..
|
||||
OPENPOSE_PATH_DIR=$PWD
|
||||
|
||||
# go to home directory and export environment variables in the bashrc
|
||||
cd
|
||||
echo "\n\n# Export OPENPOSE environment variables" >> ".bashrc"
|
||||
echo "export OPENPOSE_PATH=$OPENPOSE_PATH_DIR" >> ".bashrc"
|
||||
|
||||
# Test installation (check github.com/CMU-Perceptual-Computing-Lab/openpose/blob/master/doc/quick_start.md)
|
||||
#cd OPENPOSE_PATH_DIR
|
||||
#./build/examples/openpose/openpose.bin
|
||||
# Python examples are in github.com/CMU-Perceptual-Computing-Lab/openpose/tree/master/examples/tutorial_api_python
|
||||
|
||||
# return to original directory
|
||||
cd currentdir
|
||||
|
||||
|
||||
# Troubleshootings
|
||||
# - If you obtain the following error "nvcc fatal : Unsupported gpu architecture 'compute_<xx>'", just modify the
|
||||
# cmake/Cuda.cmake file, from the line "set(Caffe_known_gpu_archs "...")", remove the architectures that your
|
||||
# computer does not possess. You can also specify the architecture in the cmake line with the option "CUDA_ARCH".
|
||||
# - If you obtain an error with the python version, you have to specify the version you want to use to pybind11, by
|
||||
# setting the option "-DPYBIND11_PYTHON_VERSION=2.7"
|
||||
# - If you have the following error "Cuda check failed (30 vs. 0): unknown error" when launching a basic example
|
||||
# in openpose as given in "https://github.com/CMU-Perceptual-Computing-Lab/openpose/blob/master/doc/quick_start.md",
|
||||
# then the error comes from your Nvidia GPU driver or your CUDA toolkit. Check the solutions given in the following
|
||||
# link: https://github.com/NVIDIA/DIGITS/issues/1663
|
||||
# Before tempting any solutions, try to reboot your computer (this solution worked for me). Otherwise, this will
|
||||
# probably require you to reinstall the Nvidia drivers / CUDA toolkit.
|
||||
# - If you have an error with Qt such as: qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in "", reinstall
|
||||
# the package, or install qtcreator.
|
||||
Executable
+74
@@ -0,0 +1,74 @@
|
||||
#!/bin/sh
|
||||
# This bash script install the rbdl library and the official python wrapper
|
||||
#
|
||||
# repo + documentation: https://rbdl.bitbucket.io/
|
||||
# paper: https://pdfs.semanticscholar.org/f129/5068f646ea9379da72ba5183276ca73a038d.pdf
|
||||
|
||||
# Define few variables
|
||||
currentdir=$PWD
|
||||
|
||||
# Check if user is root/running with sudo
|
||||
if [ `whoami` != root ]; then
|
||||
echo "Please run this script with sudo"
|
||||
exit
|
||||
fi
|
||||
|
||||
# check the first argument which must be the source directory
|
||||
if [ -z $1 ]
|
||||
then
|
||||
echo "Specify the absolute location (or relative to home) where to install the Openpose package."
|
||||
exit
|
||||
fi
|
||||
|
||||
# move to that directory
|
||||
cd; cd $1
|
||||
|
||||
# Install requirements
|
||||
# update & upgrade #
|
||||
sudo apt-get update
|
||||
sudo apt-get upgrade
|
||||
|
||||
#install cython
|
||||
sudo apt-get -y install cython
|
||||
# build-tools
|
||||
sudo apt-get -y install build-essential
|
||||
sudo apt-get -y install cmake
|
||||
# eigen
|
||||
sudo apt-get -y install libeigen3-dev
|
||||
|
||||
# download and install rbdl
|
||||
sudo rm -r rbdl
|
||||
wget https://bitbucket.org/rbdl/rbdl/get/default.zip
|
||||
unzip default.zip
|
||||
rm default.zip
|
||||
mv rbdl-rbdl-* rbdl
|
||||
cd rbdl
|
||||
mkdir build && cd build/
|
||||
cmake -D CMAKE_BUILD_TYPE=Release -D RBDL_BUILD_ADDON_URDFREADER=ON -D RBDL_BUILD_PYTHON_WRAPPER=ON ../
|
||||
# make error fix: cd addons/urdfreader
|
||||
# open urdfreader.cc
|
||||
# remove the line: #include "ros/ros.h"
|
||||
make -j`nproc`
|
||||
sudo make install
|
||||
|
||||
## to use python wrapper, you need to install Cython and NumPy
|
||||
cd python
|
||||
sudo cp rbdl.so /usr/local/lib/python2.7/dist-packages
|
||||
sudo cp rbdl.so /usr/local/lib/python2.7/site-packages
|
||||
|
||||
# return to original directory
|
||||
cd currentdir
|
||||
|
||||
|
||||
## to wrap GetBodyId() function
|
||||
#
|
||||
# Inside crbdl.pxd, add:
|
||||
# unsigned int GetBodyId(const char *body_name)
|
||||
# inside cdef cppclass Model:
|
||||
#
|
||||
# Inside rbdl-wrapper.pyx, add:
|
||||
# def GetBodyId (self, char* body_name):
|
||||
# return self.thisptr.GetBodyId(body_name)
|
||||
# inside cdef class Model:
|
||||
#
|
||||
# then do cmake, make, install again
|
||||
Executable
+49
@@ -0,0 +1,49 @@
|
||||
#!/bin/bash
|
||||
# update & upgrade #
|
||||
sudo apt-get update
|
||||
sudo apt-get upgrade
|
||||
|
||||
# install ros indigo #
|
||||
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
|
||||
sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 0xB01FA116
|
||||
sudo apt-get update
|
||||
sudo apt-get -y install ros-kinetic-desktop-full
|
||||
sudo rosdep init
|
||||
rosdep update
|
||||
echo "source /opt/ros/kinetic/setup.bash" >> ~/.bashrc
|
||||
source ~/.bashrc
|
||||
sudo apt-get -y install python-rosinstall
|
||||
|
||||
# install catkin #
|
||||
sudo apt-get -y install ros-kinetic-catkin
|
||||
|
||||
|
||||
# create ros workspace #
|
||||
mkdir -p ~/catkin_ws/src
|
||||
cd ~/catkin_ws/src
|
||||
catkin_init_workspace
|
||||
cd ~/catkin_ws/
|
||||
catkin_make
|
||||
echo "source ~/catkin_ws/devel/setup.bash" >> ~/.bashrc
|
||||
|
||||
# update gazebo to latest version #
|
||||
#sudo sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu trusty #main" > /etc/apt/sources.list.d/gazebo-latest.list'
|
||||
#wget http://packages.osrfoundation.org/gazebo.key -O - | sudo apt-key add -
|
||||
#sudo apt-get update
|
||||
#sudo apt-get upgrade
|
||||
|
||||
# install gazebo ros pkgs #
|
||||
sudo sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable `lsb_release -cs` main" > /etc/apt/sources.list.d/gazebo-stable.list'
|
||||
wget http://packages.osrfoundation.org/gazebo.key -O - | sudo apt-key add -
|
||||
sudo apt-get -y install ros-kinetic-gazebo-ros-pkgs ros-kinetic-gazebo-ros-control
|
||||
|
||||
# install ros control #
|
||||
sudo apt-get -y install ros-kinetic-ros-control ros-kinetic-ros-controllers
|
||||
|
||||
# additional setting #
|
||||
#echo "export LC_NUMERIC=C" >> ~/.bashrc
|
||||
#echo "killall -q roscore" >> ~/.bashrc
|
||||
#echo "killall -q rosmaster" >> ~/.bashrc
|
||||
#echo "killall -q gazebo" >> ~/.bashrc
|
||||
#echo "killall -q gzserver" >> ~/.bashrc
|
||||
#echo "killall -q gzclient" >> ~/.bashrc
|
||||
Executable
+18
@@ -0,0 +1,18 @@
|
||||
#!/bin/sh
|
||||
# This bash installs the 'sloccount' command which counts source lines of code, and provides several statisticsabout this last one.
|
||||
# Once installed, go to the pyrobolearn package and type:
|
||||
# $ sloccount *.py */*.py
|
||||
|
||||
# define variables
|
||||
origindir=$PWD
|
||||
scriptdir=`dirname $0`
|
||||
|
||||
# install package
|
||||
sudo apt install sloccount -y
|
||||
|
||||
# compute statistics for pyrobolearn software
|
||||
cd $scriptdir; cd ..
|
||||
sloccount *.py */*.py
|
||||
|
||||
# return to the original directory
|
||||
cd $origindir
|
||||
Executable
+48
@@ -0,0 +1,48 @@
|
||||
#!/bin/sh
|
||||
# This bash script install the trac_ik library and the official python wrapper
|
||||
#
|
||||
# wiki: http://wiki.ros.org/trac_ik
|
||||
# repo: https://bitbucket.org/traclabs/trac_ik
|
||||
|
||||
# install from Debian package
|
||||
#sudo apt-get install ros-kinetic-trac-ik
|
||||
|
||||
# Define few variables
|
||||
currentdir=$PWD
|
||||
|
||||
# Check if user is root/running with sudo
|
||||
if [ `whoami` != root ]; then
|
||||
echo "Please run this script with sudo"
|
||||
exit
|
||||
fi
|
||||
|
||||
# check the first argument which must be the source directory
|
||||
if [ -z $1 ]
|
||||
then
|
||||
echo "Specify the absolute location (or relative to home) where to install the Openpose package."
|
||||
exit
|
||||
fi
|
||||
|
||||
# move to that directory
|
||||
cd; cd $1
|
||||
|
||||
# install requirements
|
||||
sudo apt-get install libccd-dev libccd2 libfcl-0.5-dev libfcl0.5
|
||||
sudo apt-get install libnlopt-dev libnlopt0 # nlopt
|
||||
sudo apt-get -y install libeigen3-dev # eigen
|
||||
sudo pip install nlopt
|
||||
|
||||
# install trac_ik library from sources
|
||||
git clone https://bitbucket.org/traclabs/trac_ik.git
|
||||
cd trac_ik/trac_ik_lib/
|
||||
mkdir build && cd build
|
||||
cmake -DPYTHON_VERSION=2.7 ..
|
||||
make -j2
|
||||
source devel/setup.bash
|
||||
|
||||
# install python
|
||||
cd ../../trac_ik_python/
|
||||
mkdir build && cd build
|
||||
cmake -DPYTHON_VERSION=2.7 ..
|
||||
make -j2
|
||||
sudo make install
|
||||
Reference in New Issue
Block a user