diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..88ae477
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,2 @@
+## Folders and custom rules
+copy
diff --git a/Osqp.zip b/Osqp.zip
new file mode 100644
index 0000000..f6feb47
Binary files /dev/null and b/Osqp.zip differ
diff --git a/README.md b/README.md
index 6c2ee48..75278d2 100644
--- a/README.md
+++ b/README.md
@@ -1,62 +1,210 @@
# installers_plan
-the dependance install for the motion planning algorithm
+the dependencies install for the motion planning algorithm
## 1.编译
### 1)grid_map_core
-Could not find a package configuration file provided by "grid_map_core"
-with any of the following names:
+Report an error:
+
+Could not find a package configuration file provided by "grid_map_core" with any of the following names:
grid_map_coreConfig.cmake
grid_map_core-config.cmake
+ |
-解决办法:
-安装:
-``sudo apt-get update``
-
+Solution:
+``sudo apt-get update``
``sudo apt-get -y install ros-kinetic-pcl-ros ros-kinetic-costmap-2d ros-kinetic-grid-map``
-### 2)ceres求解器
+### 2)ceres solver
+Report an error:
+
fatal error: ceres/ceres.h: 没有那个文件或目录
+ |
-解决办法:
-``bash ./installers_plan/install_ceres.sh``
+Solution:
+``bash install_ceres.sh``
-### 3)IPOPT求解器
+### 3)IPOPT solver
+Report an error:
+
A required package was not found
Call Stack (most recent call first):
/usr/share/cmake-3.5/Modules/FindPkgConfig.cmake:532 (_pkg_check_modules_internal)
cmake/FindIPOPT.cmake:3 (pkg_check_modules)
CMakeLists.txt:24 (find_package)
+ |
-解决办法:
-先安装cppad:
-``bash ./installers_plan/install_cppad.sh``
-再安装ipopt:
+Solution:
+Install cppad first:
+``bash install_cppad.sh``
+Then install ipopt:
``bash ./ipopt_install/install_ipopt.bash``
-如果编译执行时遇到:
-/user/bin/ld: 找不到 -lgfortran
+if there occurs some error when test the example:
+
+/usr/bin/ld: 找不到 -lgfortran
+ |
+
+then:
+Solution:
+``
+open terminal -> locate gfortran.so -> sudo cp [the folder that includes gfortran.so]/gfortran.so /user/local/lib``
+
+Reason:
+The default search dependency library path of the system is: /usr/local/lib.
+Reference:[]()[the reason Couldn't find the so link](https://blog.csdn.net/weixin_43723326/article/details/103427351) ;
+[]()[Couldn't find the so link](https://www.cnblogs.com/feifanrensheng/p/10039959.html)
-解决办法:
-打开终端 -> locate gfortran.so -> sudo cp 含有gfortran.so的目录/该文件gfortran.so /user/local/lib
-原因:
-参考[]()[找不到软链接原因](https://blog.csdn.net/weixin_43723326/article/details/103427351) ;
-[]()[找不到软链接](https://www.cnblogs.com/feifanrensheng/p/10039959.html)
-系统的默认搜索依赖库路径为,/usr/local/lib。
### 4)benchmark
+
Could not find a package configuration file provided by "benchmark" with
any of the following names:
benchmarkConfig.cmake
benchmark-config.cmake
+ |
-解决办法:
-``bash ./installers_plan/install_googlebenchmark.sh``
+Solution:
+``bash install_googlebenchmark.sh``
### 5)rosparam handler
+
Could not find a package configuration file provided by "rosparam_handler"
with any of the following names:
rosparam_handlerConfig.cmake
rosparam_handler-config.cmake
+ |
+
+Solution:
+``sudo apt-get install ros-kinetic-rosparam-handler``
+
+### 6)OsqpEigen
+
+Could not find a package configuration file provided by "OsqpEigen" with
+ any of the following names:
+OsqpEigenConfig.cmake
+osqpeigen-config.cmake
+ |
+
+Solution:
+``bash install_osqp.sh``
+
+### 7)autoreconf
+
+
+Solution:
+``sudo apt-get install autoconf automake libtool``
+
+
+### 8)NLOPT solver
+
+/usr/share/cmake-3.5/Modules/FindPkgConfig.cmake:532 (_pkg_check_modules_internal)
+ cmake/FindNLOPT.cmake:11 (pkg_check_modules)
+ CMakeLists.txt:31 (find_package)
+ |
+
+Solution:
+``bash ./installers_plan/install_install_nlopt.sh``
+
+### 9)qt_build
+
+Could not find a package configuration file provided by "qt_build" with any
+ of the following names:
+qt_buildConfig.cmake
+qt_build-config.cmake
+ |
+
+Solution:
+``sudo apt-get install ros-kinetic-qt-build``
+
+### 10)rviz_visual_tools
+
+Could not find a package configuration file provided by "rviz_visual_tools"
+ with any of the following names:
+rviz_visual_toolsConfig.cmake
+rviz_visual_tools-config.cmake
+ |
+
+Solution:
+``sudo apt-get install ros-kinetic-rviz-visual-tools ``
+
+### 11)OpenCV2.4 version
+
+Could not find a configuration file for package "OpenCV" that is compatible
+ with requested version "2.4".
+ |
+
+Solution:
+``bash install_opencv2_4.sh``
+
+if there occurs the problem that the configuration incomplete:
+
+CMake Error at cmake/OpenCVDetectCXXCompiler.cmake:85 (list)
+ |
+or complied failed:
+
+/usr/include/c++/7/cstdlib:75:15: fatal error: stdlib.h: 没有那个文件或目录
+ |
+
+then:
+``bash install_opencv2_4gcc6``
+
+Reason:
+The version of gcc is higher than the opencv2.4.13 requires.
+Reference:[]()[CMake Error: the version of gcc is higher than the opencv2.4.13 requires](https://www.jianshu.com/p/7d117fa4924f) and []()[Make install error: the version of gcc is higher than the opencv2.4.13 requires](https://blog.csdn.net/Stackingrule/article/details/90146828)
+
+Check the version of opencv:
+``pkg-config --modversion opencv``
+
+### 12)FCL
+
+A required package was not found
+Call Stack (most recent call first):
+ /usr/share/cmake-3.5/Modules/FindPkgConfig.cmake:532 (_pkg_check_modules_internal)
+ cmake/FindFCL.cmake:12 (pkg_check_modules)
+ CMakeLists.txt:42 (FIND_PACKAGE)
+ |
+
+Solution:
+``bash install_libccd_fcl``
+
+### 13)grid_map_sdf
+
+Could not find a package configuration file provided by "grid_map_sdf" with
+ any of the following names:
+grid_map_sdfConfig.cmake
+grid_map_sdf-config.cmake
+ |
+
+Solution:
+``sudo apt-get install ros-kinetic-grid-map-sdf``
+
+### 14)Protobuf
+
+A required package was not found
+Call Stack (most recent call first):
+ /usr/share/cmake-3.5/Modules/FindPkgConfig.cmake:532 (_pkg_check_modules_internal)
+ cmake/FindProtobuf.cmake:209 (pkg_check_modules)
+ CMakeLists.txt:43 (find_package)
+ |
+
+Solution:
+[**Wait a minute, there's still some problem, I'll download a right version soon**]
+``bash install_googleProtobuf.sh``
+
+[]()[reference for install](https://github.com/protocolbuffers/protobuf/blob/master/src/README.md);
+[]()[reference about protobuf](https://github.com/protocolbuffers/protobuf)
+
+
+### 15)tf2_sensor_msgs
+
+ fatal error: tf2_sensor_msgs/tf2_sensor_msgs.h: 没有那个文件或目录
+ |
+
+ Solution:
+ ``sudo apt-get install ros-kinetic-tf2-sensor-msgs``
-解决办法:
-``bash ./installers_plan/install_rosparem_handler.sh``
+小细节:
+丢失了哪个包,可以去网上搜,如果是ROS_Wiki就有的,可以直接:
+`sudo apt-get install ros-kinetic-pkgName` 尝试安装!!!
\ No newline at end of file
diff --git a/benchmark.zip b/benchmark.zip
new file mode 100644
index 0000000..514c75d
Binary files /dev/null and b/benchmark.zip differ
diff --git a/install_googleProtobuf.sh b/install_googleProtobuf.sh
new file mode 100755
index 0000000..65c89a7
--- /dev/null
+++ b/install_googleProtobuf.sh
@@ -0,0 +1,44 @@
+#!/bin/bash
+set -e # exit on first error
+UBUNTU_VERSION=`lsb_release --release | cut -f2`
+SRC_PATH="/tmp"
+PROTOBUF_BENCHMARK_VERSION=3.13.0.1
+
+main(){
+ if [ $UBUNTU_VERSION == "16.04" ]; then
+ install_dependencies
+ install_google_protobuf
+ fi
+}
+
+install_dependencies(){
+ sudo apt-get install autoconf automake libtool curl make g++ unzip
+}
+
+install_google_protobuf() {
+ cp protobuf-3.13.0.1.tar.gz $SRC_PATH
+ cd $SRC_PATH
+ tar -xf protobuf-3.13.0.1.tar.gz
+ cd protobuf-3.13.0.1
+ #git clone https://github.com/google/googletest.git protobuf-3.13.0.1/googletest
+
+ # go into protobuf folder and prepare for build
+ cd protobuf-3.13.0.1
+ ./autogen.sh
+
+ # compile and install
+ ./configure
+ make
+ make check
+ sudo make install
+ sudo ldconfig # refresh shared library cache.
+
+ #test if it's successfully
+ #cmake -E chdir "build" ctest --build-config Release
+
+ echo "protobuf-3.13.0 has been installed successfully if there's no error"
+}
+
+
+# MAIN
+main
diff --git a/install_googlebenchmark.sh b/install_googlebenchmark.sh
index 210fa73..0f5aac3 100755
--- a/install_googlebenchmark.sh
+++ b/install_googlebenchmark.sh
@@ -2,7 +2,7 @@
set -e # exit on first error
UBUNTU_VERSION=`lsb_release --release | cut -f2`
SRC_PATH="/tmp"
-GOOGLE_BENCHMARK_VERSION=v1.5.2
+GOOGLE_BENCHMARK_VERSION=v1.5.0
main(){
if [ $UBUNTU_VERSION == "16.04" ]; then
@@ -11,27 +11,19 @@ main(){
}
install_google_benchmark() {
+ cp benchmark.zip $SRC_PATH
cd $SRC_PATH
- # clone google-benchmark if directory does not already exist, or pull
- if [ ! -d benchmark ]; then
- git clone https://github.com/google/benchmark.git
- git clone https://github.com/google/googletest.git benchmark/googletest
- else
- cd benchmark
- git checkout master
- git pull
- cd ..
- fi
-
- # go into benchmark repo and prepare for build
+ unzip benchmark.zip
+
+ # go into benchmark folder and prepare for build
cd benchmark
- git checkout tags/${GOOGLE_BENCHMARK_VERSION}
# compile and install
- cmake -E make_directory "build"
- cmake -E chdir "build" cmake -DCMAKE_BUILD_TYPE=Release ../
- cmake --build "build" --config Release
-
+ mkdir -p build
+ cd build
+ cmake ../
+ sudo make install
+
#test if it's successfully
#cmake -E chdir "build" ctest --build-config Release
diff --git a/install_libccd_fcl.sh b/install_libccd_fcl.sh
new file mode 100755
index 0000000..260abe0
--- /dev/null
+++ b/install_libccd_fcl.sh
@@ -0,0 +1,49 @@
+#!/bin/bash
+set -e # exit on first error
+DIR=/tmp
+
+main() {
+ install_apt_pkgs
+ install_libccd
+ sudo ldconfig # load the installd library
+ install_fcl
+}
+
+
+install_apt_pkgs() {
+ sudo apt-get update
+ sudo apt-get -y install liboctomap-dev cmake build-essential gcc g++ libboost-all-dev libeigen3-dev
+}
+
+install_libccd() {
+ if (ldconfig -p | grep libccd); then
+ echo "libccd has been installed."
+ else
+ echo "Install libccd......"
+ cd $DIR && rm -rf libccd
+ git clone --branch v2.0 https://github.com/danfis/libccd.git
+ cd libccd
+ mkdir -p build && cd build
+ cmake -G "Unix Makefiles" -DBUILD_SHARED_LIBS=ON -DENABLE_DOUBLE_PRECISION=ON .. > /dev/null
+ make && sudo make install
+ echo "libccd is installed succesfully."
+ fi
+}
+
+install_fcl() {
+ if (ldconfig -p | grep libfcl); then
+ echo "fcl has been installed."
+ else
+ echo "Install fcl......."
+ cd $DIR && rm -rf fcl
+ git clone --depth 1 --branch 0.5.0 https://github.com/flexible-collision-library/fcl.git
+ cd fcl
+ mkdir -p build && cd build
+ cmake ..
+ make -j4
+ sudo -E make install
+ echo "fcl is installed successfully."
+ fi
+}
+
+main
diff --git a/install_nlopt.sh b/install_nlopt.sh
new file mode 100755
index 0000000..a82a3f9
--- /dev/null
+++ b/install_nlopt.sh
@@ -0,0 +1,28 @@
+#!/bin/bash
+
+set -e # exit on first error
+
+main() {
+ install_apt_pkgs
+ install_nlopt
+}
+
+
+install_apt_pkgs() {
+ #sudo apt-get update
+ sudo apt-get -y install cmake g++
+}
+
+install_nlopt()
+{
+
+ echo "Prepare to install NLopt ..."
+ cd /tmp && rm -rf nlopt*
+ git clone --depth 1 --branch v2.5.0 https://github.com/stevengj/nlopt.git
+ cd nlopt && mkdir -p build && cd build
+ cmake -DWITH_CXX="ON" ..
+ make -j$(nproc)
+ sudo make install
+}
+
+main
diff --git a/install_opencv2_4.sh b/install_opencv2_4.sh
new file mode 100755
index 0000000..ae03b85
--- /dev/null
+++ b/install_opencv2_4.sh
@@ -0,0 +1,39 @@
+#!/bin/bash
+set -e # exit on first error
+UBUNTU_VERSION=`lsb_release --release | cut -f2`
+SRC_PATH="/tmp"
+OPENCV_BENCHMARK_VERSION=v2.4.13
+
+main(){
+ if [ $UBUNTU_VERSION == "16.04" ]; then
+ install_opencv_2_4
+ fi
+}
+
+install_opencv_2_4() {
+ cp opencv-2.4.13.tar.gz $SRC_PATH
+ cd $SRC_PATH
+ if [! -d opencv-2.4.13]; then
+ tar -xf opencv-2.4.13.tar.gz
+ else
+ sudo rm -r opencv-2.4.13
+ tar -xf opencv-2.4.13.tar.gz
+
+ # go into opencv-2.4.13 folder and prepare for build
+ cd opencv-2.4.13
+
+ # compile and install
+ mkdir build
+ cd build
+ cmake -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=/usr/local ..
+ sudo make install
+
+ #test if it's successfully
+ #cmake -E chdir "build" ctest --build-config Release
+
+ echo "opencv-2.4.13 has been installed successfully if there's no error"
+}
+
+
+# MAIN
+main
diff --git a/install_opencv2_4gcc6.sh b/install_opencv2_4gcc6.sh
new file mode 100755
index 0000000..d36abc5
--- /dev/null
+++ b/install_opencv2_4gcc6.sh
@@ -0,0 +1,39 @@
+#!/bin/bash
+set -e # exit on first error
+UBUNTU_VERSION=`lsb_release --release | cut -f2`
+SRC_PATH="/tmp"
+OPENCV_BENCHMARK_VERSION=v2.4.13
+
+main(){
+ if [ $UBUNTU_VERSION == "16.04" ]; then
+ install_opencv_2_4
+ fi
+}
+
+install_opencv_2_4() {
+ cp opencv-2.4.13-gcc6.tar.gz $SRC_PATH
+ cd $SRC_PATH
+ if [! -d opencv-2.4.13]; then
+ tar -xf opencv-2.4.13-gcc6.tar.gz
+ else
+ sudo rm -r opencv-2.4.13
+ tar -xf opencv-2.4.13-gcc6.tar.gz
+
+ # go into opencv-2.4.13 folder and prepare for build
+ cd opencv-2.4.13
+
+ # compile and install
+ mkdir build
+ cd build
+ cmake -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=/usr/local .. -DENABLE_PRECOMPILED_HEADERS=OFF
+ sudo make install
+
+ #test if it's successfully
+ #cmake -E chdir "build" ctest --build-config Release
+
+ echo "opencv-2.4.13 has been installed successfully if there's no error"
+}
+
+
+# MAIN
+main
diff --git a/install_osqp.sh b/install_osqp.sh
new file mode 100755
index 0000000..d70f08e
--- /dev/null
+++ b/install_osqp.sh
@@ -0,0 +1,46 @@
+#!/bin/bash
+set -e # exit on first error
+UBUNTU_VERSION=`lsb_release --release | cut -f2`
+SRC_PATH="/tmp"
+
+main(){
+ if [ $UBUNTU_VERSION == "16.04" ]; then
+ install_osqp
+ install_osqp_eigen
+ fi
+}
+
+install_osqp() {
+ cp Osqp.zip $SRC_PATH
+ cd $SRC_PATH
+ unzip Osqp.zip
+
+ # go into Osqp folder and prepare for build
+ cd $SRC_PATH
+ cd Osqp/osqp
+
+ # compile and install
+ mkdir -p build
+ cd build
+ cmake ../
+ sudo make install
+
+ echo "Osqp has been installed successfully if there's no error"
+}
+
+install_osqp_eigen() {
+ cd $SRC_PATH
+ cd Osqp/osqp-eigen
+
+ # compile and install
+ mkdir -p build
+ cd build
+ cmake ../
+ sudo make install
+
+ echo "osqp_eigen has been installed successfully if there's no error"
+}
+
+
+# MAIN
+main
diff --git a/install_rosparem_handler.sh b/install_rosparem_handler.sh
deleted file mode 100755
index 72e405f..0000000
--- a/install_rosparem_handler.sh
+++ /dev/null
@@ -1,43 +0,0 @@
-#!/bin/bash
-set -e # exit on first error
-UBUNTU_VERSION=`lsb_release --release | cut -f2`
-SRC_PATH="../ivrc_ws/src/"
-PARAMHANDLER_VERSION=0.1.3
-
-main(){
- if [ $UBUNTU_VERSION == "16.04" ]; then
- install_rosparam_handler
- fi
-}
-
-install_rosparam_handler() {
- cd $SRC_PATH
- # clone ceres-solver if directory does not already exist, or pull
- if [ ! -d rosparam_handler ]; then
- git clone https://github.com/cbandera/rosparam_handler.git
- else
- cd rosparam_handler
- git checkout master
- git pull
- cd ..
- fi
-
- # go into ceres-solver repo and prepare for build
- cd rosparam_handler/
- git checkout master
- git checkout tags/${PARAMHANDLER_VERSION}
- mkdir -p build
- cd build
-
- cmake -DBUILD_SHARED_LIBS=ON ..
-
-
- # compile and install
- make -j$(nproc) 2>&1 | grep ...
- sudo make install
-
-}
-
-
-# MAIN
-main
diff --git a/opencv-2.4.13-gcc6.tar.gz b/opencv-2.4.13-gcc6.tar.gz
new file mode 100644
index 0000000..6b225c0
Binary files /dev/null and b/opencv-2.4.13-gcc6.tar.gz differ
diff --git a/opencv-2.4.13.tar.gz b/opencv-2.4.13.tar.gz
new file mode 100755
index 0000000..2d0d155
Binary files /dev/null and b/opencv-2.4.13.tar.gz differ