Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ROS2 Humble upgrade code only - not integration tested #166

Open
wants to merge 67 commits into
base: develop-humble
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
d23d398
initial humble change
MishkaMN Dec 23, 2024
ef9b4e9
circle ci to humble
MishkaMN Dec 23, 2024
fa5432f
dockerhub trigger for develop-humble
MishkaMN Dec 23, 2024
fa5ba3e
update source list
MishkaMN Dec 24, 2024
9d07cb6
lexus to gem
MishkaMN Dec 24, 2024
b414252
fix install paths
MishkaMN Dec 24, 2024
c4e39fa
remove ros1 steps
MishkaMN Dec 24, 2024
4d4c729
remove extra ros1
MishkaMN Dec 24, 2024
2362824
make it most recent ros2
MishkaMN Dec 24, 2024
568aa31
try make it faster
MishkaMN Dec 24, 2024
bdc0093
humble
MishkaMN Jan 10, 2025
88dd9c4
add sensit9ve
MishkaMN Jan 10, 2025
f946615
replace checkouts to installs
MishkaMN Jan 10, 2025
c5cb881
split into noetic and humble
MishkaMN Jan 10, 2025
9692ff8
Split noetic and humble
MishkaMN Jan 10, 2025
69ae6f0
fix syntax
MishkaMN Jan 10, 2025
5b8614a
rename access_token
MishkaMN Jan 10, 2025
ef63e1f
introduce tag replacing functionality
MishkaMN Jan 10, 2025
6835b41
remove dependency from autoware
MishkaMN Jan 10, 2025
233a93b
comment
MishkaMN Jan 10, 2025
eafb414
deps from autoware.ai
MishkaMN Jan 10, 2025
b8f80ba
Fix autoware checkout
MishkaMN Jan 11, 2025
1429231
Fix messages
MishkaMN Jan 11, 2025
180bbd8
Fix git checkout for ros1
MishkaMN Jan 11, 2025
20473f3
Fix syntax error
MishkaMN Jan 11, 2025
b2e9e4d
Fix weird syntax
MishkaMN Jan 11, 2025
a6e5940
Be consistent in branching
MishkaMN Jan 11, 2025
f15e240
Add .git in the URL
MishkaMN Jan 11, 2025
49a8052
Maybe authentication issue
MishkaMN Jan 11, 2025
54b1b05
Try quoting
MishkaMN Jan 11, 2025
90d88af
try hardcoding
MishkaMN Jan 11, 2025
d30a285
Enforce sequential
MishkaMN Jan 11, 2025
8803720
rename to be specific
MishkaMN Jan 11, 2025
91d0ed2
Make sudo
MishkaMN Jan 11, 2025
2019a29
Try renaming the folder
MishkaMN Jan 11, 2025
7ed2150
Try normal git clone
MishkaMN Jan 11, 2025
38c66b0
Normal checkout
MishkaMN Jan 11, 2025
db6c85d
Use normal git clone
MishkaMN Jan 11, 2025
0fa13ef
Check git version
MishkaMN Jan 11, 2025
fee082d
Try sparse again with different approach
MishkaMN Jan 11, 2025
77fd049
Fix ROS1 issues
MishkaMN Jan 11, 2025
5bda553
Add autoware_build_flags for ROS1
MishkaMN Jan 12, 2025
e91bdd6
Add ros_observer for ROS1
MishkaMN Jan 12, 2025
f47e53a
sudo issues locally
MishkaMN Jan 12, 2025
ea14fde
fix something that will break
MishkaMN Jan 12, 2025
7836cde
Add back ssc_pm_lexus
MishkaMN Jan 12, 2025
348a38d
Fix
MishkaMN Jan 12, 2025
966452e
Fix docker stuff
MishkaMN Jan 12, 2025
49a8747
Relax failure
MishkaMN Jan 12, 2025
dcfb1da
Optimize
MishkaMN Jan 12, 2025
2ba0dbc
optimize ROS1 build
MishkaMN Jan 12, 2025
c2cd204
Make ROS1 Fail if didn't complete
MishkaMN Jan 12, 2025
53efa7e
Remove incorrect requirement
MishkaMN Jan 12, 2025
ad3d224
Working version final
MishkaMN Jan 12, 2025
ac4026b
Fix CI failing
MishkaMN Jan 12, 2025
31f04ed
Fix CI
MishkaMN Jan 12, 2025
4142632
Install deps
MishkaMN Jan 12, 2025
318a203
elevate privilege
MishkaMN Jan 12, 2025
5cfe552
try apt instead of apt-get
MishkaMN Jan 12, 2025
2bd7a52
add yes to commands
MishkaMN Jan 12, 2025
acb52d1
avoid interactiveness for all
MishkaMN Jan 12, 2025
14d16ef
Rename to correct variable name SONAR_TOKEN
MishkaMN Jan 13, 2025
0aa4025
Address PR
MishkaMN Jan 17, 2025
7619aa3
remove extra change
MishkaMN Jan 17, 2025
614ef00
Fix the github action branch
MishkaMN Jan 17, 2025
db14aeb
Try removing std_srvs from cpp
MishkaMN Jan 17, 2025
ac0fed2
remove std_srvs I missed
MishkaMN Jan 17, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 33 additions & 15 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
version: 2
# Copyright (C) 2018-2022 LEIDOS.
#
# Copyright (C) 2025 LEIDOS.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The copyright should be 2018-2022

