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

Voices/vug pilot2 #341

Open
wants to merge 11 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 5 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
39 changes: 39 additions & 0 deletions vug_pilot2/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# 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.


# GENERIC Template for CARMA Configuration Dockerfiles
# Do not invoke directly, symlink into configuration folders below and invoke from there

FROM busybox:latest

ARG BUILD_DATE="NULL"
ARG VERSION="NULL"
ARG VCS_REF="NULL"
ARG CONFIG_NAME="carma-config:unspecified"

LABEL org.label-schema.schema-version="1.0"
LABEL org.label-schema.name=${CONFIG_NAME}
LABEL org.label-schema.description="System configuration data for the CARMA Platform"
LABEL org.label-schema.vendor="Leidos"
LABEL org.label-schema.version=${VERSION}
LABEL org.label-schema.url="https://highways.dot.gov/research/research-programs/operations/CARMA"
LABEL org.label-schema.vcs-url="https://github.com/usdot-fhwa-stol/carma-config"
LABEL org.label-schema.vcs-ref=${VCS_REF}
LABEL org.label-schema.build-date=${BUILD_DATE}

ADD . /root/vehicle/config
VOLUME /opt/carma/vehicle/config

CMD cp /root/vehicle/config/* /opt/carma/vehicle/config
26 changes: 26 additions & 0 deletions vug_pilot2/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Anything In the Loop Vunerable Roaduser Use Case 1

## Introduction

This **CARMA Config** includes the docker-compose and configuration file setup for the **Anything In the Loop Vunerable Roaduser Use Case 1** scenario.

## Scenario Description

This CARMA Configuration Image creates a **AIL** (Anything-In-the-Loop) scenario which includes **CARLA**, **SUMO** , **NS3** (CV2X Model), a **Virtual Signal Controller**, **CARMA Streets** and **CARMA Platform**. The scenario configured in this CARMA Config image is meant to highlight the benefits of **Cooperative Perception** or **VRU** (Vulnerable Road User) safety. In this use case, infrastructure sensor infromation is shared with CDA (Cooperative Driving Automation) vehicles via the **SDSM**(J3224 Sensor Data Sharing Message). The scenario takes place in an intersection in **CARLA Town 4** and spawns 1 **CARMA Platform Vehicle** and 1 **CARMA Streets** instance deployed at an intesection. The vehicle attempts to take a left turn while a pedestrian, spawned by **CARLA ScenarioRunner** attempts to cross the street at a signalized intersection. Three large trucks obscure the pedestrian from vehicle's lidar sensor vision. An Infrastructure lidar sensor has an unobscructed view of the pedestrian and shares information with the vehicle via V2X message (SDSM). Using the shared information the vehicle is able to safely avoid the pedestrian.

![Alt text](docs/scenario_diagram.png)

## Simulators

| Simulator | Version |
| ----------- | ----------- |
| CARLA | 0.9.10 |
| SUMO | 1.15 |

## Deployment Instructions

Copy all files in the route_config directory to `/opt/carma/routes/`

### Locally Built Docker Images

The Virtual Signal Controller is built locally and currently only available to licenced users.
106 changes: 106 additions & 0 deletions vug_pilot2/SubsystemControllerParams.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
# This file contains configurations for the subsystem_controllers which manage the lifecycle of each individual subsystem
# For brevity the parameter descriptions are not provided here. The descriptions can be found in the default parameter files located
# in the subsystem_controllers parameter directory here: https://github.com/usdot-fhwa-stol/carma-platform/tree/develop/subsystem_controllers/config
# The parameters specified in this file override the parameters in the default parameter files.
# NOTE: Due to a limitation in ROS2 empty arrays in this file should be denoted with ['']
environment:
environment_perception_controller:
ros__parameters:
subsystem_namespace: /environment
required_subsystem_nodes: ['']
unmanaged_required_nodes:
- /hardware_interface/velodyne_lidar_driver_wrapper_node
full_subsystem_required: true
call_timeout_ms : 150000
service_timeout_ms : 20000

hardware_interface:
drivers_controller:
ros__parameters:
subsystem_namespace: /hardware_interface
required_subsystem_nodes: ['']
unmanaged_required_nodes: ['']
excluded_namespace_nodes:
- /hardware_interface/carla_lidar_driver
- /hardware_interface/carla_gnss_driver
ros1_required_drivers:
- /hardware_interface/carla_driver
ros1_camera_drivers:
- /hardware_interface/carla_camera_driver
full_subsystem_required: false
startup_duration: 60
required_driver_timeout: 30000.0 #ROS1 bridge dropping message depending on computer
call_timeout_ms : 150000
service_timeout_ms : 20000

message:
v2x_controller:
ros__parameters:
subsystem_namespace: /message
required_subsystem_nodes: ['']
unmanaged_required_nodes:
- /hardware_interface/dsrc_driver_node
full_subsystem_required: true
call_timeout_ms : 150000
service_timeout_ms : 20000

guidance:
guidance_controller:
ros__parameters:
subsystem_namespace: /guidance
required_subsystem_nodes: ['']
unmanaged_required_nodes: [''] # TODO add the controller driver once it is integrated with ROS2
full_subsystem_required: true
required_plugins:
- /guidance/plugins/route_following_plugin
- /guidance/plugins/pure_pursuit_wrapper
- /guidance/plugins/inlanecruising_plugin
auto_activated_plugins:
- /guidance/plugins/lci_strategic_plugin
- /guidance/plugins/intersection_transit_maneuvering
- /guidance/plugins/light_controlled_intersection_tactical_plugin
- /guidance/plugins/stop_and_wait_plugin
- /guidance/plugins/sci_strategic_plugin
- /guidance/plugins/stop_controlled_intersection_tactical_plugin
- /guidance/plugins/platoon_control_ihp
- /guidance/plugins/platoon_strategic_ihp_node
- /guidance/plugins/platooning_tactical_plugin_node
- /guidance/plugins/yield_plugin
ros2_initial_plugins:
- /guidance/plugins/inlanecruising_plugin
- /guidance/plugins/platoon_strategic_ihp_node
- /guidance/plugins/stop_and_wait_plugin
- /guidance/plugins/route_following_plugin
- /guidance/plugins/platooning_tactical_plugin_node
- /guidance/plugins/cooperative_lanechange
- /guidance/plugins/light_controlled_intersection_tactical_plugin
- /guidance/plugins/sci_strategic_plugin
- /guidance/plugins/stop_controlled_intersection_tactical_plugin
- /guidance/plugins/yield_plugin
- /guidance/plugins/pure_pursuit_wrapper
- /guidance/plugins/lci_strategic_plugin
- /guidance/plugins/intersection_transit_maneuvering
call_timeout_ms : 150000
service_timeout_ms : 20000


localization:
localization_controller:
ros__parameters:
subsystem_namespace: /localization
required_subsystem_nodes: ['']
unmanaged_required_nodes: ['']
full_subsystem_required: true
sensor_nodes:
- /hardware_interface/velodyne_lidar_driver_wrapper_node
# TODO update the fault map once ros2 gps is integrated
sensor_fault_map: '
{
"sensor_fault_map":
[
[0,0]
]
}
'
call_timeout_ms : 150000
service_timeout_ms : 20000
145 changes: 145 additions & 0 deletions vug_pilot2/VehicleConfigParams.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
# Defines the ros parameters which define the characteristics of this host vehicle configuration
# The value type field is used to indicate how the field should be set.
# Should it be treated as a measured value (Measured) or a desired behavior constraint (Desired)
use_sim_time: true
Copy link
Contributor

Choose a reason for hiding this comment

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

the wall time argument is missing. Could you also add the parameter to vru yaml file and set it false since it doesnt use wall time in its spat?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just added this

Copy link
Contributor

Choose a reason for hiding this comment

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

@adev4a
please remember to add to ail_vru_uc1_scenario folder and set it false otherwise cdasim would break down. I would even add to xil_cloud and telematics ones as well.


# String: Host vehicle make
# Value type: Measured
vehicle_make: 'greased'

# String: Host vehicle model
# Value type: Measured
vehicle_model: 'lightning'

# Integer: Host vehicle year
# Value type: Measured
# Units: Year
vehicle_year: 2019

# Double: Host vehicle length
# Value type: Measured
# Units: Meters
vehicle_length: 5.0

# Double: Host vehicle width
# Value type: Measured
# Units: Meters
vehicle_width: 3.0

# Double: Host vehicle height
# Value type: Measured
# Units: Meters
vehicle_height: 2.0

# Double: Distance from front axel to rear axel
# Value type: Measured
# Units: Meters
vehicle_wheel_base: 2.79

# Double: Radius of the tires
# Value type: Measured
# Units: Meters
vehicle_tire_radius: 0.39

# Int: The maximum duration that Plan Delegator will wait after calling a tactical plugin's trajectory planning service; if trajectory
# generation takes longer than this, then trajectory planning will immediately end for the current trajectory planning iteration.
# NOTE: It is highly desirable to maintain a timeout of 100 ms or less, but trajectory generation success cannot be guaranteed with this duration
# for tactical plugins (primarily cooperative_lanechange) in all test scenarios at this time.
# Units: Milliseconds
tactical_plugin_service_call_timeout: 300

# Activates object avoidance logics in trajectory planning plugins
# Units: Boolean
enable_object_avoidance: true

# Acceleration limit
# Value type: Desired
# Units: m/s^2
vehicle_acceleration_limit: 3.5

# Deceleration limit
# Value type: Desired
# Units: m/s^2
vehicle_deceleration_limit: 2.5

# Lateral Acceleration Limit
# Value type: Desired
# Units: m/s^2
vehicle_lateral_accel_limit: 3.5

# Lateral Jerk Limit
# Value type: Desired
# Units: m/s^3
vehicle_lateral_jerk_limit: 3.5

# Max curvature rate
# Value type: Desired
# Units: (m^-1) / s
vehicle_max_curvature_rate: 0.75

# Ratio relating the steering wheel angle and the tire position on the road
# Value type: Measured
# (radians of a full steering wheel rotation) / (radians of tires with the longitudinal axis under full steer)
vehicle_steering_gear_ratio: 16.863

# Maximum steering angle of the wheel relative to the vehicle centerline.
# Value type: Measured
# Unit: deg
vehicle_steer_lim_deg: 29.2

# steering dynamics time constant
# Value type: Measured
# Unit: s
vehicle_model_steer_tau : 0.3

# Parameter to enable configurable speed limit
# Value type: Desired
config_speed_limit: 11.0

# Vehicle Participation Type corresponding to the Lanelet2 participant type standards.
# Used for interpreting traffic rules in world model instances
vehicle_participant_type: "vehicle:car"

# Parameters to enable either ROS 1 or ROS 2 (or both) rosbag logging
use_ros1_rosbag: true
use_ros2_rosbag: false

# Topics to exclude from rosbag recording
exclude_default: true
excluded_default_topics:
- (.*)/received_messages
- (.*)/sent_messages
- (.*)/scan

exclude_lidar: true
excluded_lidar_topics:
- /detection/lidar_detector/objects
- /detection/lidar_detector/objects_markers
- /hardware_interface/lidar/points_raw
- /hardware_interface/camera/projection_matrix/detection/lidar_detector/cloud_clusters
- /environment/range_vision_fusion_01/detection/lidar_detector/objects
- /environment/detection/fusion_tools/objects
- /environment/detection/fusion_tools/objects_markers
- /environment/detection/object_tracker/objects
- /environment/detection/object_tracker/objects_markers
- /environment/detection/objects

exclude_camera: true
excluded_camera_topics:
- /hardware_interface/camera/camera_info
- /hardware_interface/camera/image_raw
- /hardware_interface/camera/image_rect
- /hardware_interface/camera/image_rects
- /hardware_interface/camera/projection_matrix/detection/lidar_detector/cloud_clusters
- /environment/range_vision_fusion_01/detection/image_detector/objects
- /environment/vision_beyond_track_01/detection/image_detector/objects
- /environment/detection/fusion_tools/objects
- /environment/detection/fusion_tools/objects_markers
- /environment/detection/object_tracker/objects
- /environment/detection/object_tracker/objects_markers
- /environment/detection/objects

exclude_can: false
excluded_can_topics:
- /hardware_interface/ds_fusion/can_bus_dbw/can_rx
- /hardware_interface/ds_fusion/can_bus_dbw/can_tx
Loading