-
Notifications
You must be signed in to change notification settings - Fork 198
/
Copy pathe_build.bash
executable file
·44 lines (37 loc) · 1.97 KB
/
e_build.bash
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
#!/usr/bin/env bash
catkin_ws_path=${1:-"$HOME/catkin_ws_drl"}
number_of_cpu_threads_for_compilation=${2:-2}
use_catkin_tools=${3:-true}
ros_version=${4:-"$(rosversion -d)"}
catkin_ws_path_to_extend=${5:-"/opt/ros/$ros_version"}
echo -e "\n\n"
echo "####################################################################################################"
echo "##### Building catkin workspace"
echo "####################################################################################################"
cd "${catkin_ws_path}"
source "${catkin_ws_path_to_extend}/setup.bash"
if [ $use_catkin_tools = true ]; then
devel_file="${catkin_ws_path}/devel_release/setup.bash"
ws_overlay_url="https://catkin-tools.readthedocs.io/en/latest/mechanics.html#workspace-chaining-extending"
catkin build pcl -s -j${number_of_cpu_threads_for_compilation}
source ${devel_file}
catkin build -s -j${number_of_cpu_threads_for_compilation}
else
ws_overlay_url="http://wiki.ros.org/catkin/Tutorials/workspace_overlaying"
devel_file="${catkin_ws_path}/devel_isolated/setup.bash"
catkin_make_isolated --pkg pcl --force-cmake -DCMAKE_BUILD_TYPE=Release -j${number_of_cpu_threads_for_compilation}
source ${devel_file}
catkin_make_isolated -DCMAKE_BUILD_TYPE=Release -j${number_of_cpu_threads_for_compilation}
fi
source ${devel_file}
rospack profile
echo -e "\n\nsource ${devel_file}\n\n" >> ~/.bashrc
echo -e "\n\n"
echo "----------------------------------------------------------------------------------------------------"
echo "===== Finished building the catkin workspace"
echo "----- For using this workspace source the file ${devel_file}"
echo "----- For overlaying / extending this workspace please read the following documentation:"
echo "----- ${ws_overlay_url}"
echo "----- Thank you for using the dynamic_robot_localization package!"
echo "----- Suggestions for improvements and pull requests are always welcomed!"
echo "----------------------------------------------------------------------------------------------------"