@@ -5,15 +5,24 @@ if [ -d ~/pcl ] ; then
exit 0
fi

sudo apt-get install libvtk5-dev libvtk5-qt4-dev
sudo apt-get install libvtk5-dev libvtk5-qt4-dev

cd ~
git clone git@github.com:PointCloudLibrary/pcl.git
cd pcl
git checkout pcl-1.7.2

# apply patch
patch ~/pcl/io/include/pcl/io/impl/point_cloud_image_extractors.hpp < ${SCRIPT_DIR}/pcl/patch/point_cloud_image_extractors.hpp.patch

mkdir build
cd build
cmake ..
make -j2 && sudo make install
cmake .. -DCMAKE_INSTALL_PREFIX="/usr"
make -j8
sudo make install

if [ ! -h /usr/lib/x86_64-linux-gnu/libpcl_common.so ] ; then
sudo ln -s /usr/lib/lib_pcl_common.so /usr/lib/x86_64-linux-gnu/libpcl_common.so
fi

exit 0
@@ -0,0 +1,10 @@
--- /home/alec/pcl/io/include/pcl/io/impl/point_cloud_image_extractors.hpp 2015-11-16 18:48:44.596878619 -0500
+++ pcl/point_cloud_image_extractors.hpp 2015-11-16 18:49:50.048999303 -0500
@@ -42,6 +42,7 @@
#include <map>
#include <ctime>
#include <cstdlib>
+#include <stdint.h>

#include <pcl/common/io.h>

Large diffs are not rendered by default.

@@ -0,0 +1,27 @@
#!/bin/bash

if [ -d ~/pcl_ros_packages ] ; then
echo "PCL ROS packages are already installed."
exit 0
fi

cd ~
mkdir -p ~/pcl_ros_packages/src
cd ~/pcl_ros_packages/src
source ~/.bashrc
catkin_init_workspace .
git clone git@github.com:ros-perception/pcl_conversions.git -b hydro-devel
git clone git@github.com:ros-perception/perception_pcl.git -b hydro-devel
git clone git@github.com:ros-perception/pcl_msgs.git -b hydro-devel
cd ..
catkin_make

cp ~/pcl_ros_packages/devel/share/pcl_msgs/cmake ~/pcl_ros_packages/src/pcl_msgs/

COUNT=$(grep -a "source /home/$USER/pcl_ros_packages/devel/setup.bash" ~/.bashrc | wc -l)
if [ $COUNT -eq 0 ] ; then
echo "source /home/$USER/pcl_ros_packages/devel/setup.bash"
fi

exit 0

@@ -2,6 +2,21 @@

echo "Uninstalling..."

# uninstall gcc
if [ -d ~/gcc_ws ] ; then
rm -rf ~/gcc_ws
echo "Custom GCC uninstalled."
fi

# uninstall boost
if [ -d ~/boost_ws/boost_1_52_0 ] ; then
cd ~/boost_ws/boost_1_52_0
sudo ./b2 uninstall
cd ~
rm -rf ~/boost_ws
echo "Custom boost uninstalled."
fi

# uninstall ASSIMP
if [ -d ~/assimp-3.1.1 ] ; then
cd ~/assimp-3.1.1
@@ -13,6 +28,7 @@ if [ -d ~/assimp-3.1.1 ] ; then

cd ~
rm -rf ~/assimp-3.1.1
echo "ASSIMP uninstalled"
fi

# uninstall ODE
@@ -21,6 +37,7 @@ if [ -d ~/ode ] ; then
sudo make uninstall
cd ~
rm -rf ~/ode
echo "ODE uninstalled."
fi

# uninstall OpenRave
@@ -29,6 +46,7 @@ if [ -d ~/openrave ] ; then
sudo make uninstall
cd ~
rm -rf ~/openrave
echo "OpenRave uninstalled."
fi

# uninstall PCL
@@ -42,6 +60,7 @@ if [ -d ~/pcl ] ; then

cd ~
rm -rf ~/pcl
echo "PCL uninstalled."
fi

# uninstall gazebo
@@ -115,21 +134,20 @@ fi
# uninstall gurobi
if [ -d /opt/gurobi605 ] ; then
sudo rm -rf /opt/gurobi605
echo "Gurobi removed."
fi

if [ -d ~/ros_catkin_deps_ws ] ; then
rm -rf ~/ros_catkin_deps_ws
fi

if [ -d ~/openrave ] ; then

fi

# remove workspace
if [ -d ~/drc_workspace ] ; then
rm -rf ~/drc_workspace
echo "DRC workspace uninstalled."
fi

# remove gurobi
# remove libg2o
if [ -d ~/g2o ] ; then
if [ -d ~/g2o/build ] ; then
cd ~/g2o/build
@@ -138,11 +156,13 @@ if [ -d ~/g2o ] ; then

cd ~
rm -rf ~/g2o
echo "libg2o removed."
fi

# remove multisense
if [ -d ~/multisense_ws ] ; then
rm -rf ~/multisense_ws
echo "Multisense removed."
fi

