Enable RSS build with CARLA 0.9.15
This commit is contained in:
parent
603633c08f
commit
0ac122b699
|
@ -21,6 +21,14 @@ if (BUILD_RSS_VARIANT)
|
|||
install(FILES ${spdlog_file} DESTINATION lib)
|
||||
list(APPEND ADRSS_LIBS ${spdlog_file})
|
||||
|
||||
set(proj_include_dir ${ADRSS_INSTALL_DIR}/../../proj-install/include)
|
||||
set(proj_lib ${ADRSS_INSTALL_DIR}/../../proj-install/lib/libproj.a)
|
||||
install(DIRECTORY ${proj_include_dir} DESTINATION include/system)
|
||||
list(APPEND ADRSS_INCLUDE_DIRS ${proj_include_dir})
|
||||
install(FILES ${proj_lib} DESTINATION lib)
|
||||
list(APPEND ADRSS_LIBS ${proj_lib})
|
||||
|
||||
|
||||
foreach(ad_lib ad_physics ad_rss ad_map_access ad_map_opendrive_reader ad_rss_map_integration)
|
||||
set(${ad_lib}_file ${ADRSS_INSTALL_DIR}/${ad_lib}/lib/lib${ad_lib}.a)
|
||||
install(FILES ${${ad_lib}_file} DESTINATION lib)
|
||||
|
|
|
@ -29,7 +29,7 @@ IFS="," read -r -a PY_VERSION_LIST <<< "${PY_VERSION_LIST}"
|
|||
# -- Get ad-rss -------------------------------------------
|
||||
# ==============================================================================
|
||||
|
||||
ADRSS_VERSION=4.4.3
|
||||
ADRSS_VERSION=4.5.3
|
||||
ADRSS_BASENAME=ad-rss-${ADRSS_VERSION}
|
||||
ADRSS_COLCON_WORKSPACE="${CARLA_BUILD_FOLDER}/${ADRSS_BASENAME}"
|
||||
ADRSS_SRC_DIR="${ADRSS_COLCON_WORKSPACE}/src"
|
||||
|
@ -40,10 +40,12 @@ if [[ ! -d "${ADRSS_SRC_DIR}" ]]; then
|
|||
|
||||
mkdir -p "${ADRSS_SRC_DIR}"
|
||||
|
||||
# clone ad-rss with all submodules, but remove proj, as CARLA already uses it
|
||||
pushd "${ADRSS_SRC_DIR}" >/dev/null
|
||||
git clone --depth=1 -b v1.7.0 https://github.com/gabime/spdlog.git
|
||||
git clone --depth=1 -b v2.4.5_hotfix https://github.com/carla-simulator/map.git
|
||||
git clone --depth=1 -b v${ADRSS_VERSION} https://github.com/intel/ad-rss-lib.git
|
||||
git clone -b v${ADRSS_VERSION} https://github.com/intel/ad-rss-lib.git && cd ad-rss-lib && git submodule update --init --recursive && rm -rf dependencies/map/dependencies/PROJ4 && cd ..
|
||||
|
||||
# ADRSS_VERSION is designed for older boost, update datatype from boost::array to std::array
|
||||
grep -rl "boost::array" | xargs sed -i 's/boost::array/std::array/g'
|
||||
popd
|
||||
|
||||
cat >"${ADRSS_COLCON_WORKSPACE}/colcon.meta" <<EOL
|
||||
|
@ -56,7 +58,8 @@ if [[ ! -d "${ADRSS_SRC_DIR}" ]]; then
|
|||
"cmake-args": ["-DBUILD_PYTHON_BINDING=ON", "-DCMAKE_POSITION_INDEPENDENT_CODE=ON", "-DBUILD_SHARED_LIBS=OFF", "-DDISABLE_WARNINGS_AS_ERRORS=ON"]
|
||||
},
|
||||
"ad_map_opendrive_reader": {
|
||||
"cmake-args": ["-DCMAKE_POSITION_INDEPENDENT_CODE=ON", "-DBUILD_SHARED_LIBS=OFF", "-DDISABLE_WARNINGS_AS_ERRORS=ON"]
|
||||
"cmake-args": ["-DCMAKE_POSITION_INDEPENDENT_CODE=ON", "-DBUILD_SHARED_LIBS=OFF", "-DDISABLE_WARNINGS_AS_ERRORS=ON"],
|
||||
"dependencies": ["odrSpiral"]
|
||||
},
|
||||
"ad_rss": {
|
||||
"cmake-args": ["-DBUILD_PYTHON_BINDING=ON", "-DCMAKE_POSITION_INDEPENDENT_CODE=ON", "-DBUILD_SHARED_LIBS=OFF", "-DDISABLE_WARNINGS_AS_ERRORS=ON"]
|
||||
|
@ -99,15 +102,11 @@ for PY_VERSION in ${PY_VERSION_LIST[@]} ; do
|
|||
log "Building ${ADRSS_BASENAME} for python${PY_VERSION}"
|
||||
|
||||
pushd "${ADRSS_COLCON_WORKSPACE}" >/dev/null
|
||||
if [ "${CMAKE_PREFIX_PATH}" == "" ]; then
|
||||
CMAKE_PREFIX_PATH="${CARLA_BUILD_FOLDER}/boost-1.72.0-c$CARLA_LLVM_VERSION_MAJOR-install;${CARLA_BUILD_FOLDER}/proj-install"
|
||||
else
|
||||
CMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH};${CARLA_BUILD_FOLDER}/boost-1.72.0-c$CARLA_LLVM_VERSION_MAJOR-install;${CARLA_BUILD_FOLDER}/proj-install"
|
||||
fi
|
||||
CMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH};${CARLA_BUILD_FOLDER}/boost-1.80.0-c$CARLA_LLVM_VERSION_MAJOR-install;${CARLA_BUILD_FOLDER}/proj-install"
|
||||
|
||||
# get the python version of the binding to be built
|
||||
PYTHON_VERSION=$(/usr/bin/env python${PY_VERSION} -V 2>&1)
|
||||
PYTHON_BINDING_VERSIONS=${PYTHON_VERSION:7:3}
|
||||
PYTHON_VERSION=3
|
||||
PYTHON_BINDING_VERSIONS=${PYTHON_VERSION:8}
|
||||
echo "PYTHON_BINDING_VERSIONS=${PYTHON_BINDING_VERSIONS}"
|
||||
|
||||
# enforce sequential executor to reduce the required memory for compilation
|
||||
|
|
|
@ -146,7 +146,7 @@ function build_libcarla {
|
|||
M_TOOLCHAIN=${LIBSTDCPP_TOOLCHAIN_FILE}
|
||||
M_BUILD_FOLDER=${LIBCARLA_BUILD_CLIENT_FOLDER}.rss.$(echo "$2" | tr '[:upper:]' '[:lower:]')
|
||||
M_INSTALL_FOLDER=${LIBCARLA_INSTALL_CLIENT_FOLDER}
|
||||
CMAKE_EXTRA_OPTIONS="${CMAKE_EXTRA_OPTIONS:+${CMAKE_EXTRA_OPTIONS} }-DBUILD_RSS_VARIANT=ON -DADRSS_INSTALL_DIR=${CARLA_BUILD_FOLDER}/ad-rss-4.4.3/install"
|
||||
CMAKE_EXTRA_OPTIONS="${CMAKE_EXTRA_OPTIONS:+${CMAKE_EXTRA_OPTIONS} }-DBUILD_RSS_VARIANT=ON -DADRSS_INSTALL_DIR=${CARLA_BUILD_FOLDER}/ad-rss-4.5.3/install"
|
||||
else
|
||||
fatal_error "Invalid build configuration \"$1\""
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue