Farama-Foundation / HighwayEnv

A minimalist environment for decision-making in autonomous driving
https://highway-env.farama.org/
MIT License
2.48k stars 726 forks source link

Lane index of self-vehicles for merge-v0 and intersection-v0 #594

Open AHPUymhd opened 2 months ago

AHPUymhd commented 2 months ago

image The lane index of highway-v0 is shown in the figure . So what do the lane indexes of merge-v0 and intersection-v0 look like, and how do you get the index lanes where your own vehicle and other vehicles are located? image image

I would be very grateful for your reply! @eleurent

eleurent commented 2 months ago

"Lane indices" apply to "road segments" where all lanes are side by side and go in the same direction (this is the criterion to allow vehicles to do a lane change).

So in the intersection scene, no road qualifies: some lanes are side by side, but they don't go in the same direction.

In the merge scene: The top left rectangle is a road segment with two lanes (index 0,1), the bottom left rectangle has a single lane (index 0), and the right rectangle needs to be extended all the way to the top to describe the road segment with three lanes (0,1,2)