-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathbuild_ros.sh
executable file
·58 lines (49 loc) · 1.92 KB
/
build_ros.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
#!/bin/bash
#
# Copyright (c) Contributors to the Open 3D Engine Project.
# For complete copyright and license terms please see the LICENSE at the root of this distribution.
#
# SPDX-License-Identifier: Apache-2.0 OR MIT
#
# Initialize ROS
. /opt/ros/${ROS_DISTRO}/setup.sh
############################################################### \
# Clone and register the ROSCon2023Demo \
###############################################################
echo "Cloning the ROSCon2023Demo project"
git clone --single-branch -b $ROSCON_DEMO_BRANCH $ROSCON_DEMO_REPO $ROSCON_DEMO_ROOT && \
git -C $ROSCON_DEMO_ROOT lfs install && \
git -C $ROSCON_DEMO_ROOT lfs pull && \
git -C $ROSCON_DEMO_ROOT reset --hard $ROSCON_DEMO_COMMIT
if [ $? -ne 0 ]
then
echo "Error cloning ROSCon2023Demo project $ROSCON_DEMO_REPO"
exit 1
fi
###############################################################################
# Track the git commits from all the repos
###############################################################################
echo -e "\n\
Repository | Commit | Branch\n\
----------------------------------+-----------------------------------------\n\
ROSCon2023Demo Project | $(git -C $ROSCON_DEMO_ROOT rev-parse --short HEAD) | $ROSCON_DEMO_BRANCH\n\
\n\
" >> $WORKSPACE/git_commit.txt
###############################################################
# Build and install the additional ROS 2 packages and drivers
###############################################################
pushd $ROSCON_DEMO_ROOT/ros2_ws && \
./setup_submodules.bash && \
rosdep update && \
rosdep install --ignore-src --from-paths src/Universal_Robots_ROS2_Driver -y && \
colcon build --symlink-install && \
. ./install/setup.sh && \
popd
if [ $? -ne 0 ]
then
echo "Error building and installing additional ROS 2 packages and drivers"
exit 1
fi
# Cleanup
rm -rf $ROSCON_DEMO_ROOT/Project
exit 0