Skip to content

Commit

Permalink
update the dependencies install
Browse files Browse the repository at this point in the history
  • Loading branch information
YaominJun committed Nov 10, 2020
1 parent 00755b4 commit 6bb369b
Show file tree
Hide file tree
Showing 14 changed files with 432 additions and 88 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
## Folders and custom rules
copy
Binary file added Osqp.zip
Binary file not shown.
202 changes: 175 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
@@ -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:<br />
Report an error:</br>
<table><tr><td bgcolor=MintCream>
Could not find a package configuration file provided by "grid_map_core" with any of the following names:<br />
grid_map_coreConfig.cmake<br />
grid_map_core-config.cmake
</td></tr></table>

解决办法:<br />
安装:<br />
``sudo apt-get update``

Solution:<br />
``sudo apt-get update``</br>
``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:</br>
<table><tr><td bgcolor=MintCream>
fatal error: ceres/ceres.h: 没有那个文件或目录
</td></tr></table>

解决办法:</br>
``bash ./installers_plan/install_ceres.sh``
Solution:</br>
``bash install_ceres.sh``

### 3)IPOPT求解器
### 3)IPOPT solver
Report an error:</br>
<table><tr><td bgcolor=MintCream>
A required package was not found
Call Stack (most recent call first):</br>
/usr/share/cmake-3.5/Modules/FindPkgConfig.cmake:532 (_pkg_check_modules_internal)
cmake/FindIPOPT.cmake:3 (pkg_check_modules)</br>
CMakeLists.txt:24 (find_package)
</td></tr></table>

解决办法:</br>
先安装cppad:</br>
``bash ./installers_plan/install_cppad.sh``</br>
再安装ipopt:</br>
Solution: </br>
Install cppad first:</br>
``bash install_cppad.sh``</br>
Then install ipopt:</br>
``bash ./ipopt_install/install_ipopt.bash``</br>

如果编译执行时遇到:</br>
/user/bin/ld: 找不到 -lgfortran </br>
if there occurs some error when test the example:</br>
<table><tr><td bgcolor=MintCream>
/usr/bin/ld: 找不到 -lgfortran </br>
</td></tr></table>

then:</br>
Solution:</br>
``
open terminal -> locate gfortran.so -> sudo cp [the folder that includes gfortran.so]/gfortran.so /user/local/lib``</br>

