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

Merge release/prowler (4.9.0) branch into master #255

Merged
merged 14 commits into from
Feb 14, 2025
Merged
Show file tree
Hide file tree
Changes from all 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
14 changes: 14 additions & 0 deletions .github/workflows/auto-merge-workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Auto Merge develop to develop-humble

on:
schedule:
- cron: '0 0 * * 1' # Weekly on Monday
workflow_dispatch:

jobs:
call-merge-workflow:
uses: usdot-fhwa-stol/actions/.github/workflows/auto-pr-merge.yml@main
with:
branch_from: develop
branch_to: develop-humble
notify_team: DevOps
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
working-directory: "/opt/carma/"
runs-on: ubuntu-latest
container:
image: ${{ needs.determine_docker_org_and_tag.outputs.docker_organization }}/carma-base:${{ needs.determine_docker_org_and_tag.outputs.docker_image_tag }}
image: usdotfhwastol/carma-base:carma-system-4.5.0
env:
INIT_ENV: "/home/carma/.base-image/init-env.sh"
ROS_2_ENV: "/opt/ros/foxy/setup.bash"
Expand Down Expand Up @@ -92,4 +92,4 @@ jobs:
uses: usdot-fhwa-stol/actions/sonar-scanner@main
with:
sonar-token: ${{ secrets.SONAR_TOKEN }}
working-dir: "/opt/carma/src/${{ github.event.repository.name }}"
working-dir: "/opt/carma/src/${{ github.event.repository.name }}"
11 changes: 4 additions & 7 deletions .github/workflows/dockerhub.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
with:
context: ./carma-messenger-ui/
push: true
tags: usdotfhwastol/carma-messenger-ui:${{ github.ref_name }}
tags: ${{ needs.determine_docker_org_and_tag.outputs.docker_organization }}/carma-messenger-ui:${{ github.ref_name }}
build-args: |
BUILD_DATE=${{ steps.docker-image-metadata.outcome.build_date }}
VCS_REF=${{ steps.docker-image-metadata.outcome.vcs_ref }}
Expand All @@ -54,7 +54,7 @@ jobs:
with:
context: ./carma-messenger-core/
push: true
tags: usdotfhwastol/carma-messenger-core:${{ github.ref_name }}
tags: ${{ needs.determine_docker_org_and_tag.outputs.docker_organization }}/carma-messenger-core:${{ github.ref_name }}
build-args: |
GIT_BRANCH=${{ github.ref_name }}
DOCKER_TAG=${{ needs.determine_docker_org_and_tag.outputs.docker_image_tag }}
Expand All @@ -68,7 +68,7 @@ jobs:
with:
context: ./carma-messenger-config/chevrolet_tahoe_2018/
push: true
tags: usdotfhwastol/carma-messenger-config:${{ github.ref_name }}-chevrolet_tahoe_2018
tags: ${{ needs.determine_docker_org_and_tag.outputs.docker_organization }}/carma-messenger-config:${{ github.ref_name }}-chevrolet_tahoe_2018
build-args: |
BUILD_DATE=${{ steps.docker-image-metadata.outcome.build_date }}
VCS_REF=${{ steps.docker-image-metadata.outcome.vcs_ref }}
Expand All @@ -79,11 +79,8 @@ jobs:
with:
context: ./carma-messenger-config/development/
push: true
tags: usdotfhwastol/carma-messenger-config:${{ github.ref_name }}-development
tags: ${{ needs.determine_docker_org_and_tag.outputs.docker_organization }}/carma-messenger-config:${{ github.ref_name }}-development
build-args: |
BUILD_DATE=${{ steps.docker-image-metadata.outcome.build_date }}
VCS_REF=${{ steps.docker-image-metadata.outcome.vcs_ref }}
VERSION=${{ steps.docker-image-metadata.outcome.version }}