#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
# the License at
#
#
# http://www.apache.org/licenses/LICENSE-2.0
#
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations under
# the License.
#
#

# Configuration file for Circle CI
# Configuration file for Circle CI
# CI will report failure if any executed command returns and error status
# Operations performed are as follows
# Build source code
Expand All @@ -29,7 +29,7 @@ jobs:
# XTERM used for better catkin_make output
# TODO (CAR-6024) move this worflow to github action to allow dynamic container selection
docker:
- image: usdotfhwastoldev/autoware.ai:develop
- image: usdotfhwastoldev/carma-base:develop-humble
user: carma
environment:
TERM: xterm # use xterm to get full display output from build
Expand All @@ -46,27 +46,45 @@ jobs:
mkdir CARMASscInterfaceWrapper
- checkout:
path: src/CARMASscInterfaceWrapper
- run:
- run:
name: Pull Deps
command: |
source ${INIT_ENV}
./src/CARMASscInterfaceWrapper/docker/checkout.bash -r ${PWD}
./src/CARMASscInterfaceWrapper/docker/checkout.bash -ros2 -r ${PWD}
- run:
name: Install Deps
command: |
sudo sh -c 'echo "deb [trusted=yes] https://s3.amazonaws.com/autonomoustuff-repo/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/autonomoustuff-public.list'
sudo apt-add-repository -y ppa:astuff/kvaser-linux
sudo apt update

sudo apt install -y kvaser-canlib-dev kvaser-drivers-dkms

sudo apt install -y libas-common \
ros-humble-automotive-autonomy-msgs \
ros-humble-automotive-navigation-msgs \
ros-humble-automotive-platform-msgs \
ros-humble-pacmod3-msgs \
ros-humble-pacmod3 \
ros-humble-kvaser-interface \
ros-humble-message-filters \
apt-utils
- run:
name: Build Driver
command: |
source ${INIT_ENV}
export ROS_PARALLEL_JOBS='-j1 -l1'
export ROS_PARALLEL_JOBS='-j4 -l4'
build-wrapper-linux-x86-64 --out-dir /opt/carma/bw-output bash make_with_coverage.bash -m -e /opt/carma/ -o ./coverage_reports/gcov
- run:
name: Run C++ Tests
command: |
source ${INIT_ENV}
export ROS_PARALLEL_JOBS='-j1 -l1'
export ROS_PARALLEL_JOBS='-j4 -l4'
bash make_with_coverage.bash -t -e /opt/carma/ -o ./coverage_reports/gcov
# Run SonarCloud analysis
# PR Branchs and number extracted from Circle variables and github api
# Circle CI seems to make a change to the base branch, so we must fetch --force to ensure correct git file change stats
# SONAR_SCANNER_TOKEN MUST be secured as an environment variable in Circle CI NOT in this file.
# SONAR_SCANNER_TOKEN MUST be secured as an environment variable in Circle CI NOT in this file.
# The following sonar settings MUST be set in SonarCloud UI NOT in this file
# sonar.pullrequest.provider
# sonar.pullrequest.github.endpoint
Expand All @@ -80,7 +98,7 @@ jobs:
if [ -z "${CIRCLE_PULL_REQUEST}" ]; then
echo "Non-PR Build Detected. Running analysis on ${CIRCLE_BRANCH}"
cd src/CARMASscInterfaceWrapper
sonar-scanner -Dproject.settings=.sonarqube/sonar-scanner.properties -Dsonar.login=${SONAR_SCANNER_TOKEN}
sonar-scanner -Dproject.settings=.sonarqube/sonar-scanner.properties -Dsonar.login=${SONAR_TOKEN}
exit 0;
fi
echo "PR branch ${CIRCLE_BRANCH}"
Expand All @@ -89,8 +107,8 @@ jobs:
export PR_NUM=`echo ${CIRCLE_PULL_REQUEST} | cut -d'/' -f7`
echo "PR number ${PR_NUM}"
export BASE_BRANCH_URL="https://api.github.com/repos/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}/pulls/${PR_NUM}"
export TARGET_BRANCH=$(curl "$BASE_BRANCH_URL" | jq '.base.ref' | tr -d '"')
export TARGET_BRANCH=$(curl "$BASE_BRANCH_URL" | jq '.base.ref' | tr -d '"')
echo "Target Branch = ${TARGET_BRANCH}"
cd src/CARMASscInterfaceWrapper
git fetch --force origin ${TARGET_BRANCH}:${TARGET_BRANCH}
sonar-scanner -Dproject.settings=.sonarqube/sonar-scanner.properties -Dsonar.login=${SONAR_SCANNER_TOKEN} -Dsonar.pullrequest.base=${TARGET_BRANCH} -Dsonar.pullrequest.branch=${CIRCLE_BRANCH} -Dsonar.pullrequest.key=${PR_NUM}
sonar-scanner -X -Dproject.settings=.sonarqube/sonar-scanner.properties -Dsonar.login=${SONAR_TOKEN} -Dsonar.pullrequest.base=${TARGET_BRANCH} -Dsonar.pullrequest.branch=${CIRCLE_BRANCH} -Dsonar.pullrequest.key=${PR_NUM}
15 changes: 15 additions & 0 deletions .github/workflows/docker-humble.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Docker Humble build