# remove sbpl
@@ -153,6 +173,49 @@ if [ -d ~/sbpl ] ; then
fi
cd ~
rm -rf ~/sbpl
echo "SBPL removed."
fi

# uninstall decision making
if [ -d ~/decision_ws ] ; then
rm -rf ~/decision_ws
echo "ROS decision making uninstalled."
fi

if [ -d ~/octomap ] ; then
rm -rf ~/octomap
echo "Octomap uninstalled."
fi

if [ -d ~/octomap_msgs ] ; then
rm -rf ~/octomap_msgs
echo "Octomap messages uninstalled."
fi

if [ -d ~/octomap_ros ] ; then
rm -rf ~/octomap_ros
echo "Octomap ROS uninstalled."
fi

if [ -d ~/pcl_ros_packages ] ; then
rm -rf ~/pcl_ros_packages
echo "PCL ROS packages uninstalled."
fi

if [ -d ~/flycapture2-2.7.3.19-amd64 ] ; then
cd ~/flycapture2-2.7.3.19-amd64
./remove_flycapture.sh
cd ~
rm -rf ~/flycapture2-2.7.3.19-amd64
echo "Flycapture uninstalled"
fi

if [ -d ~/FFmpeg ] ; then
cd ~/FFmpeg
sudo make uninstall
cd ~
rm -rf ~/FFmpeg
echo "Old ffmpeg uninstalled."
fi

echo "All components uninstalled"
@@ -0,0 +1,74 @@
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#include <iostream>
#include <fstream>
#include <stdio.h>
#include <stdlib.h>
#include <float.h>
#include <math.h>


#include <ros/ros.h>
#include <perception_common/MultisenseImage.h>
#include <perception_common/global.h>
#include <image_transport/image_transport.h>
#include <cv_bridge/cv_bridge.h>
#include <sensor_msgs/Image.h>
#include <unistd.h>
#include <sensor_msgs/image_encodings.h>




using namespace cv;
using namespace std;

#define CMV_MAX_BUF 1024
#define MAX_POL_LENGTH 64
#define M_PI 3.14159265358979323846

struct ocam_model
{
double pol[MAX_POL_LENGTH]; // the polynomial coefficients: pol[0] + x"pol[1] + x^2*pol[2] + ... + x^(N-1)*pol[N-1]
int length_pol; // length of polynomial
double invpol[MAX_POL_LENGTH]; // the coefficients of the inverse polynomial
int length_invpol; // length of inverse polynomial
double xc; // row coordinate of the center
double yc; // column coordinate of the center
double c; // affine parameter
double d; // affine parameter
double e; // affine parameter
int width; // image width
int height; // image height
};

