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

retrieve lane change state when lane change mode is 0 #3810

Closed
michele-segata opened this issue Feb 13, 2018 · 3 comments

Comments

@michele-segata
Copy link

commented Feb 13, 2018

Hi all,
I've noticed than when setting lane change mode to 0 (to keep a vehicle in its current lane) the getLaneChangeState() API only returns whether the vehicle is blocked, but not whether the vehicle should change lane (speed gain / keep right) as the cancelRequest method changes the state to avoid the lane change (as requested by the lane change mode 0).
Is that possible to retrieve the decision computed by the lane change model even if this won't be applied?
Thanks!

@namdre

This comment has been minimized.

Copy link
Contributor

commented Feb 14, 2018

I see two ways to fix this:

  1. remember all the cancelled requests (somewhat tricky to implement)
  2. implement a new API that can retrieve the state for all possible motivations independent of each other (#3812) by calling the lane change model directly via TraCI (also quite a bit of implementation effort but potentially more useful)

Unfortunately, I don't think I'll have the time for either solution very soon.

@michele-segata

This comment has been minimized.

Copy link
Author

commented Feb 19, 2018

I was looking into option 1. I made some quick tests that seem to work, but maybe you'll immediately spot something wrong in this idea. What about having an additional state variable which stores the state independently from what cancelRequest() does? I wrote a very simple patch:

lc-state.txt

The patch still misses a TraCI query method (and probably changes to other LC models), but it is just to show you the idea.

namdre added a commit that referenced this issue Feb 26, 2018
@namdre namdre closed this in 3592e90 Feb 26, 2018
@namdre

This comment has been minimized.

Copy link
Contributor

commented Feb 26, 2018

I've used the idea from your patch for option 1.
The stateWithoutTraCI is now correctly returned as the first value of getLaneChangeState.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.