on:
pull_request:
types: [opened, synchronize, reopened]

jobs:
docker:
uses: usdot-fhwa-stol/actions/.github/workflows/docker.yml@main
with:
file: ./humble/Dockerfile
tag_name_suffix: humble
replace_suffix: true # TODO: remove after develop-humble branch is merged to develop
secrets:
GH_PAT: ${{ secrets.GH_PAT }}
15 changes: 15 additions & 0 deletions .github/workflows/docker-noetic.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Docker Noetic build

on:
pull_request:
types: [opened, synchronize, reopened]

jobs:
docker:
uses: usdot-fhwa-stol/actions/.github/workflows/docker.yml@main
with:
file: ./noetic/Dockerfile
tag_name_suffix: noetic
replace_suffix: true # TODO: remove after develop-humble branch is merged to develop
secrets:
GH_PAT: ${{ secrets.GH_PAT }}
12 changes: 0 additions & 12 deletions .github/workflows/docker.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
name: Docker Hub build
name: Docker Hub Humble build

on:
push:
branches:
- develop
- master
- "release/*"
- develop-humble
tags:
- "carma-system-*"
jobs:
Expand All @@ -14,5 +15,8 @@ jobs:
secrets:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
ACCESS_ID: ${{ secrets.ACCESS_ID }}
SECRET_KEY: ${{ secrets.SECRET_KEY }}
TOKEN: ${{ secrets.GH_PAT }}
with:
file: ./humble/Dockerfile
tag_name_suffix: humble
replace_suffix: true # TODO: remove after develop-humble branch is merged to develop
22 changes: 22 additions & 0 deletions .github/workflows/dockerhub-noetic.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Docker Hub Noetic build

on:
push:
branches:
- develop
- master
- "release/*"
- develop-humble
tags:
- "carma-system-*"
jobs:
dockerhub:
uses: usdot-fhwa-stol/actions/.github/workflows/dockerhub.yml@main
secrets:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
TOKEN: ${{ secrets.GH_PAT }}
with:
file: ./noetic/Dockerfile
tag_name_suffix: noetic
replace_suffix: true # TODO: remove after develop-humble branch is merged to develop
2 changes: 1 addition & 1 deletion .sonarqube/sonar-scanner.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2018-2022 LEIDOS.
# Copyright (C) 2025 LEIDOS.
#
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be 2018-2025

# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ The primary CARMA Platform repository can be found [here](https://github.com/usd
github organization. Documentation on how the CARMA Platform functions, how it will evolve over time, and how you can contribute can be found at the above links as well.

