forked from moveit/moveit2
-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathosx-compile-moveit2.sh
38 lines (31 loc) · 1.34 KB
/
osx-compile-moveit2.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
#!/bin/bash
#set -x #Debug
set -e #exit on failure
export dir=$(PWD)
cd /tmp
source /tmp/ros2-osx/setup.bash
mkdir -p /tmp/ros2_ws/src
cp -r $dir /tmp/ros2_ws/src/moveit2
cd /tmp/ros2_ws && wget https://raw.githubusercontent.com/AcutronicRobotics/moveit2/master/moveit2.repos
vcs import src < moveit2.repos
rm -rf src/moveit_msgs src/octomap_msgs src/object_recognition_msgs
export OPENSSL_ROOT_DIR="/usr/local/opt/openssl"
#Ignore packages
touch src/image_common/camera_calibration_parsers/COLCON_IGNORE
touch src/image_common/camera_info_manager/COLCON_IGNORE
# Install console_bridge from sources (note that console_bridge_vendor is just a shim)
cd /tmp/
git clone https://github.com/ros/console_bridge
cd console_bridge/
cmake .
make
make install
# Dependencies
brew install ompl
# Environmental variables
export CMAKE_PREFIX_PATH=$CMAKE_PREFIX_PATH:/usr/local/opt/qt
export PATH=$PATH:/usr/local/opt/qt/bin
export LIBRARY_PATH="/usr/local/opt/tinyxml2/lib/:/usr/local/lib/:/usr/local/Cellar/assimp/4.1.0/lib/"
# Build
cd /tmp/ros2_ws
colcon build --merge-install --cmake-args -DOpenMP_C_LIB_NAMES="omp" -DOpenMP_CXX_LIB_NAMES="omp" -DOpenMP_C_FLAGS="-Xpreprocessor -fopenmp -lomp -I/usr/local/opt/libomp/include" -DOpenMP_CXX_FLAGS="-Xpreprocessor -fopenmp -lomp -I/usr/local/opt/libomp/include" -DOpenMP_omp_LIBRARY="/usr/local/opt/libomp/lib/libomp.dylib"