OpenCDA自动驾驶仿真平台新选项?
OpenCDA会不会成为自动驾驶仿真软件新的选项?关于OpenCDAOpenCDAOpenCDA为什么我觉得这个架构不错关于OpenCDAOpenCDAOpenCDA有关OpenCDAOpenCDAOpenCDA的内容请参考以下博客:详解自动驾驶仿真框架OpenCDA为什么我觉得这个架构不错1.开源,SUMOSUMOSUMO开源,CarlaCarlaCarla开源,成本对企业很重要,花小钱办大事谁
·
OpenCDA自动驾驶仿真平台新选项?
关于 O p e n C D A OpenCDA OpenCDA
有关
O
p
e
n
C
D
A
OpenCDA
OpenCDA的内容请参考以下2篇博客:
1. 详解自动驾驶仿真框架OpenCDA;
2. OpenCDA学习。
O p e n C D A OpenCDA OpenCDA优势
- S U M O SUMO SUMO和 C a r l a Carla Carla这两个软件本身是比较成熟的,在各自的软件上不用担心;
- 开源, S U M O SUMO SUMO开源, C a r l a Carla Carla开源,成本对企业很重要,花小钱办大事谁会拒绝,市场的商业软件太贵, P r e s c a n Prescan Prescan、 C a r m a k e r / T r u c k m a k e r Carmaker/Truckmaker Carmaker/Truckmaker、 V T D VTD VTD的价格对小公司来说价格太高了,做 H I L HIL HIL更贵了,开源是趋势, 51 s i m o n e 51 simone 51simone也宣布开源(部分开源,核心模块不开源)了;
- 感知、规划和控制的仿真,规划被认为是最适合用来做仿真的模块,控制依赖车辆模型,感知依赖传感器,这些模拟的保真度相对难以把控,但是规划对他们的依赖相对较低,有地图定位还是可以做的; S U M O SUMO SUMO能提供交通流,符合规划的需求,很多工程师做强化学习就用它;
- C a r l a Carla Carla已经打通和 C a r s i m Carsim Carsim的数据流,这个架构具备可扩展性,规划和控制的仿真验证应该不成问题;
- O p e n C D A OpenCDA OpenCDA团队称希望能做 H I L HIL HIL,还会继续开发。
O p e n C D A OpenCDA OpenCDA缺点
- 集成 C a r l a Carla Carla的版本不是最新的,按文档里说得是 0.9.11 0.9.11 0.9.11和 0.9.12 0.9.12 0.9.12;
- 车辆动力学部分, C a r l a Carla Carla本身不是最新,我还不清楚能不能集成 C a r s i m Carsim Carsim版本(这一点确认了来更新)。
运行 O p e n C D A OpenCDA OpenCDA
- 在一个终端下启动 C a r l a Carla Carla模拟器
./carla/CARLA_0.9.11/CarlaUE4.sh
- 在另一个终端下启动 O p e n C D A OpenCDA OpenCDA
conda activate opencda
cd ~/OpenCDA
python opencda.py -t single_2lanefree_carla -v 0.9.11
The logic flow of conducting a scenario test in O p e n C D A OpenCDA OpenCDA
- Define the yaml file
description: |-
Copyright 2021 <UCLA Mobility Lab>
Author: Runsheng Xu <rxx3386@ucla.edu>
Content: This is the scenario testing configuration file for platooning joining and cooperative merge
at the customized 2lanefree simple version.
# define carla simulation setting
world:
sync_mode: true
client_port: 2000
fixed_delta_seconds: &delta 0.05
seed: 25
weather:
sun_altitude_angle: 15 # 90 is the midday and -90 is the midnight
cloudiness: 0 # 0 is the clean sky and 100 is the thickest cloud
precipitation: 0 # rain, 100 is the heaviest rain
precipitation_deposits: 0 # Determines the creation of puddles. Values range from 0 to 100, being 0 none at all and 100 a road completely capped with water.
wind_intensity: 0 # it will influence the rain
fog_density: 0 # fog thickness, 100 is the largest
fog_distance: 0 # Fog start distance. Values range from 0 to infinite.
fog_falloff: 0 # Density of the fog (as in specific mass) from 0 to infinity. The bigger the value, the more dense and heavy it will be, and the fog will reach smaller heights
wetness: 0
# First define the basic parameters of the vehicles
vehicle_base: &vehicle_base
sensing: &base_sensing
perception: &base_perception
activate: false # when not activated, objects positions will be retrieved from server directly
camera_visualize: 0 # how many camera images need to be visualized. 0 means no visualization for camera
camera_num: 0 # how many cameras are mounted on the vehicle. Maximum 3(frontal, left and right cameras)
lidar_visualize: false # whether to visualize lidar points using open3d
lidar: # lidar sensor configuration, check CARLA sensor reference for more details
channels: 32
range: 50
points_per_second: 100000
rotation_frequency: 20 # the simulation is 20 fps
upper_fov: 10.0
lower_fov: -30.0
dropoff_general_rate: 0.0
dropoff_intensity_limit: 1.0
dropoff_zero_intensity: 0.0
noise_stddev: 0.0
localization: &base_localize
activate: true # when not activated, ego position will be retrieved from server directly
dt: *delta # used for kalman filter
gnss: # gnss sensor configuration
noise_alt_stddev: 0.005
noise_lat_stddev: 2e-6
noise_lon_stddev: 2e-6
heading_direction_stddev: 0.1 # degree
speed_stddev: 0.2
debug_helper: &loc_debug_helper
show_animation: false # whether to show real-time trajectory plotting
x_scale: 10.0 # used to multiply with the x coordinate to make the error on x axis clearer
y_scale: 10.0 # used to multiply with the y coordinate to make the error on y axis clearer
behavior: &base_behavior
max_speed: 95 # maximum speed, km/h
tailgate_speed: 105 # when a vehicles needs to be close to another vehicle asap
speed_lim_dist: 3 # max_speed - speed_lim_dist = target speed
speed_decrease: 15 # used in car following mode to decrease speed for distance keeping
safety_time: 4 # ttc safety thresholding for decreasing speed
emergency_param: 0.4 # used to identify whether a emergency stop needed
ignore_traffic_light: true # whether to ignore traffic light
overtake_allowed: false # whether overtake allowed, typically false for platoon leader
collision_time_ahead: 1.3 # used for collision checking
sample_resolution: 4.5 # the unit distance between two adjacent waypoints in meter
overtake_counter_recover: 35 # the vehicle can not do another overtake during next certain steps
local_planner: &base_local_planner # trajectory planning related
buffer_size: 12 # waypoint buffer size
trajectory_update_freq: 15 # used to control trajectory points updating frequency
waypoint_update_freq: 9 # used to control waypoint updating frequency
min_dist: 3 # used to pop out the waypoints too close to current location
trajectory_dt: 0.25 # for every dt seconds, we sample a trajectory point from the trajectory path as next goal state
debug: false # whether to draw future/history waypoints
debug_trajectory: false # whether to draw the trajectory points and path
controller: &base_controller
type: pid_controller # this has to be exactly the same name as the controller py file
args: &control_args
lat:
k_p: 0.75
k_d: 0.02
k_i: 0.4
lon:
k_p: 0.37
k_d: 0.024
k_i: 0.032
dynamic: false # whether use dynamic pid setting
dt: *delta # this should be equal to your simulation time-step
max_brake: 1.0
max_throttle: 1.0
max_steering: 0.3
v2x: &base_v2x # comminuation related
enabled: true
communication_range: 35
loc_noise: 0.0
yaw_noise: 0.0
speed_noise: 0.0
lag: 0
# define the platoon basic characteristics
platoon_base: &platoon_base
max_capacity: 10
inter_gap: 0.6 # desired time gap
open_gap: 1.5 # open gap
warm_up_speed: 55 # required speed before cooperative merging
# define the background traffic control by carla
carla_traffic_manager:
sync_mode: true # has to be same as the world setting
global_distance: 4.0 # the minimum distance in meters that vehicles have to keep with the rest
# Sets the difference the vehicle's intended speed and its current speed limit.
# Carla default speed is 30 km/h, so -100 represents 60 km/h,
# and 20 represents 24 km/h
global_speed_perc: -300
set_osm_mode: true # Enables or disables the OSM mode.
auto_lane_change: false
random: false # whether to random select vehicles' color and model
vehicle_list:
- spawn_position: [-285, 8.3, 0.3, 0, 0, 0]
- spawn_position: [-310, 8.3, 0.3, 0, 0, 0]
- spawn_position: [-390, 8.3, 0.3, 0, 0, 0]
- spawn_position: [-320, 4.8, 0.3, 0, 0, 0]
vehicle_speed_perc: -200
- spawn_position: [-335, 4.8, 0.3, 0, 0, 0]
- spawn_position: [-360, 4.8, 0.3, 0, 0, 0]
- spawn_position: [-400, 4.8, 0.3, 0, 0, 0]
- spawn_position: [-410, 4.8, 0.3, 0, 0, 0]
# define scenario. In this scenario, a 4-vehicle platoon already exists.
scenario:
platoon_list:
- <<: *platoon_base
destination: [1000.372955, 8.3, 0.3]
members: # the first one is regarded as leader by default
- <<: *vehicle_base
spawn_position: [-350, 8.3, 0.3, 0, 0, 0] # x, y, z, roll, yaw, pitch
sensing:
<<: *base_sensing
perception:
<<: *base_perception
activate: false
camera_visualize: 1
camera_num: 1
lidar_visualize: true
platoon: # we need to add platoon specific params
<<: *platoon_base
behavior:
<<: *base_behavior
local_planner:
<<: *base_local_planner
debug_trajectory: true
debug: false
- <<: *vehicle_base
spawn_position: [-360, 8.3, 0.3, 0, 0, 0]
platoon: # we need to add platoon specific params
<<: *platoon_base
controller:
<<: *base_controller
args:
<<: *control_args
max_throttle: 1.0
- <<: *vehicle_base
spawn_position: [-370, 8.3, 0.3, 0, 0, 0]
platoon: # we need to add platoon specific params
<<: *platoon_base
args:
<<: *control_args
max_throttle: 1.0
- <<: *vehicle_base
spawn_position: [-380, 8.3, 0.3, 0, 0, 0]
platoon: # we need to add platoon specific params
<<: *platoon_base
args:
<<: *control_args
max_throttle: 1.0
single_cav_list: # this is for merging vehicle or single cav without v2x
- <<: *vehicle_base
spawn_position: [-380, 4.8, 0.3, 0, 0, 0]
# when this is defined, the above parameter will be ignored, and a special map function will
# be used to define the spawn position based on the argument
spawn_special: [0.625]
destination: [300, 12.0, 0]
sensing:
<<: *base_sensing
perception:
<<: *base_perception
activate: false
camera_visualize: 1
camera_num: 1
lidar_visualize: true
localization:
<<: *base_localize
debug_helper:
<<: *loc_debug_helper
v2x:
<<: *base_v2x
communication_range: 35
platoon: # we need to add platoon specific params
<<: *platoon_base
behavior:
<<: *base_behavior
overtake_allowed: true
local_planner:
<<: *base_local_planner
debug_trajectory: true
debug: false
- Construct scenario (Co-Simulation)/Construct scenario (CARLA only)
- Execute a single step
- Keep the simulation loop running
- Evaluation
开放原子开发者工作坊旨在鼓励更多人参与开源活动,与志同道合的开发者们相互交流开发经验、分享开发心得、获取前沿技术趋势。工作坊有多种形式的开发者活动,如meetup、训练营等,主打技术交流,干货满满,真诚地邀请各位开发者共同参与!
更多推荐
已为社区贡献3条内容
所有评论(0)