## Current Status of ROS 1 and ROS 2 Packages
The current CARMA Platform system operates as a hybrid of ROS 1 Noetic and ROS 2 Foxy components. While nearly all components have been upgraded to ROS 2 Foxy, a small amount of ROS 1 Noetic content still exists within the system, including some packages in this repository. For more information, please see the relevant documentation in the [carma-config](https://github.com/usdot-fhwa-stol/carma-config?tab=readme-ov-file#current-status-of-hybrid-ros-1ros-2-system) repository.
The current CARMA Platform system operates as a hybrid of ROS 1 Noetic and ROS 2 Humble components. While nearly all components have been upgraded to ROS 2 Humble, a small amount of ROS 1 Noetic content still exists within the system, including some packages in this repository. For more information, please see the relevant documentation in the [carma-config](https://github.com/usdot-fhwa-stol/carma-config?tab=readme-ov-file#current-status-of-hybrid-ros-1ros-2-system) repository.

## Contribution
Welcome to the CARMA contributing guide. Please read this guide to learn about our development process, how to propose pull requests and improvements, and how to build and test your changes to this project. [CARMA Contributing Guide](https://github.com/usdot-fhwa-stol/carma-platform/blob/develop/Contributing.md)
Expand Down
61 changes: 39 additions & 22 deletions docker/build-image.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
#!/bin/bash

# Copyright (C) 2018-2022 LEIDOS.
#
# Copyright (C) 2025 LEIDOS.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2018-2025

#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
# the License at
#
#
# http://www.apache.org/licenses/LICENSE-2.0
#
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations under
# the License.
declare -i false=0 true=1

USERNAME=usdotfhwastol

Expand All @@ -23,9 +24,28 @@ echo ""
echo "##### $IMAGE Docker Image Build Script #####"
echo ""

token=""
build_ros1_pkgs="$false"
build_ros2_pkgs="$false"
dockerfile_dir=""

while [[ $# -gt 0 ]]; do
arg="$1"
case $arg in
-ros1|--ros1_build)
dir=~/workspace_ros1
echo "Install and build ros1 packages"
build_ros1_pkgs="$true"
build_ros2_pkgs="$false"
shift
;;
-ros2|--ros2_build)
dir=~/workspace_ros2
echo "Install and build ros2 packages"
build_ros1_pkgs="$false"
build_ros2_pkgs="$true"
shift
;;
-v|--version)
COMPONENT_VERSION_STRING="$2"
shift
Expand All @@ -45,9 +65,7 @@ while [[ $# -gt 0 ]]; do
shift
;;
*) ##Arguments for ssc_pm_lexus
access_id=${arg}
secret_key="$2"
shift
token="$1"
shift
;;
esac
Expand All @@ -61,34 +79,33 @@ echo "Building docker image for $IMAGE version: $COMPONENT_VERSION_STRING"
echo "Final image name: $USERNAME/$IMAGE:$COMPONENT_VERSION_STRING"

# Get arguments for ssc_pm_lexus
if [ -z $access_id ];
then
echo "No argument provided for access_id, this script needs to be run with <ACCESS_ID> <SECRET_KEY>"
exit 1
fi

if [ -z $secret_key ];
then
echo "No argument provided for secret_key, this script needs to be run with <ACCESS_ID> <SECRET_KEY>"

if [[ $build_ros1_pkgs -eq 1 ]]; then
cd ../noetic
echo "======= ROS1 build selected ========"
elif [[ $build_ros2_pkgs -eq 1 ]]; then
cd ../humble
if [ -z $token ]; then
echo "No argument provided for token for ROS2 build, this script needs to be run with <TOKEN>"
exit 1
fi
echo "======= ROS2 build selected ========"
fi

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 --network=host -f - --no-cache -t $USERNAME/$IMAGE:$COMPONENT_VERSION_STRING \
Dockerfile | docker build --network=host -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”` \
--build-arg ACCESS_ID=$access_id \
--build-arg SECRET_KEY=$secret_key .
--build-arg TOKEN=$token ../
else
docker build --network=host --no-cache -t $USERNAME/$IMAGE:$COMPONENT_VERSION_STRING \
docker build --network=host -f Dockerfile -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”` \
--build-arg ACCESS_ID=$access_id \
--build-arg SECRET_KEY=$secret_key .
--build-arg TOKEN=$token ../
fi

TAGS=()
Expand Down
Loading
Loading