diff --git a/.github/workflows/test_ubuntu.yml b/.github/workflows/test_ubuntu.yml index 8e9d56a284..27cfe58402 100644 --- a/.github/workflows/test_ubuntu.yml +++ b/.github/workflows/test_ubuntu.yml @@ -19,28 +19,20 @@ jobs: - name: Build AirLib run: ./build.sh - - name: Build ROS Wrapper + - name: Build ROS2 Jammy Wrapper + if: matrix.os == 'ubuntu-22.04' run: | - ./tools/install_ros_deps.sh + chmod +x ./tools/install_ros2_deps.sh + ./tools/install_ros2_deps.sh source /opt/ros/*/setup.bash - cd ros - catkin build -DCMAKE_C_COMPILER=gcc-12 -DCMAKE_CXX_COMPILER=g++-12 + cd ros2 + colcon build --cmake-args -DCMAKE_C_COMPILER=gcc-12 --cmake-args -DCMAKE_CXX_COMPILER=g++-12 - - name: Build ROS2 Wrapper - if: matrix.os == 'ubuntu-22.04' + - name: Build ROS2 Foxy Wrapper + if: matrix.os == 'ubuntu-24.04' run: | chmod +x ./tools/install_ros2_deps.sh ./tools/install_ros2_deps.sh source /opt/ros/*/setup.bash cd ros2 colcon build --cmake-args -DCMAKE_C_COMPILER=gcc-12 --cmake-args -DCMAKE_CXX_COMPILER=g++-12 - - # Removing support for GazeboDrone. Gazebo is dead. Long live AirSim/Colosseum. - # - name: Build GazeboDrone - # run: | - # sudo apt-get install -qq libgazebo9-dev gcc-12 g++-12 - # ./clean.sh && ./build.sh --gcc - # cd GazeboDrone - # mkdir build && cd build - # cmake -DCMAKE_C_COMPILER=gcc-12 -DCMAKE_CXX_COMPILER=g++-12 .. - # make diff --git a/build.sh b/build.sh old mode 100644 new mode 100755 index 9799e3541f..1fec6df9f1 --- a/build.sh +++ b/build.sh @@ -8,7 +8,7 @@ build_dir=build mkdir -p build cd build -CC=/usr/bin/clang-18 CXX=/usr/bin/clang++-18 cmake ../cmake -DCMAKE_CXX_FLAGS='-stdlib=libc++ -I/usr/lib/llvm-17/include/c++/v1~' +CC=/usr/bin/clang CXX=/usr/bin/clang++ cmake ../cmake -DCMAKE_CXX_FLAGS='-stdlib=libc++' make -j$(nproc) diff --git a/setup.sh b/setup.sh index 47cc03e81b..38720a41dd 100755 --- a/setup.sh +++ b/setup.sh @@ -7,7 +7,7 @@ pushd "$SCRIPT_DIR" >/dev/null downloadHighPolySuv=true -MIN_CMAKE_VERSION=3.10.0 +MIN_CMAKE_VERSION=3.19.2 # On macOS, make sure we have a CMake that will support CMAKE_APPLE_SILICON_PROCESSOR. if [ "$(uname)" == "Darwin" ]; then MIN_CMAKE_VERSION=3.19.2 @@ -50,7 +50,7 @@ else #linux software-properties-common \ wget \ libvulkan1 \ - vulkan-utils + vulkan-tools #install clang and build tools VERSION=$(lsb_release -rs | cut -d. -f1) @@ -60,7 +60,11 @@ else #linux wget -O - http://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - sudo apt-get update fi - sudo apt-get install -y clang-12 clang++-12 libc++-12-dev libc++abi-12-dev + if [ "$VERSION" == "22" ]; then + sudo apt-get install -y clang-14 clang++-14 libc++-14-dev libc++abi-14-dev + else + sudo apt-get install -y clang-17 clang++-17 libc++-17-dev libc++abi-17-dev + fi fi if ! which cmake; then @@ -103,22 +107,35 @@ else #linux if version_less_than_equal_to "$cmake_ver" "$MIN_CMAKE_VERSION"; then # in ubuntu 18 docker CI, avoid building cmake from scratch to save time # ref: https://apt.kitware.com/ - if [ "$(lsb_release -rs)" == "18.04" ]; then + ubuntu_version="$(lsb_release -rs)" + + if [[ "$ubuntu_version" == "22.04" ]]; then sudo apt-get -y install \ apt-transport-https \ ca-certificates \ gnupg wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | sudo tee /etc/apt/trusted.gpg.d/kitware.gpg >/dev/null - sudo apt-add-repository 'deb https://apt.kitware.com/ubuntu/ bionic main' - sudo apt-get -y install --no-install-recommends \ + sudo apt-add-repository "deb https://apt.kitware.com/ubuntu/ jammy main" + sudo apt update && apt-get -y install --no-install-recommends \ make \ - cmake - + cmake \ + openssl + elif [[ "$ubuntu_version" == "24.04" ]]; then + sudo apt-get -y install \ + apt-transport-https \ + ca-certificates \ + gnupg + wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | sudo tee /etc/apt/trusted.gpg.d/kitware.gpg >/dev/null + sudo apt-add-repository "deb https://apt.kitware.com/ubuntu/ noble main" + sudo apt update && apt-get -y install --no-install-recommends \ + make \ + cmake \ + openssl else - # For Ubuntu 16.04, or anything else, build CMake 3.10.2 from source + # For anything else, build CMake 3.10.2 from source if [[ ! -d "cmake_build/bin" ]]; then echo "Downloading cmake..." - wget https://cmake.org/files/v3.10/cmake-3.10.2.tar.gz \ + wget https://cmake.org/files/v3.28/cmake-3.28.4.tar.gz \ -O cmake.tar.gz tar -xzf cmake.tar.gz rm cmake.tar.gz @@ -201,5 +218,5 @@ popd >/dev/null set +x echo "" echo "************************************" -echo "AirSim setup completed successfully!" +echo "Colosseum setup completed successfully!" echo "************************************" diff --git a/tools/install_ros2_deps.sh b/tools/install_ros2_deps.sh old mode 100644 new mode 100755 index f253948203..27c44a703f --- a/tools/install_ros2_deps.sh +++ b/tools/install_ros2_deps.sh @@ -5,10 +5,13 @@ set -x DISTRO="$(lsb_release -sc)" -if [[ "$DISTRO" == "focal" ]]; then - ROS_DISTRO="galactic" +if [[ "$DISTRO" == "jammy" ]]; then + ROS_DISTRO="humble" + +elif [[ "$DISTRO" == "noble" ]]; then + ROS_DISTRO="kilted" else - echo "ROS2 support only ubuntu focal" + echo "ROS2 support only ubuntu jammy (22.04) and noble (24.04) at the moment." exit 1 fi