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

Use correct develop ubuntu distro of stol-j2735 package #12

Merged
merged 3 commits into from
Feb 19, 2025
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
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
2 changes: 0 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ jobs:
else
echo git_branch="$GITHUB_REF_NAME" >> $GITHUB_OUTPUT
fi
- name: Install stol-j2735 package from STOL APT repo
run: ./src/${{ github.event.repository.name }}/docker/install_dependencies.sh
- name: Checkout dependencies
run: |
source "$INIT_ENV"
Expand Down
4 changes: 4 additions & 0 deletions docker/checkout.bash
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,7 @@ done
git clone https://github.com/usdot-fhwa-stol/carma-msgs.git ${dir}/src/CARMAMsgs --branch $BRANCH
git clone https://github.com/usdot-fhwa-stol/carma-utils.git ${dir}/src/CARMAUtils --branch $BRANCH

SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"

${SCRIPT_DIR}/install_dependencies.sh -b $BRANCH

50 changes: 45 additions & 5 deletions docker/install_dependencies.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,55 @@
#!/bin/sh
#!/bin/bash

# Copyright (C) 2018-2024 LEIDOS.
# 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.

# CARMA packages checkout script
# Optional argument to set the root checkout directory with no ending '/' default is '~'

# exit on errors
set -e

BRANCH=develop # The script will use this unless the -b flag updates it
while [[ $# -gt 0 ]]; do
arg="$1"
case $arg in
-b|--branch)
BRANCH=$2
shift
shift
;;
esac
done

# Get ubuntu distribution code name. All STOL APT debian packages are pushed to S3 bucket based on distribution codename.
. /etc/lsb-release

NO_UNDERSCORE_NAME=${BRANCH//_/-}
if [[ "${BRANCH}" =~ feature/.* ]]; then
APT_CODENAME=feature-${NO_UNDERSCORE_NAME##*/}
# check for release candidate branches
elif [[ "${BRANCH}" =~ release/.* ]]; then
APT_CODENAME=candidate-${NO_UNDERSCORE_NAME##*/}
# check for release tags
elif [[ "${BRANCH}" =~ carma-system* ]]; then
APT_CODENAME=main
elif [[ "${BRANCH}" =~ develop ]] ; then
APT_CODENAME="develop"
else
APT_CODENAME="develop"
fi
# add the STOL APT repository
echo "deb [trusted=yes] http://s3.amazonaws.com/stol-apt-repository ${DISTRIB_CODENAME} main" | sudo tee /etc/apt/sources.list.d/stol-apt-repository.list
echo "deb [trusted=yes] http://s3.amazonaws.com/stol-apt-repository ${APT_CODENAME} ${DISTRIB_CODENAME} " | sudo tee /etc/apt/sources.list.d/stol-apt-repository.list

sudo apt-get update

# install all things needed for deployment, always done
sudo apt-get install -y stol-j2735-1
sudo apt-get install -y stol-j2735-201603-carma-1
18 changes: 9 additions & 9 deletions ros-conversion/cpp_message/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ find_package(carma_cmake_common REQUIRED)
list(APPEND CMAKE_PREFIX_PATH "/opt/carma/cmake/")
set(CMAKE_INSTALL_RPATH "/opt/carma/lib")

find_package(stol-j2735 REQUIRED)
find_package(stol-j2735-201603-carma REQUIRED)

carma_check_ros_version(2)
carma_package()
Expand All @@ -37,12 +37,12 @@ set(node_exec cpp_message_node_exec)
set(node_lib cpp_message_node)

# Includes
include_directories(
include
)
link_directories(
/opt/carma/lib
)
# include_directories(
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we remove this commented out code?

# include
# )
# link_directories(
# /opt/carma/lib
# )

ament_export_include_directories(include)

Expand All @@ -62,12 +62,12 @@ ament_auto_add_library(${node_lib} SHARED
src/SDSM_Message.cpp
)

target_link_libraries(${node_lib} ::stol-j2735)
target_link_libraries(${node_lib} ::stol-j2735-201603-carma)
target_include_directories(${node_lib}
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>
/opt/carma/include/stol-j2735
/opt/carma/include/stol-j2735-201603-carma
)

ament_auto_add_executable(${node_exec}
Expand Down
3 changes: 1 addition & 2 deletions ros-conversion/cpp_message/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<depend>carma_ros2_utils</depend>
<depend>rclcpp_components</depend>

<depend>stol-j2735</depend>
<depend>stol-j2735-201603-carma</depend>

<depend>j2735_v2x_msgs</depend>
<depend>carma_v2x_msgs</depend>
Expand All @@ -40,7 +40,6 @@

<test_depend>ament_lint_auto</test_depend>
<test_depend>ament_cmake_gtest</test_depend>
<test_depend>stol-j2735</test_depend>

<exec_depend>launch</exec_depend>
<exec_depend>launch_ros</exec_depend>
Expand Down