2D Highway Env (Pass Traffic)

This module is the setup for a vehicle performing lane-changing maneuvers. The goal is to travel as far as possible without crashing.

Note that this setup differs from the 1D-target example in that the demonstrations are provided by the python programs in python-gen (try running highway2d.py). Demonstrations will be placed into that folder automatically. As a result, the setup does not require filling out robotSets.h, a simulation ASP, a physics model, or their corresponding settings.

Try running the algorithm on the setup (or see snapshots/ for pre-acquired results).

The most useful/informative outputs will be:

We also show the behavior of the synthesized policy directly in the simulator.

Iteration 1:

Iteration 3:

Iteration 8:

We provide the observation model below:

step(action):
    target_acc = 0
    target_heading = 0

    if (action == FASTER)
        target_acc = 40 - v
        target_heading = atan((round(y) - y) / 30)
    else if (action == SLOWER)
        target_acc = v_front  - v
        target_heading = atan((round(y) - y) / 30)
    else if (action == LANE_LEFT)
        target_acc = 30 - v
        target_heading = -0.15
    else if (action == LANE_RIGHT)
        target_acc = 30 - v
        target_heading = 0.15
    
    if (target_heading - heading > steer)
        steer = min(steer + 0.04, target_heading - heading)
    else 
        steer = max(steer - 0.04, target_heading - heading)

    if (target_acc > acc)
        acc = min(target_acc, acc + 4)
    else
        acc = max(target_acc, acc - 6)