Skip to content

Commit

Permalink
xil carma cloud config that platform works with UI (#359)
Browse files Browse the repository at this point in the history
<!-- Thanks for the contribution, this is awesome. -->

# PR Details
## Description
This PR adds following:
- added gitignore to ignore logs
- workzone speed value is set to 2mph in the location specified in the
readme
- reduced tactical plugins' aggresive downsampling to allow spline
fitting to generate trajectory for 2mph
- enabled UI (some values are not correct at the moment speed limit).
Applied speed, and active geofence area are being monitored in this use
case and they depict correct values.. Type `localhost` in the incognito
as usual to acces. No need to press on anything since it is automated.

![image](https://github.com/usdot-fhwa-stol/carma-config/assets/20613282/aa2cea08-7917-4141-ba00-64d95172e7dd)
- disabled some optional plugins to avoid the platform failing
intermittently due to an open issue that is out of scope for this
release.
- Tuned lci strategic plugin to start planning from appropriate distance
(not too early so the trajectory smoothing undermining the workzone, and
not too late for it successfully plan stopping at red light).
<!--- Describe your changes in detail -->

## Related Issue
https://usdot-carma.atlassian.net/browse/CXC-54
CXC-54 (we originally was intending to make it 10mph but clients
requested to use 2mph).
<!--- 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
xil carma cloud integration testing. Pre TRR. 
release miura.
<!--- Why is this change required? What problem does it solve? -->

## How Has This Been Tested?
sim pc 2
<!--- 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)
- [ ] 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! -->

- [X] I have added any new packages to the sonar-scanner.properties file
- [ ] 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)
- [X] I have added tests to cover my changes.
- [X] All new and existing tests passed.
  • Loading branch information
MishkaMN authored Jun 27, 2024
1 parent 67492c0 commit bf83ac2
Show file tree
Hide file tree
Showing 15 changed files with 765 additions and 19 deletions.
4 changes: 4 additions & 0 deletions xil_carma_cloud/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
**.log
**/logs/**
**/carla-recorder/
**/carla-sensor-lib/
2 changes: 1 addition & 1 deletion xil_carma_cloud/SubsystemControllerParams.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ guidance:
- /guidance/plugins/route_following_plugin
- /guidance/plugins/pure_pursuit_wrapper
- /guidance/plugins/inlanecruising_plugin
- /guidance/plugins/cooperative_lanechange
# - /guidance/plugins/cooperative_lanechange
auto_activated_plugins:
- /guidance/plugins/lci_strategic_plugin
- /guidance/plugins/intersection_transit_maneuvering
Expand Down
44 changes: 31 additions & 13 deletions xil_carma_cloud/carma.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,35 @@ CarmaJS.registerNamespace = function (namespace) {
CarmaJS.registerNamespace("CarmaJS.Config");

CarmaJS.Config = (function () {
//Private variables
var ip = '127.0.0.1';

//Private methods
//Creating functions to prevent access by reference to private variables
var getIP = function() {
return ip;
};

//Public API
return {
getIP: getIP
};
//Private variables
var ip = '172.5.0.4'; // carma_net_2
var refresh_interval = 30; //30 seconds
var ros_connect_wait = 5000; //5 miliseconds to wait for platform to launch and ros to connect.
var ros_connect_retry = 24; //# of times to wait. Total 2 minutes
var speed_limit = 30; //Default Speed Limit
//Private methods
//Creating functions to prevent access by reference to private variables
var getIP = function() {
return ip;
};
var getRefreshInterval = function(){
return refresh_interval;
};
var getRosConnectionWaitTime = function() {
return ros_connect_wait;
};
var getRosConnectionRetry = function() {
return ros_connect_retry;
};
var getSPEEDLIMIT = function() {
return speed_limit;
};
//Public API
return {
getIP: getIP,
getRefreshInterval: getRefreshInterval,
getRosConnectionWaitTime:getRosConnectionWaitTime,
getRosConnectionRetry:getRosConnectionRetry,
getSPEEDLIMIT: getSPEEDLIMIT
};
})();
2 changes: 1 addition & 1 deletion xil_carma_cloud/cdasim_config/.env
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ SIMULATION_MODE=TRUE
RMW_IMPLEMENTATION=rmw_fastrtps_cpp
#ROS Middleware implementation for AWS EC2 Instances
#RMW_IMPLEMENTATION=rmw_cyclonedds_cpp
VEHICLE_ENGAGE_DELAY='35'
VEHICLE_ENGAGE_DELAY='55' # allow enough time to ensure tsc_service is up
1 change: 1 addition & 0 deletions xil_carma_cloud/cdasim_config/carma/environment.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -544,6 +544,7 @@ def generate_launch_description():
)

