HighwayEnv icon indicating copy to clipboard operation
HighwayEnv copied to clipboard

Questin about roundabout environment setup

Open lxjlu opened this issue 2 years ago • 2 comments

Hello, thanks for this repo! Some confusion about the roundabout environment setup. image This is the diagram as I understand it. However, the definition of the lane ["se", "ex", 0] is something like net.add_lane("se", "ex", CircularLane(center, radii[lane], np.deg2rad(90 - alpha), np.deg2rad(alpha), clockwise=False, line_types=line[lane])). This means the start point of the lane is at [8.13, 18.27](lane.position(0, 0), where I think should be where the lane of ["nx", "ee", 0]. Is there something wrong with my understanding of the whole environment design? Thanks

lxjlu avatar Jul 25 '22 10:07 lxjlu

Another explanation I can think of is this: image Then position calculation is corresponding, but the north-south direction is a bit weird

lxjlu avatar Jul 25 '22 10:07 lxjlu

Hi @lxjlu, your first post is absolutely correct, and the only subtility is that I am using the convention that the y axis is downwards (towards the south, here). So the position (8.13, 18.27) is indeed in the (se, ex) segment.

Sorry if that was confusing, I got used to this convention after working in the aerospace industry for a few years (see e.g. wikipedia)

eleurent avatar Jul 27 '22 08:07 eleurent