Reason: </br>
The default search dependency library path of the system is: /usr/local/lib. </br>
Reference:[]()[the reason Couldn't find the so link](https://blog.csdn.net/weixin_43723326/article/details/103427351) ;</br>
[]()[Couldn't find the so link](https://www.cnblogs.com/feifanrensheng/p/10039959.html) </br>

解决办法:</br>
打开终端 -> locate gfortran.so -> sudo cp 含有gfortran.so的目录/该文件gfortran.so /user/local/lib</br>
原因:</br>
参考[]()[找不到软链接原因](https://blog.csdn.net/weixin_43723326/article/details/103427351)
[]()[找不到软链接](https://www.cnblogs.com/feifanrensheng/p/10039959.html) </br>
系统的默认搜索依赖库路径为,/usr/local/lib。

### 4)benchmark
<table><tr><td bgcolor=MintCream>
Could not find a package configuration file provided by "benchmark" with
any of the following names:</br>
benchmarkConfig.cmake</br>
benchmark-config.cmake
</td></tr></table>

解决办法:</br>
``bash ./installers_plan/install_googlebenchmark.sh``
Solution:</br>
``bash install_googlebenchmark.sh``

### 5)rosparam handler
<table><tr><td bgcolor=MintCream>
Could not find a package configuration file provided by "rosparam_handler"
with any of the following names:</br>
rosparam_handlerConfig.cmake</br>
rosparam_handler-config.cmake
</td></tr></table>

Solution:</br>
``sudo apt-get install ros-kinetic-rosparam-handler``

### 6)OsqpEigen
<table><tr><td bgcolor=MintCream>
Could not find a package configuration file provided by "OsqpEigen" with
any of the following names:</br>
OsqpEigenConfig.cmake </br>
osqpeigen-config.cmake </br>
</td></tr></table>

Solution:
``bash install_osqp.sh``

### 7)autoreconf
<table><tr><td bgcolor=MintCream>
autoreconf: not found
</td></tr></table>

Solution:</br>
``sudo apt-get install autoconf automake libtool``


### 8)NLOPT solver
<table><tr><td bgcolor=MintCream>
/usr/share/cmake-3.5/Modules/FindPkgConfig.cmake:532 (_pkg_check_modules_internal)</br>
cmake/FindNLOPT.cmake:11 (pkg_check_modules)</br>
CMakeLists.txt:31 (find_package)
</td></tr></table>

Solution:
``bash ./installers_plan/install_install_nlopt.sh``

### 9)qt_build
<table><tr><td bgcolor=MintCream>
Could not find a package configuration file provided by "qt_build" with any
of the following names:</br>
qt_buildConfig.cmake</br>
qt_build-config.cmake
</td></tr></table>

Solution:</br>
``sudo apt-get install ros-kinetic-qt-build``

### 10)rviz_visual_tools
<table><tr><td bgcolor=MintCream>
Could not find a package configuration file provided by "rviz_visual_tools"
with any of the following names:</br>
rviz_visual_toolsConfig.cmake </br>
rviz_visual_tools-config.cmake </br>
</td></tr></table>

Solution:
``sudo apt-get install ros-kinetic-rviz-visual-tools ``

### 11)OpenCV2.4 version
<table><tr><td bgcolor=MintCream>
Could not find a configuration file for package "OpenCV" that is compatible
with requested version "2.4".
</td></tr></table>

Solution:</br>
``bash install_opencv2_4.sh``

if there occurs the problem that the configuration incomplete:</br>
<table><tr><td bgcolor=MintCream>
CMake Error at cmake/OpenCVDetectCXXCompiler.cmake:85 (list)
</td></tr></table>
or complied failed: </br>
<table><tr><td bgcolor=MintCream>
/usr/include/c++/7/cstdlib:75:15: fatal error: stdlib.h: 没有那个文件或目录 </br>
</td></tr></table>

then:</br>
``bash install_opencv2_4gcc6``

Reason: </br>
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:</br>
``pkg-config --modversion opencv``

### 12)FCL
<table><tr><td bgcolor=MintCream>
A required package was not found
Call Stack (most recent call first):</br>
/usr/share/cmake-3.5/Modules/FindPkgConfig.cmake:532 (_pkg_check_modules_internal)</br>
cmake/FindFCL.cmake:12 (pkg_check_modules)</br>
CMakeLists.txt:42 (FIND_PACKAGE)
</td></tr></table>

Solution:</br>
``bash install_libccd_fcl``

### 13)grid_map_sdf
<table><tr><td bgcolor=MintCream>
Could not find a package configuration file provided by "grid_map_sdf" with
any of the following names:</br>
grid_map_sdfConfig.cmake</br>
grid_map_sdf-config.cmake</br>
</td></tr></table>

Solution:</br>
``sudo apt-get install ros-kinetic-grid-map-sdf``

### 14)Protobuf
<table><tr><td bgcolor=MintCream>
A required package was not found
Call Stack (most recent call first):</br>
/usr/share/cmake-3.5/Modules/FindPkgConfig.cmake:532 (_pkg_check_modules_internal)</br>
cmake/FindProtobuf.cmake:209 (pkg_check_modules)</br>
CMakeLists.txt:43 (find_package)
</td></tr></table>

Solution:</br>
[**Wait a minute, there's still some problem, I'll download a right version soon**]</br>
``bash install_googleProtobuf.sh`` </br>

[]()[reference for install](https://github.com/protocolbuffers/protobuf/blob/master/src/README.md);</br>
[]()[reference about protobuf](https://github.com/protocolbuffers/protobuf)


### 15)tf2_sensor_msgs
<table><tr><td bgcolor=MintCream>
fatal error: tf2_sensor_msgs/tf2_sensor_msgs.h: 没有那个文件或目录</br>
</td></tr></table>

Solution:</br>
``sudo apt-get install ros-kinetic-tf2-sensor-msgs``

解决办法:</br>
``bash ./installers_plan/install_rosparem_handler.sh``
小细节:
丢失了哪个包,可以去网上搜,如果是ROS_Wiki就有的,可以直接:
`sudo apt-get install ros-kinetic-pkgName` 尝试安装!!!
Binary file added benchmark.zip
Binary file not shown.
44 changes: 44 additions & 0 deletions install_googleProtobuf.sh
Original file line number Diff line number Diff line change
@@ -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
28 changes: 10 additions & 18 deletions install_googlebenchmark.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down
49 changes: 49 additions & 0 deletions install_libccd_fcl.sh
Original file line number Diff line number Diff line change
@@ -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
Loading

0 comments on commit 6bb369b

Please sign in to comment.