-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sh
124 lines (111 loc) · 2.57 KB
/
build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
#!/bin/bash
set -euo pipefail
case "${1:-}" in
("prerequisites")
install package using brew
brew install automake zmq bazel boost glfw3 [email protected]
# install meshcat
pip install meshcat
# build json
cd third_party/
rm -rf json/
git clone https://github.com/nlohmann/json.git
cd json/
git checkout v3.9.1
mkdir build/
cd build/
cmake ..
make
cd ../../
# build crossguid
rm -rf crossguid/
git clone https://github.com/graeme-hill/crossguid.git
cd crossguid/
git checkout v0.2.2
mkdir build/
cd build/
cmake ..
make
cd ../../
# build rbdl
cd rbdl/
rm -rf build/
mkdir build/
cd build/
cmake ..
make
cp -r ../include/rbdl/* include/rbdl/
cp -r ../addons/urdfreader/*.h addons/urdfreader/
cd ../../
# cppzmq
rm -rf cppzmq/
git clone https://github.com/zeromq/cppzmq.git
cd cppzmq/
git checkout v4.7.1
cd ../
# physics engine
rm -rf bullet3/
git clone https://github.com/bulletphysics/bullet3.git
cd bullet3/
./build_cmake_pybullet_double.sh
cd ../
# ur5
cd urdriver/
mkdir -p build/
cd build/
cmake ../
make -j8
cd ../../
#realsense camera
rm -rf rm -rf librealsense/
git clone https://github.com/IntelRealSense/librealsense
cd librealsense/
mkdir build
cd build/
cmake ../ -DBUILD_PYTHON_BINDINGS=bool:true -DOPENSSL_ROOT_DIR='/usr/local/Cellar/[email protected]/1.1.1k/'
make -j8
SCRIPTPATH=$(dirname "$SCRIPT")
echo 'export PYTHONPATH=$PYTHONPATH:$SCRIPTPATH/wrappers/python' >> ~/.zshrc
#octomap
rm -rf rm -rf octomap/
git clone https://github.com/OctoMap/octomap.git
cd octomap/
mkdir build/
cd build/
cmake ../
make
# osqp
rm -rf osqp-cpp/
git clone https://github.com/google/osqp-cpp.git
cd osqp-cpp/
mkdir build/
cd build/
cmake ../
make
;;
("obstaclefreeregion")
bazel build //apps/obstaclefreeregion --cxxopt='-std=c++17'
;;
("armcontrol")
bazel build //apps/armcontrol --cxxopt='-std=c++17'
;;
("visualizer")
bazel build //apps/visualizer --cxxopt='-std=c++17'
;;
("planner")
bazel build //apps/planner --cxxopt='-std=c++17'
;;
("clear")
bazel clean --expunge
;;
(*)
echo "Usage: $0 <package>" 1>&2
echo "where <package> is one of the following:" 1>&2
echo " prerequisites" 1>&2
echo " obstaclefreeregion" 1>&2
echo " armcontrol" 1>&2
echo " visualizer" 1>&2
echo " clear" 1>&2
exit 1
;;
esac