-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CDAR-593: Update to route configuration and naming (#328)
<!-- Thanks for the contribution, this is awesome. --> # PR Details ## Description CARMA Config changes to scenario names. Also added docker environment variables for scenario name and vehicle spawn point. Added stop_simulation script that pulls kafka logs before stopping simulation <!--- Describe your changes in detail --> ## Related Issue CDAR-593 <!--- This project only accepts pull requests related to open issues --> <!--- 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 link to the issue here: --> ## Motivation and Context Scenario configuration for verification testing <!--- Why is this change required? What problem does it solve? --> ## How Has This Been Tested? XIL Cloud deployment <!--- 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: --> - [x] Defect fix (non-breaking change that fixes an issue) - [x] 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 - [x] My change requires a change to the documentation. - [x] I have updated the documentation accordingly. - [x] I have read the **CONTRIBUTING** document. [CARMA Contributing Guide](https://github.com/usdot-fhwa-stol/carma-platform/blob/develop/Contributing.md) - [ ] I have added tests to cover my changes. - [ ] All new and existing tests passed. Tracking: @MishkaMN
- Loading branch information
1 parent
e9c33a4
commit 98f3cf9
Showing
11 changed files
with
78 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,16 @@ | ||
INFRASTRUCTURE_ID=rsu_1234 | ||
SIMULATION_MODE=true | ||
TIME_SYNC_TOPIC=time_sync | ||
TIME_SYNC_TOPIC=time_sync | ||
# North Destination | ||
VEHICLE_SELECTED_ROUTE=vru_uc1_north | ||
SIMULATION_SCENARIO="VulnerableRoadUserCollision_ThreeTrucks" | ||
|
||
## SCENARIOS CONFIGURATION ----------------------- | ||
# To switch between scenarios, simply uncomment the scenario | ||
# you would like to run and comment all other scenarios | ||
|
||
# SCENARIO: West to North left turn (A) | ||
VEHICLE_SPAWN_POINT="215.12,-169,0,0,0,0" | ||
|
||
# SCENARIO: South to North through (B) | ||
# VEHICLE_SPAWN_POINT="258.12,-125,0,0,0,90" |
2 changes: 2 additions & 0 deletions
2
ail_vru_uc1_scenario/cdasim_config/route_config/vru_uc1_north.csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
0.002321,0.0019849,0,DEST_1 | ||
0.0026284,0.0022296,0,vru_uc1_north |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/bash | ||
# Script to start simulation | ||
# Launches RViz | ||
# Prunes all previous Kafka volumes | ||
carma stop all | ||
|
||
export ROS_MASTER_URI=http://172.3.0.2:11311/ | ||
|
||
bash -c 'sleep 35 && rviz -d ~/carma_ws/src/carma-platform/carma/rviz/carma_default.rviz' & | ||
|
||
docker volume rm \ | ||
carma_kafka-datavolume \ | ||
carma_zookeeper-datavolume | ||
|
||
carma start all |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/bin/bash | ||
# Script to stop simulation. | ||
# Pulls all Kafka message data | ||
# Stops and removes all docker containers | ||
# Prunes all Kafka related volumes | ||
if ! [ -f /opt/carma-streets/scripts/collect_kafka_logs.py ] ; then | ||
echo "Installing collect_kafka_logs.py into /opt/carma-streets/scripts/ ...." | ||
wget -q https://raw.githubusercontent.com/usdot-fhwa-stol/carma-streets/release/lavida/collect_kafka_logs.py -P /opt/carma-streets/scripts | ||
fi | ||
filename=carma_streets_kafka_"$(date +%F_%H-%M-%S)" | ||
echo "Collecting CARMA Streets Kafka messages into ${filename}.zip" | ||
python3 /opt/carma-streets/scripts/collect_kafka_logs.py --zip True "${filename}" | ||
echo "Stopping simulation ..." | ||
carma stop all | ||
# Kafka message volumes retain messages and consumer offsets from previous run | ||
# Clearing volumes avoids consumer offsets and messages from previous runs impacting | ||
# current scenario preformance. | ||
echo "Clearing CARMA Streets Kafka message volumes ..." | ||
docker volume rm \ | ||
carma_kafka-datavolume \ | ||
carma_zookeeper-datavolume |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.