Configuration
Scenario Configuration Overview
The general scenario config files, such as demo.yaml, define various parameters for the simulation. Below is a detailed explanation of each item:
common_params
Purpose: Defines common parameters shared across all modules.
Modules:
common_paramThe basic version of parameters.common_params_edge_onParameters for edge units being activated.
vehicle_perception
Purpose: Configures how the vehicle perceives its environment.
Modules:
perception_falseObject positions are retrieved directly from the server.perception_trueObject positions are retrieved through perception.
vehicle_localization
Purpose: Manages vehicle localization for determining its precise position.
Modules:
localization_falseEgo position is retrieved from the server.localization_trueEgo position is retrieved via localization algorithms.
game_map
Purpose: Controls the traffic map state.
Modules:
map_activatedActivates the traffic map.map_deactivatedDeactivates the traffic map.
behavior
Purpose: Configures vehicle behavior, including planning and maximum speed.
Modules:
behavior_defaultEnables automated planning for vehicles.behavior_demo_manualUses manually provided trajectories from files.behavior_scenarioConfigures the behavior for OpenScenario.
controller
Purpose: Handles vehicle control based on the planned trajectory.
Modules:
pid_controllerUses a PID controller for vehicle movement.
traffic_manager
Purpose: Manages interactions with traffic, including lane changes and traffic light rules.
Modules:
lane_change_falseDisables automatic lane changes.lane_change_trueEnables automatic lane changes.
scenario
Purpose: Defines testing scenarios with pre-defined destinations and perception info.
Modules:
The name should be consistent with the name of the scenario.
Behavior Configuration
The behavior config files, such as behavior_coop_perception.yaml, specify detailed configurations for vehicle behavior and planning.
is_manuallySpecifies if the behavior is manual (Falsefor automated).max_speedMaximum vehicle speed in km/h.tailgate_speedSpeed for approaching another vehicle ASAP.max_speed_marginMargin for calculating the target speed (max_speed - margin).speed_decreaseSpeed reduction during car-following mode for distance keeping.safety_timeTime-to-collision (TTC) threshold for reducing speed.emergency_paramThreshold for initiating an emergency stop.ignore_traffic_lightAllows ignoring traffic lights.overtake_allowedIndicates if overtaking is allowed.collision_time_aheadTime for collision checking.overtake_counter_recoverCooldown period for overtaking.sample_resolutionDistance between two waypoints.buffer_sizeNumber of waypoints in the planning buffer.trajectory_update_freqFrequency of trajectory point updates.trajectory_sample_horizonTime horizon for trajectory sampling.global_route_update_freqFrequency for updating the global route.trajectory_dtTime step for sampling trajectory points.min_distMinimum distance to remove close waypoints.debugEnables visual debugging of waypoints.debug_trajectoryEnables visual debugging of trajectory points and paths.
Controller Configuration
The controller config details the parameters for PID controller.
controller.typeSpecifies the controller type. Supported:PID.controller.args.lat.k_pProportional gain for lateral control.controller.args.lat.k_dDerivative gain for lateral control.controller.args.lat.k_iIntegral gain for lateral control.controller.args.lon.k_pProportional gain for longitudinal control.controller.args.lon.k_dDerivative gain for longitudinal control.controller.args.lon.k_iIntegral gain for longitudinal control.controller.args.dtTime step for PID computation. Should matchfixed_delta_seconds.controller.args.max_brakeMaximum braking force (0 to 1.0).controller.args.max_throttleMaximum throttle force (0 to 1.0).controller.args.max_steeringMaximum steering angle in radians.controller.args.max_steering_rateMaximum rate of steering change.controller.args.time_intervalTime interval for applying control signals.
Localization Configuration
The localization configuration file contains settings for positioning and motion tracking of the ego vehicle, including GNSS-based localization and Kalman filter parameters.
localization.activateActivates localization. IfFalse, ego position is retrieved from the server.localization.dtTime step for Kalman filter. Matchesfixed_delta_seconds.localization.gnss.noise_alt_stddevStandard deviation of altitude noise in meters.localization.gnss.noise_lat_stddevStandard deviation of latitude noise in radians.localization.gnss.noise_lon_stddevStandard deviation of longitude noise in radians.localization.gnss.heading_direction_stddevStandard deviation of heading noise in degrees.localization.gnss.speed_stddevStandard deviation of speed noise in m/s.localization.debug_helper.show_animationEnables real-time trajectory visualization.localization.debug_helper.x_scaleMultiplier for x-coordinate visualization.localization.debug_helper.y_scaleMultiplier for y-coordinate visualization.
Map Configuration
The map config defines the settings for the road map visualization.
game_map.pixels_per_meterNumber of pixels per meter in the map raster.game_map.raster_sizeRaster dimensions in pixels [width, height].game_map.lane_sample_resolutionDistance between sampled waypoints along a lane.game_map.visualizeEnables visualization of the map.game_map.activateActivates the map for planning and visualization.
Perception Configuration
The perception configuration file sets parameters for sensing, including cameras, LiDAR, and the YOLO model for object detection.
perception.activateEnables perception module. IfFalse, uses oracle data.perception.modelPerception model type (e.g.,yolo).perception.camera.visualizeNumber of camera images to visualize (0 for none).perception.camera.numNumber of cameras mounted (up to 3: frontal, left, and right).perception.lidar.visualizeEnables LIDAR visualization using Open3D.perception.lidar.channelsNumber of LIDAR channels.perception.lidar.rangeMaximum range of LIDAR in meters.perception.lidar.points_per_secondNumber of points emitted per second.perception.lidar.rotation_frequencyLIDAR rotation frequency in Hz.perception.lidar.upper_fovUpper field-of-view limit in degrees.perception.lidar.lower_fovLower field-of-view limit in degrees.perception.lidar.dropoff_general_rateGeneral drop-off rate for point intensity.perception.lidar.dropoff_intensity_limitMinimum intensity before dropping points.perception.lidar.dropoff_zero_intensityIntensity value treated as zero.perception.lidar.noise_stddevStandard deviation of noise in LIDAR measurements.
Traffic Manager Configuration
The traffic manager configuration file controls the background vehicles, including speed adjustments, range of traffic flow, and lane-changing policies.
carla_traffic_manager.sync_modeSynchronizes with the world setting.carla_traffic_manager.deterministic_modeEnables deterministic behavior for repeatability.carla_traffic_manager.deterministic_seedSeed value for deterministic mode.carla_traffic_manager.global_distanceMinimum distance in meters to maintain between vehicles.carla_traffic_manager.global_speed_percSpeed adjustment relative to the default speed.carla_traffic_manager.set_osm_modeEnables OpenStreetMap (OSM) mode for navigation.carla_traffic_manager.auto_lane_changeAllows automatic lane changes. Set toFalsein this configuration.carla_traffic_manager.randomRandomizes vehicle colors and models.carla_traffic_manager.ignore_lights_percentagePercentage of vehicles ignoring traffic lights.carla_traffic_manager.vehicle_listDefines vehicles for simulation (can be a list or number).carla_traffic_manager.rangeVehicle spawn range:[x_min, x_max, y_min, y_max, x_step, y_step].
World Settings
The world configuration file defines the environmental and simulation settings, including rendering, weather, and randomness.
world.sync_modeEnables synchronization mode for the world.world.client_hostHostname or IP address of the CARLA client (default:localhost).world.client_portPort number for the CARLA client connection (default:2000).world.no_rendering_modeDisables rendering to improve simulation performance.world.fixed_delta_secondsFixed time step for the simulation in seconds.world.seedRandom seed for reproducibility.world.weather.sun_altitude_angleSun altitude angle in degrees.90is midday, and-90is midnight.world.weather.cloudinessCloud cover percentage.0represents a clear sky, and100represents thick clouds.world.weather.precipitationRain intensity percentage.0means no rain, and100means the heaviest rain.world.weather.precipitation_depositsAmount of water puddles created on the road.0represents no puddles, and100represents roads completely covered with water.world.weather.wind_intensityWind intensity percentage, influencing the behavior of rain.0means no wind.world.weather.fog_densityThickness of the fog.100is the thickest fog.world.weather.fog_distanceDistance in meters at which fog begins.0means fog starts immediately.world.weather.fog_falloffDensity of the fog. Higher values make the fog denser and heavier, limiting its height.world.weather.wetnessWetness level of the environment.0means completely dry conditions.