2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ The development team would like to acknowledge the people who have made direct c
By contributing to the Federal Highway Administration (FHWA) Connected Automated Research Mobility Applications (CARMA), you agree that your contributions will be licensed under its Apache License 2.0 license. [CARMA License](https://github.com/usdot-fhwa-stol/CARMAPlatform/blob/develop/docs/License.md)

## Contact
Please click on the CARMA logo below to visit the Federal Highway Adminstration(FHWA) CARMA website.
Please click on the CARMA logo below to visit the Federal Highway Adminstration(FHWA) CARMA website. For more information, contact [email protected].

[![CARMA Image](https://raw.githubusercontent.com/usdot-fhwa-stol/CARMAPlatform/develop/docs/image/CARMA_icon.png)](https://highways.dot.gov/research/research-programs/operations/CARMA)

Expand Down
4 changes: 2 additions & 2 deletions carma-messenger-config/chevrolet_tahoe_2018/.env
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
DOCKER_ORG=usdotfhwastoldev
DOCKER_TAG=develop
DOCKER_ORG=usdotfhwastol
DOCKER_TAG=carma-system-4.9.0
12 changes: 6 additions & 6 deletions carma-messenger-config/chevrolet_tahoe_2018/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# Docker Compose Spec Version
services:
roscore:
image: ${DOCKER_ORG}/carma-base:${DOCKER_TAG}
image: usdotfhwastol/carma-base:carma-system-4.5.0
network_mode: host
container_name: roscore
volumes_from:
Expand All @@ -28,7 +28,7 @@ services:
command: roscore

ros1_bridge:
image: ${DOCKER_ORG}/carma-msgs:${DOCKER_TAG}
image: usdotfhwastol/carma-msgs:carma-system-4.5.0
network_mode: host
container_name: ros1_bridge
volumes_from:
Expand All @@ -40,7 +40,7 @@ services:
- /opt/carma/logs:/opt/carma/logs
- /opt/carma/.ros:/home/carma/.ros
# Use the dynamic_bridge instead of the parameter bridge as the number of topics is small enough to pose less of a latency issue
command: bash -c 'wait-for-it.sh localhost:11311 -- rosparam load /opt/carma/vehicle/config/bridge.yml && source ~/.base-image/workspace/install/setup.bash && ros2 run ros1_bridge dynamic_bridge --multi-threads'
command: bash -c 'wait-for-it localhost:11311 -- rosparam load /opt/carma/vehicle/config/bridge.yml && source ~/.base-image/workspace/install/setup.bash && ros2 run ros1_bridge dynamic_bridge --multi-threads'

messenger:
image: ${DOCKER_ORG}/carma-messenger-core:${DOCKER_TAG}
Expand All @@ -53,7 +53,7 @@ services:
volumes:
- /opt/carma/logs:/opt/carma/logs
- /opt/carma/.ros:/opt/carma/.ros
command: wait-for-it.sh localhost:11311 -- roslaunch /opt/carma/vehicle/config/carma-messenger-docker.launch
command: wait-for-it localhost:11311 -- roslaunch /opt/carma/vehicle/config/carma-messenger-docker.launch

messenger_ros2:
image: ${DOCKER_ORG}/carma-messenger-core:${DOCKER_TAG}
Expand All @@ -71,7 +71,7 @@ services:
command: bash -c 'source /opt/carma/install_ros2/setup.bash && ros2 launch /opt/carma/vehicle/config/carma-messenger-docker.launch.py'

cohda_dsrc_driver:
image: ${DOCKER_ORG}/carma-cohda-dsrc-driver:${DOCKER_TAG}
image: usdotfhwastol/carma-cohda-dsrc-driver:carma-system-4.5.0
container_name: carma-cohda-dsrc-driver
network_mode: host
volumes_from:
Expand All @@ -85,7 +85,7 @@ services:
command: bash -c 'source /opt/carma/install/setup.bash && ros2 launch /opt/carma/vehicle/config/drivers.launch.py drivers:=dsrc_driver'

torc-pinpoint-driver:
image: ${DOCKER_ORG}/carma-torc-pinpoint-driver:${DOCKER_TAG}
image: usdotfhwastol/carma-torc-pinpoint-driver:carma-system-4.5.0
container_name: carma-torc-pinpoint-driver
network_mode: host
volumes_from:
Expand Down
4 changes: 2 additions & 2 deletions carma-messenger-config/development/.env
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
DOCKER_ORG=usdotfhwastoldev
DOCKER_TAG=develop
DOCKER_ORG=usdotfhwastol
DOCKER_TAG=carma-system-4.9.0
12 changes: 6 additions & 6 deletions carma-messenger-config/development/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# Docker Compose Spec Version
services:
roscore:
image: ${DOCKER_ORG}/carma-base:${DOCKER_TAG}
image: usdotfhwastol/carma-base:carma-system-4.5.0
network_mode: host
container_name: roscore
volumes_from:
Expand All @@ -26,7 +26,7 @@ services:
command: roscore

ros1_bridge:
image: ${DOCKER_ORG}/carma-msgs:${DOCKER_TAG}
image: usdotfhwastol/carma-msgs:carma-system-4.5.0
network_mode: host
container_name: ros1_bridge
volumes_from:
Expand All @@ -37,7 +37,7 @@ services:
- /opt/carma/logs:/opt/carma/logs
- /opt/carma/.ros:/home/carma/.ros
# Use the dynamic_bridge instead of the parameter bridge as the number of topics is small enough to pose less of a latency issue
command: bash -c 'wait-for-it.sh localhost:11311 -- rosparam load /opt/carma/vehicle/config/bridge.yml && source ~/.base-image/workspace/install/setup.bash && ros2 run ros1_bridge dynamic_bridge --multi-threads'
command: bash -c 'wait-for-it localhost:11311 -- rosparam load /opt/carma/vehicle/config/bridge.yml && source ~/.base-image/workspace/install/setup.bash && ros2 run ros1_bridge dynamic_bridge --multi-threads'

messenger:
image: ${DOCKER_ORG}/carma-messenger-core:${DOCKER_TAG}
Expand All @@ -49,7 +49,7 @@ services:
- /opt/carma/logs:/opt/carma/logs
- /opt/carma/.ros:/opt/carma/.ros
- /opt/carma/vehicle:/opt/carma/vehicle
command: wait-for-it.sh localhost:11311 -- roslaunch /opt/carma/vehicle/config/carma-messenger-docker.launch
command: wait-for-it localhost:11311 -- roslaunch /opt/carma/vehicle/config/carma-messenger-docker.launch

messenger_ros2:
image: ${DOCKER_ORG}/carma-messenger-core:${DOCKER_TAG}
Expand All @@ -65,7 +65,7 @@ services:
command: bash -c 'source /opt/carma/install_ros2/setup.bash && ros2 launch /opt/carma/vehicle/config/carma-messenger-docker.launch.py'

cohda_dsrc_driver:
image: ${DOCKER_ORG}/carma-cohda-dsrc-driver:${DOCKER_TAG}
image: usdotfhwastol/carma-cohda-dsrc-driver:carma-system-4.5.0
container_name: carma-cohda-dsrc-driver
network_mode: host
volumes_from:
Expand All @@ -76,7 +76,7 @@ services:
command: bash -c 'source /opt/carma/install/setup.bash && ros2 launch /opt/carma/vehicle/config/drivers.launch.py drivers:=dsrc_driver'

torc-pinpoint-driver:
image: ${DOCKER_ORG}/carma-torc-pinpoint-driver:${DOCKER_TAG}
image: usdotfhwastol/carma-torc-pinpoint-driver:carma-system-4.5.0
container_name: carma-torc-pinpoint-driver
network_mode: host
volumes_from:
Expand Down
10 changes: 5 additions & 5 deletions carma-messenger-core/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations under
# the License.
ARG DOCKER_ORG="usdotfhwastoldev"
ARG DOCKER_TAG="develop"
FROM ${DOCKER_ORG}/carma-base:${DOCKER_TAG} as base_image
ARG DOCKER_ORG="usdotfhwastol"
ARG DOCKER_TAG="carma-system-4.9.0"
FROM usdotfhwastol/carma-base:carma-system-4.5.0 as base_image
FROM base_image as setup
ARG GIT_BRANCH="develop"
ARG GIT_BRANCH="carma-system-4.5.0"

RUN mkdir ~/src
COPY --chown=carma . /home/carma/src/
Expand Down Expand Up @@ -45,4 +45,4 @@ RUN sudo chmod -R +x /opt/carma/install

RUN pip install future

CMD [ "wait-for-it.sh", "localhost:11311", "--", "roslaunch", "carma-messenger", "carma-messenger.launch"]
CMD [ "wait-for-it", "localhost:11311", "--", "roslaunch", "carma-messenger", "carma-messenger.launch"]
3 changes: 1 addition & 2 deletions carma-messenger-core/carma-messenger/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,7 @@ else() # ROS 2


ament_auto_package(
INSTALL_TO_SHARE launch log-config scripts ui
INSTALL_TO_SHARE config launch log-config scripts ui
)

endif()

Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
## This file defines Quality of Service settings for subscribers created in rosbag2 recording.
## Topics defined here have multiple publishers with different QoS settings which may lead to the rosbag ignoring messages.
## The QoS settings defined here give the subscriber less restrictive settings, so all messages from the topic are retained.
/rosout:
history: keep_all
reliability: reliable
durability: volatile
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,15 @@ def generate_launch_description():
description = 'Path of folder on host PC containing route CSV file(s) that can be accessed by plugins'
)

# Launch ROS2 rosbag logging
ros2_rosbag_launch = GroupAction(
actions=[
IncludeLaunchDescription(
PythonLaunchDescriptionSource([ThisLaunchFileDir(), '/ros2_rosbag.launch.py']),
)
]
)

transform_group = GroupAction(
actions=[
PushRosNamespace(EnvironmentVariable('CARMA_TF_NS', default_value='/')),
Expand All @@ -58,7 +67,7 @@ def generate_launch_description():
actions=[
IncludeLaunchDescription(
PythonLaunchDescriptionSource([ThisLaunchFileDir(), '/message.launch.py']),
launch_arguments = {
launch_arguments = {
'configuration_delay' : [configuration_delay]
}.items()
),
Expand All @@ -69,7 +78,7 @@ def generate_launch_description():
actions=[
IncludeLaunchDescription(
PythonLaunchDescriptionSource([ThisLaunchFileDir(), '/plugins.launch.py']),
launch_arguments = {
launch_arguments = {
'configuration_delay' : [configuration_delay],
'route_file_folder' : route_file_folder
}.items()
Expand All @@ -93,9 +102,12 @@ def generate_launch_description():
]
)



return LaunchDescription([
declare_configuration_delay_arg,
declare_route_file_folder,
ros2_rosbag_launch,
transform_group,
v2x_group,
plugins_group,
Expand Down
4 changes: 2 additions & 2 deletions carma-messenger-core/carma-messenger/launch/plugins.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ def generate_launch_description():
{'--log-level' : GetLogLevel('emergency_response_vehicle_plugin', env_log_levels) }
],
remappings=[
("vehicle_pose", "position/gps_common_fix" ),
("velocity", "position/velocity" ),
("vehicle_pose", "hardware_interface/gps_common_fix" ),
("velocity", "hardware_interface/velocity" ),
("outgoing_bsm", "bsm_outbound")
],
parameters = [
Expand Down
56 changes: 56 additions & 0 deletions carma-messenger-core/carma-messenger/launch/ros2_rosbag.launch.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Copyright (C) 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.

from launch import LaunchDescription, LaunchContext
from launch_ros.actions import Node
from launch.actions import OpaqueFunction
from launch.substitutions import LaunchConfiguration
from launch.actions import DeclareLaunchArgument, ExecuteProcess
from launch.substitutions import PathJoinSubstitution
from launch_ros.substitutions import FindPackageShare

from datetime import datetime
import pathlib
import yaml

# This function is used to generate a command to record a ROS 2 rosbag that excludes topics
# topics as provided in the appropriate configuration file.
def record_ros2_rosbag(context: LaunchContext, rosbag2_qos_override_param_file):

overriding_qos_profiles = context.perform_substitution(rosbag2_qos_override_param_file)

proc = ExecuteProcess(
cmd=['ros2', 'bag', 'record', '-s', 'mcap', '--qos-profile-overrides-path', overriding_qos_profiles, '-o', '/opt/carma/logs/rosbag2_' + str(datetime.now().strftime('%Y-%m-%d_%H%M%S')), '-a'],
output='screen',
shell='true'
)

return [proc]


def generate_launch_description():
rosbag2_qos_override_param_file = LaunchConfiguration('rosbag2_qos_override_param_file')
declare_rosbag2_qos_override_param_file = DeclareLaunchArgument(
name='rosbag2_qos_override_param_file',
default_value = PathJoinSubstitution([
FindPackageShare('carma-messenger'),'config',
'rosbag2_qos_overrides.yaml'
]),
description = "Path to file containing rosbag2 override qos settings"
)

return LaunchDescription([
declare_rosbag2_qos_override_param_file,
OpaqueFunction(function=record_ros2_rosbag, args=[rosbag2_qos_override_param_file])
])
4 changes: 2 additions & 2 deletions carma-messenger-core/docker/checkout.bash
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@ while [[ $# -gt 0 ]]; do
esac
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
git clone https://github.com/usdot-fhwa-stol/carma-msgs.git ${dir}/src/CARMAMsgs --branch carma-system-4.5.0
git clone https://github.com/usdot-fhwa-stol/carma-utils.git ${dir}/src/CARMAUtils --branch carma-system-4.5.0

Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ namespace j2735_convertor
/**
* @brief Namespace responsible for converting j2735 style Geofence control messages to CARMA usable control messages
*
* Handles conversion between ControlMessages in the j2735_msgs and cav_msgs packages.
* Handles conversion between ControlMessages in the j2735_v2x_msgs and cav_msgs packages.
* Unit conversions and presence flags are also handled
*/
namespace geofence_control
{
////
// Convert j2735_msgs to cav_msgs
// Convert j2735_v2x_msgs to cav_msgs
////

/**
Expand Down Expand Up @@ -127,7 +127,7 @@ void convert(const j2735_v2x_msgs::msg::TrafficControlParams& in_msg, carma_v2x_
void convert(const j2735_v2x_msgs::msg::TrafficControlSchedule& in_msg, carma_v2x_msgs::msg::TrafficControlSchedule& out_msg);

////
// Convert cav_msgs to j2735_msgs
// Convert cav_msgs to j2735_v2x_msgs
////


Expand Down
Loading
Loading