|
14 | 14 | # License for the specific language governing permissions and limitations under
|
15 | 15 | # the License.
|
16 | 16 |
|
17 |
| - |
18 |
| -### |
19 |
| -# ROS 1 Build |
20 |
| -### |
21 |
| -# Source environment variables |
22 | 17 | if [[ ! -z "$ROS1_PACKAGES$ROS2_PACKAGES" ]]; then
|
23 | 18 | echo "Sourcing previous build for incremental build start point..."
|
24 | 19 | source /opt/autoware.ai/ros/install/setup.bash
|
|
30 | 25 | # Enter source directory
|
31 | 26 | cd /home/carma/autoware.ai
|
32 | 27 |
|
33 |
| -# Build with CUDA |
34 |
| -echo "ROS 1 Build with CUDA" |
35 | 28 | sudo mkdir /opt/autoware.ai # Create install directory
|
36 | 29 | sudo chown carma /opt/autoware.ai # Set owner to expose permissions for build
|
37 | 30 | sudo chgrp carma /opt/autoware.ai # Set group to expose permissions for build
|
38 | 31 |
|
39 |
| -if [[ ! -z "$ROS1_PACKAGES$ROS2_PACKAGES" ]]; then |
40 |
| - if [[ ! -z "$ROS1_PACKAGES" ]]; then |
41 |
| - echo "Incrementally building ROS1 packages: $ROS1_PACKAGES" |
42 |
| - AUTOWARE_COMPILE_WITH_CUDA=1 colcon build --build-base build_ros1 --install-base /opt/autoware.ai/ros/install --cmake-args -DCMAKE_BUILD_TYPE=Release -DCMAKE_LIBRARY_PATH=/usr/local/cuda/lib64/stubs -DCMAKE_CXX_FLAGS=-Wall -DCMAKE_C_FLAGS=-Wall --packages-above $ROS1_PACKAGES --allow-overriding $ROS1_PACKAGES |
43 |
| - else |
44 |
| - echo "Build type is incremental but no ROS1 packages specified, skipping ROS1 build..." |
45 |
| - fi |
46 |
| -else |
47 |
| - echo "Building all ROS1 Autoware.AI Components" |
48 |
| - AUTOWARE_COMPILE_WITH_CUDA=1 colcon build --build-base build_ros1 --install-base /opt/autoware.ai/ros/install --cmake-args -DCMAKE_BUILD_TYPE=Release -DCMAKE_LIBRARY_PATH=/usr/local/cuda/lib64/stubs -DCMAKE_CXX_FLAGS=-Wall -DCMAKE_C_FLAGS=-Wall |
49 |
| -fi |
50 |
| - |
51 |
| -# Get the exit code from the ROS1 build so we can skip the ROS2 build if the ROS1 build failed |
52 |
| -status=$? |
53 |
| - |
54 |
| -if [[ $status -ne 0 ]]; then |
55 |
| - echo "Autoware.ai build failed." |
56 |
| - exit $status |
57 |
| -fi |
58 |
| -echo "Build of ROS1 Autoware.AI Components Complete" |
59 |
| - |
60 |
| - |
61 |
| -### |
62 |
| -# ROS 2 Build |
63 |
| -### |
64 |
| -source /opt/ros/foxy/setup.bash |
65 |
| -if [[ ! -z "$ROS1_PACKAGES$ROS2_PACKAGES" ]]; then |
66 |
| - echo "Sourcing previous build for incremental build start point..." |
67 |
| - source /opt/autoware.ai/ros/install_ros2/setup.bash |
68 |
| -else |
69 |
| - echo "Sourcing base image for full build..." |
70 |
| - source /home/carma/catkin/setup.bash |
71 |
| -fi |
72 |
| - |
73 | 32 | echo "ROS 2 Build"
|
74 | 33 | if [[ ! -z "$ROS1_PACKAGES$ROS2_PACKAGES" ]]; then
|
75 | 34 | if [[ ! -z "$ROS2_PACKAGES" ]]; then
|
76 | 35 | echo "Incrementally building ROS2 packages: $ROS1_PACKAGES"
|
77 | 36 | # Build with CUDA compile option
|
78 |
| - AUTOWARE_COMPILE_WITH_CUDA=1 colcon build --install-base /opt/autoware.ai/ros/install_ros2 --build-base build_ros2 --cmake-args -DCMAKE_BUILD_TYPE=Release --packages-above $ROS2_PACKAGES --allow-overriding $ROS2_PACKAGES |
| 37 | + AUTOWARE_COMPILE_WITH_CUDA=1 colcon build --install-base /opt/autoware.ai/ros/install --build-base build --cmake-args -DCMAKE_BUILD_TYPE=Release --packages-above $ROS2_PACKAGES --allow-overriding $ROS2_PACKAGES --packages-ignore parking_planner parking_planner_nodes |
79 | 38 | else
|
80 | 39 | echo "Build type is incremental but no ROS2 packages specified, skipping ROS2 build..."
|
81 | 40 | fi
|
82 | 41 | else
|
83 | 42 | echo "Building all ROS2 Autoware.AI Components"
|
84 | 43 | # Build with CUDA compile option
|
85 |
| - AUTOWARE_COMPILE_WITH_CUDA=1 colcon build --install-base /opt/autoware.ai/ros/install_ros2 --build-base build_ros2 --cmake-args -DCMAKE_BUILD_TYPE=Release |
| 44 | + AUTOWARE_COMPILE_WITH_CUDA=1 colcon build --install-base /opt/autoware.ai/ros/install --build-base build --cmake-args -DCMAKE_BUILD_TYPE=Release --packages-ignore parking_planner parking_planner_nodes |
86 | 45 | fi
|
0 commit comments