Skip to content

Commit

Permalink
Merge release/lavida (4.5.0) branch into master (#213)
Browse files Browse the repository at this point in the history
<!-- Thanks for the contribution, this is awesome. -->

# PR Details
## Description

<!--- Describe your changes in detail -->

## Related GitHub Issue

<!--- This project only accepts pull requests related to open GitHub
issues or Jira Keys -->
<!--- If suggesting a new feature or change, please discuss it in an
issue first -->
<!--- If fixing a bug, there should be an issue describing it with steps
to reproduce -->
<!--- Please DO NOT name partially fixed issues, instead open an issue
specific to this fix -->
<!--- Please link to the issue here: -->

## Related Jira Key

<!-- e.g. CAR-123 -->

## Motivation and Context

<!--- Why is this change required? What problem does it solve? -->

## How Has This Been Tested?

<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, and the tests you ran
to -->
<!--- see how your change affects other areas of the code, etc. -->

## Types of changes

<!--- What types of changes does your code introduce? Put an `x` in all
the boxes that apply: -->

- [ ] Defect fix (non-breaking change that fixes an issue)
- [ ] New feature (non-breaking change that adds functionality)
- [ ] Breaking change (fix or feature that cause existing functionality
to change)

## Checklist:

<!--- Go over all the following points, and put an `x` in all the boxes
that apply. -->
<!--- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->

- [ ] I have added any new packages to the sonar-scanner.properties file
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [ ] I have read the
[**CONTRIBUTING**](https://github.com/usdot-fhwa-stol/carma-platform/blob/develop/Contributing.md)
document.
- [ ] I have added tests to cover my changes.
- [ ] All new and existing tests passed.
@MishkaMN
  • Loading branch information
MishkaMN authored Apr 11, 2024
2 parents b551857 + 5e71278 commit 0a2f83b
Show file tree
Hide file tree
Showing 103 changed files with 4,850 additions and 1,670 deletions.
19 changes: 16 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,34 @@
name: "CI: Run tests"
on:
pull_request:
types: [opened, synchronize, reopened]
push:
branches:
- develop
- master
- "release/*"
jobs:
sonar: # sonar job is to setup and run sonar scan analysis on telematic cloud messaging code
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
- name: Set up JDK 11 (Default) and 17 (Sonar)
uses: actions/setup-java@v3 # The setup-java action provides the functionality for GitHub Actions runners for Downloading and setting up a requested version of Java
with:
java-version: 11
# Last java version is default and set for JAVA_HOME
java-version: |
17
11
distribution: "temurin"
- name: Build and analyze
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
# Build and package application using Java 8
# Run sonar plugin using Java 17
run: |
cd co-simulation
mvn -e -X clean org.jacoco:jacoco-maven-plugin:prepare-agent package sonar:sonar -Dlicense.skip -Dmaven.test.failure.ignore=false -Pcoverage jacoco:report -Dsonar.projectKey=usdot-fhwa-stol_carma-simulation -Dsonar.projectName=carma-simulation -Dsonar.organization=usdot-fhwa-stol -Dsonar.host.url=https://sonarcloud.io
export JAVA_HOME=$JAVA_HOME_11_X64
mvn -e -X clean org.jacoco:jacoco-maven-plugin:prepare-agent package -Dlicense.skip -Dmaven.test.failure.ignore=false -Pcoverage jacoco:report
export JAVA_HOME=$JAVA_HOME_17_X64
mvn sonar:sonar -Dsonar.java.jdkHome=${JAVA_17_X64} -Dsonar.projectKey=usdot-fhwa-stol_carma-simulation -Dsonar.projectName=carma-simulation -Dsonar.organization=usdot-fhwa-stol -Dsonar.host.url=https://sonarcloud.io
7 changes: 1 addition & 6 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
name: Docker build

on:
push:
branches-ignore:
- "develop"
- "release/*"
pull_request:
types: [opened, synchronize, reopened]
types: [opened, synchronize, reopened]

jobs:
docker:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/dockerhub.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
name: Docker Hub build

on:
push:
branches:
- "develop"
- "master"
- "release/*"
tags:
- "carma-system-*"

jobs:
dockerhub:
Expand Down
39 changes: 0 additions & 39 deletions .sonarqube/sonar-scanner.properties

This file was deleted.

5 changes: 4 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,15 @@ RUN sed -i 's|http://archive.ubuntu.com|http://us.archive.ubuntu.com|g' /etc/apt
RUN apt-get update && apt-get install -y sudo
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
RUN adduser $SUMO_USER sudo --disabled-password
COPY docker/ /home/carma/src/docker

RUN /home/carma/src/docker/install_dependencies.sh

COPY --chown=carma:carma . /home/carma/src
USER carma
WORKDIR /home/carma/src
COPY --chown=carma:carma docker/env.sh /home/carma/.base-image/
RUN docker/install.sh
RUN docker/build.sh

ENTRYPOINT [ "/home/carma/src/docker/entrypoint.sh" ]
CMD [ "mosaic.sh", "-s", "Tiergarten" ]
32 changes: 32 additions & 0 deletions co-simulation/NOTICE-THIRD-PARTY.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,30 @@ Apache Commons Text (1.6)
* Source: https://git-wip-us.apache.org/repos/asf?p=commons-text


Apache WebServices Common Utilities (1.0.2)

* License: The Apache Software License, Version 2.0
* Maven artifact: `org.apache.ws.commons.util:ws-commons-util:1.0.2`
* Project: http://ws.apache.org/commons/util
* Source: https://svn.apache.org/viewcvs.cgi/webservices/commons/trunk/util


Apache XML-RPC Client Library (3.1.3)

* License: The Apache Software License, Version 2.0
* Maven artifact: `org.apache.xmlrpc:xmlrpc-client:3.1.3`
* Project: http://ws.apache.org/xmlrpc/xmlrpc-client/
* Source: https://svn.apache.org/viewvc/webservices/xmlrpc/tags/xmlrpc-3.1.3/xmlrpc-client


Apache XML-RPC Common Library (3.1.3)

* License: The Apache Software License, Version 2.0
* Maven artifact: `org.apache.xmlrpc:xmlrpc-common:3.1.3`
* Project: http://ws.apache.org/xmlrpc/xmlrpc-common/
* Source: https://svn.apache.org/viewvc/webservices/xmlrpc/tags/xmlrpc-3.1.3/xmlrpc-common


Commons Compiler (2.7.5)

* License: New BSD License
Expand Down Expand Up @@ -357,3 +381,11 @@ Woodstox (5.1.0)
* Source: https://github.com/FasterXML/woodstox


XML Commons External Components XML APIs (1.0.b2)

* License: The Apache Software License, Version 2.0
* Maven artifact: `xml-apis:xml-apis:1.0.b2`
* Project: http://xml.apache.org/commons/#external
* Source: https://svn.apache.org/viewvc/xml/commons/tags/xml-commons-1_0_b2


4 changes: 2 additions & 2 deletions co-simulation/bridge/carla_integration/bridge_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def _get_recommended_carla_blueprint(sumo_actor):
return random.choice(blueprints)

@staticmethod
def get_carla_blueprint(sumo_actor, sync_color=False):
def get_carla_blueprint(sumo_actor, sumo_id, sync_color=False):
"""
Returns an appropriate blueprint based on the received sumo actor.
"""
Expand Down Expand Up @@ -144,7 +144,7 @@ def get_carla_blueprint(sumo_actor, sync_color=False):
driver_id = random.choice(blueprint.get_attribute('driver_id').recommended_values)
blueprint.set_attribute('driver_id', driver_id)

blueprint.set_attribute('role_name', 'sumo_driver')
blueprint.set_attribute('role_name', sumo_id)

logging.debug(
'''[BridgeHelper] sumo vtype %s will be spawned in carla with the following attributes:
Expand Down
2 changes: 1 addition & 1 deletion co-simulation/bridge/carla_integration/synchronization.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def tick(self):
sumo_spawned_actors = self.sumo.spawned_actors - set(self.carla2sumo_ids.values())
for sumo_actor_id in sumo_spawned_actors:
sumo_actor = self.sumo.get_actor(sumo_actor_id)
carla_blueprint = BridgeHelper.get_carla_blueprint(sumo_actor, self.sync_vehicle_color)
carla_blueprint = BridgeHelper.get_carla_blueprint(sumo_actor, sumo_actor_id, self.sync_vehicle_color)
if carla_blueprint is not None:
carla_transform = BridgeHelper.get_carla_transform(sumo_actor.transform,
sumo_actor.extent)
Expand Down
2 changes: 1 addition & 1 deletion co-simulation/bundle/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<properties>
<maven.deploy.skip>true</maven.deploy.skip>
</properties>

<dependencies>
<!-- Core -->
<dependency>
Expand Down
7 changes: 7 additions & 0 deletions co-simulation/bundle/src/assembly/mosaic-bundle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -161,10 +161,17 @@
<include>com.carrotsearch:hppc</include>
<!-- [END] GraphHopper dependencies -->

<!-- [START] XmlRpc dependencies -->
<include>org.apache.xmlrpc:xmlrpc-client</include>
<include>org.apache.xmlrpc:xmlrpc-common</include>
<include>org.apache.ws.commons.util:ws-commons-util</include>
<!-- [END] XmlRpc dependencies -->

<include>com.jcraft:jsch</include>
<include>com.google.protobuf:protobuf-java</include>
<include>org.xerial:sqlite-jdbc</include>
<include>org.java-websocket:Java-WebSocket</include>

</includes>
</dependencySet>
</dependencySets>
Expand Down
28 changes: 14 additions & 14 deletions co-simulation/bundle/src/assembly/resources/etc/logback.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<property name="logDirectory" value="${logDirectory}"/>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<pattern>%date %-5level %logger{0} - %msg%n</pattern>
<pattern>%date %-5level %C{0}:%line - %msg%n</pattern>
</encoder>
</appender>
<appender name="STDOUT-Progress" class="ch.qos.logback.core.ConsoleAppender">
Expand All @@ -26,7 +26,7 @@
<charset>UTF-8</charset>
<file>${logDirectory}/MOSAIC.log</file>
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<pattern>%date %-5level %logger{0} - %msg%n</pattern>
<pattern>%date %-5level %C{0}:%line - %msg%n</pattern>
</encoder>
</appender>

Expand All @@ -35,15 +35,15 @@
<charset>UTF-8</charset>
<file>${logDirectory}/Mapping.log</file>
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<pattern>%date %-5level %logger{0} - %msg%n</pattern>
<pattern>%date %-5level %C{0}:%line - %msg%n</pattern>
</encoder>
</appender>

<appender name="ApplicationLog" class="ch.qos.logback.core.FileAppender">
<charset>UTF-8</charset>
<file>${logDirectory}/Application.log</file>
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<pattern>%date %-5level %logger{0} - %msg%n</pattern>
<pattern>%date %-5level %C{0}:%line - %msg%n</pattern>
</encoder>
</appender>
<appender name="ApplicationLogDelegation" class="ch.qos.logback.classic.sift.SiftingAppender">
Expand All @@ -67,71 +67,71 @@
<immediateFlush>true</immediateFlush>
<file>${logDirectory}/Navigation.log</file>
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<pattern>%date %-5level %logger{0} - %msg%n</pattern>
<pattern>%date %-5level %C{0}:%line - %msg%n</pattern>
</encoder>
</appender>
<appender name="TrafficLog" class="ch.qos.logback.core.FileAppender">
<charset>UTF-8</charset>
<file>${logDirectory}/Traffic.log</file>
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<pattern>%date %-5level %logger{0} - %msg%n</pattern>
<pattern>%date %-5level %C{0}:%line - %msg%n</pattern>
</encoder>
</appender>
<appender name="CarlaLog" class="ch.qos.logback.core.FileAppender">
<charset>UTF-8</charset>
<file>${logDirectory}/Carla.log</file>
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<pattern>%date %-5level %logger{0} - %msg%n</pattern>
<pattern>%date %-5level %C{0}:%line - %msg%n</pattern>
</encoder>
</appender>
<appender name="CarmaLog" class="ch.qos.logback.core.FileAppender">
<charset>UTF-8</charset>
<file>${logDirectory}/Carma.log</file>
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<pattern>%date %-5level %logger{0} - %msg%n</pattern>
<pattern>%date %-5level %C{0}:%line - %msg%n</pattern>
</encoder>
</appender>
<appender name="InfrastructureLog" class="ch.qos.logback.core.FileAppender">
<charset>UTF-8</charset>
<file>${logDirectory}/Infrastructure.log</file>
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<pattern>%date %-5level %logger{0} - %msg%n</pattern>
<pattern>%date %-5level %C{0}:%line - %msg%n</pattern>
</encoder>
</appender>
<appender name="EnvironmentLog" class="ch.qos.logback.core.FileAppender">
<charset>UTF-8</charset>
<file>${logDirectory}/Environment.log</file>
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<pattern>%date %-5level %logger{0} - %msg%n</pattern>
<pattern>%date %-5level %C{0}:%line - %msg%n</pattern>
</encoder>
</appender>
<appender name="CommunicationLog" class="ch.qos.logback.core.FileAppender">
<charset>UTF-8</charset>
<file>${logDirectory}/Communication.log</file>
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<pattern>%date %-5level %logger{0} - %msg%n</pattern>
<pattern>%date %-5level %C{0}:%line - %msg%n</pattern>
</encoder>
</appender>
<appender name="CommunicationDetailsLog" class="ch.qos.logback.core.FileAppender">
<file>${logDirectory}/CommunicationDetails.log</file>
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<pattern>%date %-5level %logger{0} - %msg%n</pattern>
<pattern>%date %-5level %C{0}:%line - %msg%n</pattern>
</encoder>
<append>false</append>
</appender>
<appender name="CellLog" class="ch.qos.logback.core.FileAppender">
<charset>UTF-8</charset>
<file>${logDirectory}/Cell.log</file>
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<pattern>%date %-5level %logger{0} - %msg%n</pattern>
<pattern>%date %-5level %C{0}:%line - %msg%n</pattern>
</encoder>
</appender>

<appender name="ActivityLog" class="ch.qos.logback.core.FileAppender">
<charset>UTF-8</charset>
<file>${logDirectory}/RuntimeEvents.csv</file>
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<pattern>%date %-5level %logger{0} [%thread] - %msg%n</pattern>
<pattern>%date %-5level %C{0}:%line [%thread] - %msg%n</pattern>
</encoder>
</appender>

Expand Down
9 changes: 6 additions & 3 deletions co-simulation/bundle/src/assembly/resources/etc/runtime.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@
"subscriptions": [
"CarlaTraciResponse",
"SimulationStepResponse",
"CarlaV2xMessageReception"
"CarlaV2xMessageReception",
"DetectorRegistration"
],
"javaClasspathEntries": []
},
Expand All @@ -63,7 +64,8 @@
"deploy": false,
"start": false,
"subscriptions": [
"V2xMessageReception"
"V2xMessageReception",
"VehicleUpdates"
],
"javaClasspathEntries": []
},
Expand Down Expand Up @@ -114,7 +116,8 @@
"deploy": false,
"start": false,
"subscriptions": [
"V2xMessageReception"
"V2xMessageReception",
"DetectedObjectInteraction"
],
"javaClasspathEntries": []
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,7 @@
"updateInterval": 100,
"carlaUE4Path": "/opt/carla/",
"bridgePath": "/opt/carma-simulation/scenarios/Town04/carla; bridge.sh",
"carlaConnectionPort": 8913
"carlaConnectionPort": 8913,
"carlaCDASimAdapterUrl":"http://172.2.0.5:8000/RPC2"

}
Loading

0 comments on commit 0a2f83b

Please sign in to comment.