return LaunchDescription([
# Turning off plugins that are not tested in this release
declare_vehicle_characteristics_param_file_arg,
declare_vehicle_config_param_file_arg,
declare_use_sim_time_arg,
Expand Down
6 changes: 3 additions & 3 deletions xil_carma_cloud/cdasim_config/carma/inlanecruising_config/parameters.yaml
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# The length of the trajectory in time domain, in seconds
trajectory_time_length: 6.0 # Trajectory length in seconds
curve_resample_step_size: 1.0 # Curve re-sampling step size in m
default_downsample_ratio: 18 # Amount to downsample input lanelet centerline data. Value corresponds to saving each nth point.
turn_downsample_ratio: 20 # Amount to downsample input lanelet centerline data on turns. Value corresponds to saving each nth point.
minimum_speed: 2.2352 # Minimum allowable speed in m/s
default_downsample_ratio: 4 # Amount to downsample input lanelet centerline data. Value corresponds to saving each nth point.
turn_downsample_ratio: 4 # Amount to downsample input lanelet centerline data on turns. Value corresponds to saving each nth point.
minimum_speed: 0.894 # Minimum allowable speed in m/s
# minimum_speed: 5.0 # Minimum allowable speed in m/s
speed_moving_average_window_size: 5 # Size of the window used in the moving average filter to smooth the output speeds
curvature_moving_average_window_size: 9 # Size of the window used in the moving average filter to smooth the computed curvature
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Double: multiplier to apply to the maximum allowable vehicle deceleration limit so we plan under our capabilities
vehicle_decel_limit_multiplier : 1.0

# Double: multiplier to apply to the maximum allowable vehicle acceleration limit so we plan under our capabilities
vehicle_accel_limit_multiplier : 1.0

# Double: The minimum distance in meters that the vehicle can be at before requiring a transition to the APPROACH state
min_approach_distance : 20.0

# Double: Downtrack distance until nearest intersection where the Trajectory Smoothing algorithm should activate
trajectory_smoothing_activation_distance: 40.0

# Double: A buffer infront of the stopping location which will still be considered a valid stop. Units in meters
stopping_location_buffer : 4.0

# Double: A buffer in seconds around the green phase which will reduce the phase length such that vehicle still considers it non-green
green_light_time_buffer : 0.5

# Double: Minimum allowable speed in trajectory smoothing algorithm m/s
algo_minimum_speed : 0.894

# Double: Safety multiplier (must be less than 1.0) of planned allowable vehicle deceleration to use when stopping. This new deceleration makes vehicle decelerate earlier distance.
# NOTE: Stacks on vehicle_decel_limit_multiplier and stopping uses max_decel; this distance is only used for calculating earlier downtrack
deceleration_fraction : 0.7

# Double: Desired distance to stop buffer in meters
desired_distance_to_stop_buffer : 1.0

# Double: The minimum period in seconds which a maneuver plan must cover if the plugin wishes to control the whole plan
min_maneuver_planning_period : 15.1

# Bool: If enable_carma_streets_connection is true when we want to allow carma streets functionality (UC3) and if its false that means we don't want to allow carma streets behaviour and will only use UC2 behaviour.
enable_carma_streets_connection : false

# Double: Mobility operation rate
mobility_rate : 10.0

# String: The name to use for this plugin during comminications with the arbitrator
strategic_plugin_name : lci_strategic_plugin

# String: The name of the tactical plugin to use for Lane Following trajectory planning
# This plugin is used to apply trajectory smoothing algorithm BEFORE entering the intersection if within activation distance
lane_following_plugin_name : light_controlled_intersection_tactical_plugin

# String: The name of the plugin to use for stop and wait trajectory planning
stop_and_wait_plugin_name : stop_and_wait_plugin

# String: The name of the plugin to use for intersection transit trajectory planning
# This plugin is used to travel INSIDE the intersection where there is no trajectory smoothing algorithm active
intersection_transit_plugin_name : intersection_transit_maneuvering
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Double: The gap in meters between points sampled from the lanelet centerlines for planning trajectory positions
# Units: m
centerline_sampling_spacing: 1.0

# Trajectory length in seconds
trajectory_time_length: 12.0

# Amount to downsample input lanelet centerline data. Value corresponds to saving each nth point.
default_downsample_ratio: 4

# Amount to downsample input lanelet centerline data on turns. Value corresponds to saving each nth point.
turn_downsample_ratio: 4

# Curve re-sampling step size in m
curve_resample_step_size: 1.0

# Size of the window used in the moving average filter to smooth the computed curvature
curvature_moving_average_window_size: 9

# Size of the window used in the moving average filter to smooth the output speeds
speed_moving_average_window_size: 5

# Number of meters behind the first maneuver that need to be included in points for curvature calculation
back_distance: 20.0

# Additional distance beyond ending downtrack to ensure sufficient points
buffer_ending_downtrack: 40.0

# Double: multiplier to apply to the maximum allowable vehicle deceleration limit so we plan under our capabilities
vehicle_decel_limit_multiplier : 1.0

# Double: multiplier to apply to the maximum allowable vehicle acceleration limit so we plan under our capabilities
vehicle_accel_limit_multiplier : 1.0

# Multiplier of lat_accel to bring the value under lat_accel
lat_accel_multiplier: 0.50

# Double: A buffer before of the stopping location which will still be considered a valid stop. Units in meters
stop_line_buffer : 2.0

# Double: Minimum allowable speed in m/s2.235
minimum_speed : 0.894

# Double: Distance from the nearest traffic light where the vehicle decides whether to run last successful trajectory or accept new one (in meters)
algorithm_evaluation_distance : 35.0

# Double: Period if scheduled entry time is within which the vehicle decides to run the last successful trajectory smoothing trajectory (in seconds)
algorithm_evaluation_period : 4.5
Loading

0 comments on commit bf83ac2

Please sign in to comment.