class fisheye{
public:
int sf;
int num;
double *array;
CvMat* mapx_persp1;
CvMat* mapx_persp2;
CvMat* mapy_persp1;
CvMat* mapy_persp2;
Mat src1,src2 ;
Mat dst_persp1, dst_persp2 ;
cv::Mat mapx_persp_left;
cv::Mat mapy_persp_left;
cv::Mat mapx_persp_right;
cv::Mat mapy_persp_right;

int get_ocam_model(struct ocam_model *myocam_model, char *filename);
void world2cam(double point2D[2], double point3D[3], struct ocam_model *myocam_model);
void cam2world(double point3D[3], double point2D[2], struct ocam_model *myocam_model);
void create_perspecive_undistortion_LUT( CvMat *mapx, CvMat *mapy, struct ocam_model *ocam_model, float sf);
static void onTrackbar1(int, void*);
static void onTrackbar2(int, void*);
void rotate_image_90n(cv::Mat &src, cv::Mat &dst, int angle);
void writeFile();


fisheye(){
sf = 10;
}
};
@@ -0,0 +1,30 @@
121,132c121,132
< add_executable(tao_parser_test
< src/TAOParserTest.cpp
< src/TAOConstructor.cpp
< src/Parsers_TAO.cpp
< src/BTConstructor.cpp
< src/Constructors.cpp
< src/FSMConstructor.cpp
< src/Parsers_BT.cpp
< src/Parsers_FSM.cpp
< src/BTConstructor_for_Dot.cpp
< src/FSMConstructor_for_Dot.cpp
< )
---
> #add_executable(tao_parser_test
> # src/TAOParserTest.cpp
> # src/TAOConstructor.cpp
> # src/Parsers_TAO.cpp
> # src/BTConstructor.cpp
> # src/Constructors.cpp
> # src/FSMConstructor.cpp
> # src/Parsers_BT.cpp
> # src/Parsers_FSM.cpp
> # src/BTConstructor_for_Dot.cpp
> # src/FSMConstructor_for_Dot.cpp
> #)
168c168
< install(TARGETS tao_parser_test decision_making_parser
---
> install(TARGETS decision_making_parser
@@ -8,6 +8,10 @@ fi
#isudo apt-get install libvtk6-dev
sudo apt-get install libvtk5.8 libvtk5.8-qt4 libvtk5-dev libvtk5-qt4-dev -y

# install libx264-120
cd ~/Downloads
wget -N http://security.ubuntu.com/ubuntu/pool/universe/x/x264/libx264-120_0.120.2151+gita3f4407-2_amd64.deb
sudo dpkg -i libx264-120_0.120.2151+gita3f4407-2_amd64.deb

source ~/.bashrc

@@ -84,7 +88,7 @@ if [ ! -d /opt/ros/hydro/share/libg2o ] ; then
fi

# install wrecs-perception deps
sudo apt-get install libeigen3-dev libsuitepasrse-dev freeglut3-dev libglew-dev libboost-all-dev gnuplot
sudo apt-get install libeigen3-dev libsuitepasrse-dev freeglut3-dev libglew-dev gnuplot

. ~/.bashrc
cd ~/drc_workspace/src
@@ -93,7 +97,8 @@ wstool set drc git@github.com:WPI-Humanoid-Research-Lab/drc.git --git -y
# Install dependencies
wstool set camera_info_manager_py git@github.com:ros-perception/camera_info_manager_py.git --git -y
wstool set qt_build git@github.com:stonier/qt_ros.git --git -v hydro -y
wstool set perception_pcl git@github.com:ros-perception/perception_pcl.git --git -v hydro-devel -y
#wstool set perception_pcl git@github.com:ros-perception/perception_pcl.git --git -v hydro-devel -y
#wstool set octomap_ros git@github.com:OctoMap/octomap_ros.git --git -v hydro-devel -y

# build the dependencies first
source ~/.bashrc
@@ -103,6 +108,13 @@ wstool update

sudo dpkg -i ~/drc_workspace/src/drc/sentis_tof_m100_pkg/m100api-1.0.0-Linux-amd64.deb

# make decision_making_parser look for libboost-system

# apply patches
patch ~/drc_workspace/src/drc/decision_making/decision_making_parser/CMakeLists.txt < ${SCRIPT_DIR}/workspace/patch/decision_making_parser/CMakeLists.txt.patch

cd ~/drc_workspace
catkin_make -j1 -Dmultisense_ros_DIR="/home/$USER/multisense_ws/devel/share/multisense_ros/cmake/" -Dmultisense_lib_DIR="/home/$USER/multisense_ws/devel/share/multisense_lib/cmake/" -DOpenRAVE_DIR="/home/$USER/openrave/build/"
source ~/.bashrc
#catkin_make -j1 -Dmultisense_ros_DIR="/home/$USER/multisense_ws/devel/share/multisense_ros/cmake" -Dmultisense_lib_DIR="/home/$USER/multisense_ws/devel/share/multisense_lib/cmake" -DOpenRAVE_DIR="/home/$USER/openrave/build/" -Ddecision_making_parser_DIR="/home/$USER/decision_ws/devel/share/decision_making_parser/cmake/" -Doctomap_DIR="/home/$USER/octomap/build/octomap/InstallFiles" -Doctomap_msgs_DIR="/home/$USER/octomap_msgs/devel/share/octomap_msgs/cmake" -Dpcl_conversions_DIR="/home/$USER/pcl_ros_packages/devel/share/pcl_conversions/cmake" -Dpcl_msgs_DIR="/home/$USER/pcl_ros_packages/src/pcl_msgs/cmake" -Dpcl_ros_DIR="/home/$USER/pcl_ros_packages/devel/share/pcl_ros/cmake" -DCMAKE_C_COMPILER="/home/$USER/gcc_ws/install/bin/rosgcc" -DCMAKE_CXX_COMPILER="/home/$USER/gcc_ws/install/bin/rosg++" -DCMAKE_INCLUDE_PATH="/home/$USER/gcc_ws/install/include" -DCMAKE_LIBRARY_PATH="/home/$USER/gcc_ws/install/lib:/home/$USER/gcc_ws/install/lib64"
catkin_make -j1 -Dmultisense_ros_DIR="/home/$USER/multisense_ws/devel/share/multisense_ros/cmake" -Dmultisense_lib_DIR="/home/$USER/multisense_ws/devel/share/multisense_lib/cmake" -DOpenRAVE_DIR="/home/$USER/openrave/build/" -Ddecision_making_parser_DIR="/home/$USER/decision_ws/devel/share/decision_making_parser/cmake/" -Doctomap_DIR="/home/$USER/octomap/build/octomap/InstallFiles" -Doctomap_msgs_DIR="/home/$USER/octomap_msgs/devel/share/octomap_msgs/cmake" -Dpcl_conversions_DIR="/home/$USER/pcl_ros_packages/devel/share/pcl_conversions/cmake" -Dpcl_msgs_DIR="/home/$USER/pcl_ros_packages/src/pcl_msgs/cmake" -Dpcl_ros_DIR="/home/$USER/pcl_ros_packages/devel/share/pcl_ros/cmake"
source ~/.bashrc