Skip to content

Commit

Permalink
Arc 259 to humble and beyond (#2477)
Browse files Browse the repository at this point in the history
* removed work-in-progress related elements

* removed tracing and rosbag2 since they are already installed and in humble

* removed stale comment

* removed unneeded astuff_sensor_msgs install

* added ci/rebuilding improvements

* fixed command to get package names

* actually fixed package collector

* configured dependencies to not reinstall on rebuild

* limited v2xhub to only install necessary components
  • Loading branch information
john-chrosniak authored Dec 26, 2024
1 parent c251054 commit 7d313f0
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 51 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/Ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,11 @@ jobs:
- name: Install external dependencies
# Install the multiple object tracking deps
run: sudo bash /opt/carma/src/multiple_object_tracking/scripts/install_dependencies.sh
# TODO WIP Humble Upgrade: Remove after humble upgrade is done
- name: Read packages from file

- name: Compile list of packages
# Get all packages in the respository
run: |
PACKAGES=$(cat /opt/carma/src/${{ github.event.repository.name }}/.github/workflows/humble-upgraded-packages.txt)
PACKAGES=$(find ./src/carma-platform -maxdepth 2 -type f -name "package.xml" -exec sh -c 'grep -oPm1 "(?<=<name>)[^<]+" "{}"' \; | cut -d/ -f1 | tr '\n' ' ' | sed 's/ $//')
echo "PACKAGES=$PACKAGES" >> $GITHUB_ENV
- name: Build ROS2
Expand Down
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,12 @@ FROM ${DOCKER_ORG}/autoware.ai:${DOCKER_TAG} as base-image
FROM base-image AS source-code

RUN mkdir ~/src
COPY --chown=carma . /home/carma/src/carma-platform/
COPY --chown=carma ./docker /home/carma/src/carma-platform/docker

ARG GIT_BRANCH="develop"
RUN ~/src/carma-platform/docker/checkout.bash -b ${GIT_BRANCH}

COPY --chown=carma . /home/carma/src/carma-platform
# /////////////////////////////////////////////////////////////////////////////
# Stage 2 - Build and install the software
# /////////////////////////////////////////////////////////////////////////////
Expand Down
4 changes: 0 additions & 4 deletions carma_cloud_client/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,6 @@
<depend>j2735_convertor</depend>
<depend>std_srvs</depend>

<!-- <depend>qhttpengine</depend> -->
<!-- <depend>v2xhubWebAPI</depend> -->


<test_depend>ament_lint_auto</test_depend>
<test_depend>ament_cmake_gtest</test_depend>

Expand Down
6 changes: 3 additions & 3 deletions docker/build-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,12 @@ echo "Final image name: $USERNAME/$IMAGE:$COMPONENT_VERSION_STRING"
cd ..
if [[ $COMPONENT_VERSION_STRING = "develop" ]]; then
sed "s|usdotfhwastoldev/|$USERNAME/|g; s|usdotfhwastolcandidate/|$USERNAME/|g; s|usdotfhwastol/|$USERNAME/|g; s|:[0-9]*\.[0-9]*\.[0-9]*|:$COMPONENT_VERSION_STRING|g; s|checkout.bash|checkout.bash -d|g" \
Dockerfile | docker build -f - --no-cache -t $USERNAME/$IMAGE:$COMPONENT_VERSION_STRING \
Dockerfile | docker build -f - -t $USERNAME/$IMAGE:$COMPONENT_VERSION_STRING \
--build-arg VERSION="$COMPONENT_VERSION_STRING" \
--build-arg VCS_REF=`git rev-parse --short HEAD` \
--build-arg BUILD_DATE=`date -u +”%Y-%m-%dT%H:%M:%SZ”` .
elif [[ $COMPONENT_VERSION_STRING = "SNAPSHOT" ]]; then
docker build --network=host --no-cache -t $USERNAME/$IMAGE:$COMPONENT_VERSION_STRING \
docker build --network=host -t $USERNAME/$IMAGE:$COMPONENT_VERSION_STRING \
--build-arg PACKAGES="$PACKAGES" \
--build-arg VERSION="$COMPONENT_VERSION_STRING" \
--build-arg VCS_REF=`git rev-parse --short HEAD` \
Expand All @@ -128,7 +128,7 @@ else
#The addition of --network=host was a fix for a DNS resolution error that occured
#when running the platform inside an Ubuntu 20.04 virtual machine. The error and possible soliutions are
# discussed here: https://github.com/moby/moby/issues/41003
docker build --network=host --no-cache -t $USERNAME/$IMAGE:$COMPONENT_VERSION_STRING \
docker build --network=host -t $USERNAME/$IMAGE:$COMPONENT_VERSION_STRING \
--build-arg VERSION="$COMPONENT_VERSION_STRING" \
--build-arg VCS_REF=`git rev-parse --short HEAD` \
--build-arg BUILD_DATE=`date -u +”%Y-%m-%dT%H:%M:%SZ”` .
Expand Down
39 changes: 1 addition & 38 deletions docker/checkout.bash
Original file line number Diff line number Diff line change
Expand Up @@ -42,53 +42,16 @@ cd "${dir}"/src
git clone --depth=1 https://github.com/usdot-fhwa-stol/carma-msgs.git --branch "${BRANCH}"
git clone --depth=1 https://github.com/usdot-fhwa-stol/carma-utils.git --branch "${BRANCH}"
git clone --depth=1 https://github.com/usdot-fhwa-stol/carma-messenger.git --branch "${BRANCH}"
# Get humble branch of message filters which supports template Node arguments (foxy version supports rclcpp::Node only)
git clone --depth=1 https://github.com/usdot-fhwa-stol/carma-message-filters.git --branch "${BRANCH}"
git clone --depth=1 https://github.com/usdot-fhwa-stol/multiple_object_tracking --branch "${BRANCH}"
git clone --depth=1 https://github.com/ros2/rosbag2 --branch humble

# add astuff messages
# NOTE: The ibeo_msgs package is ignored because on build the cmake files in that package run a sed command
# which can make them incompatible with a new ros version after a source switch
git clone https://github.com/astuff/astuff_sensor_msgs

cd astuff_sensor_msgs
git checkout 41d5ef0c33fb27eb3c9ba808b51332bcce186a83

# Disable ibeo_msgs
cd ibeo_msgs
echo "" > COLCON_IGNORE
cd ../astuff_sensor_msgs
echo "" > COLCON_IGNORE

cd ../

# Clone the humble branch of ros2_tracing in order to enable certain analyses of CARMA Platform
# made possible through collected trace data, such as analyzing ROS 2 callback durations.
git clone -b humble https://github.com/ros2/ros2_tracing

#rosbridge_suite is a ROS meta-package including all the rosbridge packages.
# NOTE: clone -b flag is used instead of --branch to avoid hook rewriting it
git clone -b ros2 https://github.com/usdot-fhwa-stol/rosbridge_suite


# Novatel OEM7 Driver
# NOTE: This is required since otherwise this image will not contain the novatel_oem7_msgs package, and a missing ROS 2 message package
# can cause ROS 2 rosbag logging to fail in Foxy.
# Related GitHub discussion for fix that was not backported to Foxy: https://github.com/ros2/rosbag2/pull/858
git clone https://github.com/novatel/novatel_oem7_driver.git "${dir}"/src/novatel_oem7_driver -b ros2-dev
# Checkout verified commit
cd "${dir}"/src/novatel_oem7_driver
git checkout 3055e220bb9715b59c3ef53ab0aba05a495d9d5
# Ignore novatel_oem7_driver package; only novatel_oem7_msgs is required
cd "${dir}"/src/novatel_oem7_driver/src/novatel_oem7_driver
echo "" > COLCON_IGNORE
cd "${dir}"/src
# TODO: Remove V2X-Hub Depedency (CAR-6029)
git clone -b master --depth 1 https://github.com/etherealjoy/qhttpengine.git

git clone -b 7.6.0 --depth 1 https://github.com/usdot-fhwa-OPS/V2X-Hub.git
git clone -b 7.6.0 --depth 1 --sparse https://github.com/usdot-fhwa-OPS/V2X-Hub.git
cd V2X-Hub
git config core.sparsecheckout true
git sparse-checkout init
git sparse-checkout set ext/ccserver
6 changes: 4 additions & 2 deletions docker/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@ set -e

cd ~/carma_ws

echo "Installing multiple object tracking dependencies"
sudo ./src/multiple_object_tracking/scripts/install_dependencies.sh
if [[ -z "$PACKAGES" ]]; then
echo "Installing multiple object tracking dependencies"
sudo ./src/multiple_object_tracking/scripts/install_dependencies.sh
fi

sudo mkdir -p /opt/carma # Create install directory
sudo chown carma /opt/carma # Set owner to expose permissions for build
Expand Down

0 comments on commit 7d313f0

Please sign in to comment.