Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

About Setting Up Multi-Lanes in an Intersection Environment #638

Open
yshichseu opened this issue Nov 27, 2024 · 3 comments
Open

About Setting Up Multi-Lanes in an Intersection Environment #638

yshichseu opened this issue Nov 27, 2024 · 3 comments

Comments

@yshichseu
Copy link

Dear Author,I am currently researching how to incorporate lane selection into an intersection environment. I aim to create a multi-lane environment where ego vehicle, upon reaching the stop line of an intersection, can choose a lane using reinforcement learning or numerical optimization methods to better reflect real-world vehicle behavior. I have noticed that the original environment appears to have predetermined vehicle paths. Do I need to modify the behavior of ego vehicle at a more fundamental level in the code? I would like to know if such modifications are feasible and seek your assistance. Thank you!

@eleurent
Copy link
Collaborator

eleurent commented Dec 1, 2024

here are the action types currently implemented:

  • DiscreteMetaAction: the vehicle follows a route composed of a sequence of road segment. So e.g. at an intersection, it will follow the direction given by its route (or if there is no route, choose randomly). However, if a road segment is made of multiple (parallel) lanes, within this road segment the agent gets to change lane (and it also chooses the velocity)
  • ContinuousAction: with this, the agent controls the steering wheel and gas pedal directly. (and DiscreteAction is a discretised version of this)

I don't know if DiscreteMetaAction is suitable for you or if you need something else. There is no action type that allows to e.g. choose which direction to follow at an intersection, if thats what you need you'll have to implement it.
The rationale for just supporting lane changes but not direction changes was that this type of high level decisions (route planning) is typically already done by tools like Google Maps, and I wanted to focus on the tactical level (how do you achieve the desired route)

@yshichseu
Copy link
Author

here are the action types currently implemented:

  • DiscreteMetaAction: the vehicle follows a route composed of a sequence of road segment. So e.g. at an intersection, it will follow the direction given by its route (or if there is no route, choose randomly). However, if a road segment is made of multiple (parallel) lanes, within this road segment the agent gets to change lane (and it also chooses the velocity)
  • ContinuousAction: with this, the agent controls the steering wheel and gas pedal directly. (and DiscreteAction is a discretised version of this)

I don't know if DiscreteMetaAction is suitable for you or if you need something else. There is no action type that allows to e.g. choose which direction to follow at an intersection, if thats what you need you'll have to implement it. The rationale for just supporting lane changes but not direction changes was that this type of high level decisions (route planning) is typically already done by tools like Google Maps, and I wanted to focus on the tactical level (how do you achieve the desired route)

Thank you for your response. The functionality I want to achieve is not about changing the vehicle's direction of travel. What I need is precisely lane-level decision-making. My understanding is that in an intersection scenario, if there are multiple parallel lanes in the same direction, choosing the appropriate lane when entering the intersection based on the current state might help avoid obstacles within the intersection. I would like to know if such functionality can be realized (I may have some misunderstandings about the code's functionality, please forgive me:)).

@eleurent
Copy link
Collaborator

eleurent commented Dec 1, 2024

Yes, this can be done with the DiscreteMetaAction, similarly to the highway-v0 env for example. You can take the intersection env and add more lanes to the road network.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants