forked from autowarefoundation/autoware
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use colcon as the build tool (autowarefoundation#1704)
* Switch to colcon as the build tool instead of catkin * Added cmake-target * Added note about the second colcon call * Added warning about catkin* scripts being deprecated * Fix COLCON_OPTS * Added install targets * Update Docker image tags * Message packages fixes * Fix missing dependency
- Loading branch information
Showing
119 changed files
with
810 additions
and
252 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
|
||
if [[ -d build ]]; then | ||
rm -rf build | ||
fi | ||
|
||
if [[ -d install ]]; then | ||
rm -rf install | ||
fi | ||
|
||
COLCON_OPTS="--cmake-args -DCMAKE_BUILD_TYPE=Release -DCMAKE_LIBRARY_PATH=/usr/local/cuda/lib64/stubs" | ||
|
||
export LIBRARY_PATH=/usr/lib/OpenNI2/Drivers:$LIBRARY_PATH | ||
colcon build $COLCON_OPTS $@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
|
||
if [ "$1" = "synquacer" ] || [ "$1" = "driveworks" ] || [ "$1" = "generic-aarch64" ] | ||
then | ||
AUTOWARE_TARGET_ARCH=aarch64 | ||
AUTOWARE_TARGET_PLATFORM=$1 | ||
shift | ||
|
||
if [[ -d build-${AUTOWARE_TARGET_PLATFORM} ]]; then | ||
rm -rf build-${AUTOWARE_TARGET_PLATFORM} | ||
fi | ||
|
||
if [[ -d install-${AUTOWARE_TARGET_PLATFORM} ]]; then | ||
rm -rf install-${AUTOWARE_TARGET_PLATFORM} | ||
fi | ||
|
||
AUTOWARE_HOME=/home/autoware/Autoware | ||
if [ "$AUTOWARE_TARGET_PLATFORM" = "driveworks" ] | ||
then | ||
if [[ -z "${DRIVEWORKS_TOOLKIT_ROOT_DIR}" ]] || [[ -z "${CUDA_TOOLKIT_ROOT_DIR}" ]] || [[ -z "${NVIDIA_TENSORRT_ROOT_DIR}" ]] || [[ -z "${DRIVE_T186REF_LINUX_ROOT_DIR}" ]] | ||
then | ||
echo "Please ensure that the following environment variables are set and point to their respective correct locations: DRIVEWORKS_TOOLKIT_ROOT_DIR CUDA_TOOLKIT_ROOT_DIR NVIDIA_TENSORRT_ROOT_DIR DRIVE_T186REF_LINUX_ROOT_DIR" | ||
exit 1 | ||
fi | ||
AUTOWARE_HOME=/home/nvidia/Autoware | ||
AUTOWARE_TOOLCHAIN_FILE=cross_toolchain_driveworks.cmake | ||
AUTOWARE_DOCKER_EXTRA_ARGS=$(cat <<-END | ||
-v ${DRIVEWORKS_TOOLKIT_ROOT_DIR}:/usr/local/driveworks:ro | ||
-v ${CUDA_TOOLKIT_ROOT_DIR}:/usr/local/cuda:ro | ||
-v ${NVIDIA_TENSORRT_ROOT_DIR}:/usr/local/tensorrt:ro | ||
-v ${DRIVE_T186REF_LINUX_ROOT_DIR}:/usr/local/drive-t186ref-linux:ro | ||
-e DRIVEWORKS_TOOLKIT_ROOT_DIR=/usr/local/driveworks | ||
-e CUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda | ||
-e NVIDIA_TENSORRT_ROOT_DIR=/usr/local/tensorrt | ||
-e DRIVE_T186REF_LINUX_ROOT_DIR=/usr/local/drive-t186ref-linux | ||
END | ||
) | ||
AUTOWARE_CUDA_ARCH=sm_61 | ||
else | ||
AUTOWARE_TOOLCHAIN_FILE=cross_toolchain.cmake | ||
fi | ||
if [ ! -f "${PWD}/${AUTOWARE_TOOLCHAIN_FILE}" ]; then | ||
echo "Toolchain file: '${PWD}/${AUTOWARE_TOOLCHAIN_FILE}' not found" | ||
exit 1 | ||
fi | ||
|
||
AUTOWARE_BUILD_PATH=${AUTOWARE_HOME}/ros/build-${AUTOWARE_TARGET_PLATFORM} | ||
AUTOWARE_INSTALL_PATH=${AUTOWARE_HOME}/ros/install-${AUTOWARE_TARGET_PLATFORM} | ||
|
||
AUTOWARE_TOOLCHAIN_FILE_PATH="${AUTOWARE_HOME}/ros/${AUTOWARE_TOOLCHAIN_FILE}" | ||
echo "Using toolchain file: '${AUTOWARE_TOOLCHAIN_FILE_PATH}''" | ||
AUTOWARE_SYSROOT=/sysroot/${AUTOWARE_TARGET_PLATFORM} | ||
|
||
AUTOWARE_DOCKER_DATE=20190102 | ||
|
||
docker container run \ | ||
-it \ | ||
--rm \ | ||
${AUTOWARE_DOCKER_EXTRA_ARGS} \ | ||
-e AUTOWARE_SYSROOT=${AUTOWARE_SYSROOT} \ | ||
-v ${PWD}/../:${AUTOWARE_HOME} \ | ||
-w ${AUTOWARE_HOME}/ros \ | ||
-u ${UID}:${UID} \ | ||
autoware/build:${AUTOWARE_TARGET_PLATFORM}-kinetic-${AUTOWARE_DOCKER_DATE} \ | ||
bash \ | ||
-c "\ | ||
source ${AUTOWARE_SYSROOT}/opt/ros/kinetic/setup.bash && \ | ||
colcon build \ | ||
--merge-install \ | ||
--build-base ${AUTOWARE_BUILD_PATH} \ | ||
--install-base ${AUTOWARE_INSTALL_PATH} \ | ||
--cmake-args \ | ||
-DCUDA_ARCH=${AUTOWARE_CUDA_ARCH} \ | ||
-DCMAKE_TOOLCHAIN_FILE=${AUTOWARE_TOOLCHAIN_FILE_PATH} \ | ||
-DCMAKE_SYSTEM_PROCESSOR=${AUTOWARE_TARGET_ARCH} \ | ||
-DCMAKE_PREFIX_PATH='${AUTOWARE_SYSROOT}/opt/ros/kinetic;${AUTOWARE_INSTALL_PATH}' \ | ||
-DCMAKE_FIND_ROOT_PATH=${AUTOWARE_INSTALL_PATH} \ | ||
-DCMAKE_BUILD_TYPE=Release $* | ||
" | ||
|
||
find install-${AUTOWARE_TARGET_PLATFORM}/ -type f -exec grep -Iq . {} \; -and -exec sed -i -e "s#${AUTOWARE_SYSROOT}##g" {} \; | ||
else | ||
echo "Select target platform: synquacer, driveworks, generic-aarch64" | ||
fi | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.