Skip to content

zhen-liu-github/high_env_simulator

Repository files navigation

high_env_simulator

This repository is based on the Highway-env and aims to compare different lane change method's performances.

Catalog

Env config

The env distribution of the simulator will affect the mothod performance. And a good simulator shoule have a realistic env and can focus on difficult parts. Currently, speed distribution of ego car and obstacles, obstacles num, average distance between obstacles, lane num, lane change direction and so on.

Speed distribution

The speed of ego car and lane change window have a huge impact on lane change motion. A typically overall speed distribution is seems like the following.

speed distribution fig

Firstly, we sample ego speed and obs speed For each obs speed, we sampele the velocity from a narrow norm distribution with loc= scale =

A toy obstacles example with 30 overall obs speed

Obs num

The more obstacles, the more difficult to lane change. To ensure a relistic and difficult lane change scenario, we set obs num distribution

Average distance between obstacles

We set distance between adjacent obs according to their speeds and obs num.

Lane num

Currently we only consider 2 lane.

Lane change direction

Currently, we only consider lane change left.

Vehicle action

  • Increase velocity control accuracy and speed range.
  • Disable front obs lane change when ego car do a lane change.

Increase velocity control accuracy and speed range

For convenience, we use a MDP-Vehicle model with a specified discrete range of allowed target speeds which use a high leve which use a high level action. The action space consists of Faster, Slower, IDLE, Left lane change, Right lane change. And the discrete target speed is defined as , where . If the high-level action is "Faster", . The default For a accuracy speed control, we set

So, the default config has 2 target speed in average 10m/s, and current config has 6 target speed in average 10m/s.

And the target and real speed fig of above configs are shown as default target_real_v target_real_v

So, current config will may have a high variance and a low error due to the easy changeable target velocity. If we have a big difference between target and current speed, it will increase the comfort cost.

And the other config are setting as default as

Disable front obs lane change when ego car do a lane change

rule_based_1 12

All obstacles are IDMVehicle models and would lane change if a rear vehicle cut in its lane. And this motion will change the lane change scenario and are abnormal in relistic environment. So we disable the obstacle lane change motion if it is caused by ego car.

Control

Use a simple PP controler to control v and s.

Rule-based method

We construct rule-based methods according to window_selection.pdf. And the lane change time and success rate are shown as

obs_num sample num lane change time lane change success rate
1 4 3.25 100%
2 32 5.15 87.5%
3 108 5.46 90.74%
4 250 5.49 94%
5 271 5.50 92.62%
6 137 5.14 94.89%
7 51 5.42 94.12%
8 15 6.8 93.33%
9 4 2.90 100%
overall 874 5.46 92.67%

126/1000 crashed. 1 The yellow window is the target window with the minimum chasing window time.

issue:

  • Weak control capability
  • Trade-off between saftey-check and lat lane change motion.
  • No collision check
  • Chasing a different window with the lane change window which may cause a collision.

Data-driven

We construct a simple model to infer window confidence. The model structure is defined as :

Model structure

model structure data_driven

Feature

We only concat features of ego car and obs to get a 12-dimension window-feature including x, y, vx, vy, hx, hy. Currently, the model's results are not stable.

The yellow window is the target window with the highest window confidence and blue windows are all feasible lane change window. (The train dataset comes from rule-based window selection simulations.)

obs_num sample num lane change time lane change success rate
1 6 9.4 0.6667
2 27 6.58 0.4815
3 97 6.24 0.7112
4 257 5.3 0.7393
5 292 6.38 0.7192
6 139 7.18 0.61115
7 51 7.69 0.4792
8 7 6.67 0.4286
9 2 6 0.5
10 1 7 1
overall 879 6.78 0.7153
121/1000 crashed
  • Need feature engeering
  • Solve overfitting.
  • Wrong case analysis

Experiments

Selection of discrete target speed num.

We find rule based ego car has some abnormal motion, such as overshooting when chasing target window, stop due to lat motion. First, we think it may due to the week dynamic control. So we adjust discrete target speed num from 3 to 31, speed range (20, 30) to (0, 30). and design some comparative experiments.

Avoid collision.

target speed num git target_real_v fig
crashed case(7 target speed) target_speed_7 target_speed_3_small
normal case(61 target speed) data_driven_small episode_2_target_speed_31

Avoid stop due to a large heading.

target speed num git target and real speed fig
stop due to lat motion(7 target speed) target_speed_7 target_speed_3_small
normal case(61 target speed) data_driven_small episode_2_target_speed_31

So, increasing target speed num can improve real speed accuracy, but it also decrease real accelerate duo to the close target speed. It is the main reason which make the car overshooting in s when chasing the target window. A case is shown in the following.

target speed num git target and real speed fig
normal case(7 target speed) target_speed_7 target_speed_3_small
Overshooting(61 target speed) target_speed_61 target_speed_3_small

run script with rule-based window selection.

python model_test.py --type rule-based

run script with data-driven window selection.

python model_test.py --type data-driven

If you have any feedback or suggestions, feel free to contact me. slack: zhen.liu email: [email protected]

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published