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

Consider traci.vehicle.openGap() method #4172

Closed
leoluecken opened this issue Jun 7, 2018 · 9 comments

Comments

@leoluecken
Copy link
Contributor

commented Jun 7, 2018

To create gaps for letting other vehicles join is a common task in cooperative maneuvering, whose implementation in TraCI-based applications could be supported by such a method.

Proposed signature: createGap(desiredGap, desiredSpeedDiff, maximumDecel, duration)

desiredGap: the space headway, which shall be established by the vehicle

desiredSpeedDiff: The difference to the leading vehicle's speed at which the gap shall be established, i.e. the growth rate v_leader-v_ego>0, for the gap

maximumDecel: the maximal deceleration, that the vehicle should apply to establish the desired speed difference

duration: The duration for which the advice shall be active

@namdre

This comment has been minimized.

Copy link
Contributor

commented Jun 7, 2018

maybe this should be part of simpla

@leoluecken

This comment has been minimized.

Copy link
Contributor Author

commented Jun 22, 2018

Within simpla some similar mechanisms exist (to enlarge a gap to a size that allows safe vType switching), but it is difficult to see how this could be imported into other scripts, such that it remains easy to use.
Simpla on the other hand could make use of such a TraCI function.

Do you have any aversions against incliding it in SUMO directly?

I think it has a lot of similarities with slowDown()...

@namdre

This comment has been minimized.

Copy link
Contributor

commented Jun 22, 2018

Aversion is too strong a word.
It's just that this gap creation is a complex manoevre that could be recreated with more basic traci commands. I conjecture that there is a large number of complex maneuvers and we do not want to support them all as top-level traci calls.
Adding them to a client side library does not raise the problem of unchecked API growth and this was my reason for suggesting simpla.
I realise that the client side library solution falls short in terms of language portability and maybe also in ease of use when using the functionality in other scripts.

In conclusion: if adding this to TraCI directly helps you, then please go ahead and implement it. It won't hurt.

@leoluecken

This comment has been minimized.

Copy link
Contributor Author

commented Jun 26, 2018

A Possible inclusion to simpla would need to create an object associated to the vehicle, because we need a state to track the maneuver progress, say a "simpla.GapCreator". It would need to get active every simstep and obtain the required information about the vehicle state. It could be a stepListener in itself.

@leoluecken leoluecken self-assigned this Jun 26, 2018

@namdre

This comment has been minimized.

Copy link
Contributor

commented Jun 26, 2018

Do you need the functionality in a current project or is this a nice-to-have feature?
Can you extrapolate regarding further functions of this kind?
The latter would help with deciding on the proper architecture.

@leoluecken

This comment has been minimized.

Copy link
Contributor Author

commented Jun 26, 2018

Already implemented, see 2df14eb

@leoluecken

This comment has been minimized.

Copy link
Contributor Author

commented Jun 28, 2018

Completed in a12569b

@leoluecken leoluecken closed this Jun 28, 2018

@leoluecken

This comment has been minimized.

Copy link
Contributor Author

commented Oct 30, 2018

This came up again in the context of using iTETRIS, where simpla is not accessible (since the iTETRIS uses the C++ interface).

I will implement a solution along the lines of slowDown() as creating a specific gap seems to be a pretty common task in control algorithms and may be of use to many people. I'll follow an approach to increase tau from the current value to a desired one gradually.

Requirements:

  • Allow to limit the braking rate imposed from the increase of tau.
  • Specify the rate for the interpolation from the initial to the new value of tau.
  • Specify the duration for which the new tau should be active (after the interpolation).
  • Switch back to the original tau after the specified duration.
  • Allow to interrupt/deactivate the process.
  • Increased headway should not be considered as safety constraint, as this would probably prevent other vehicles to use the opened gap for merging maneuvers.

@leoluecken leoluecken reopened this Oct 30, 2018

leoluecken added a commit that referenced this issue Oct 31, 2018

@leoluecken leoluecken changed the title Consider traci.vehicle.createGap() method Consider traci.vehicle.openGap() method Oct 31, 2018

leoluecken added a commit that referenced this issue Oct 31, 2018
@leoluecken

This comment has been minimized.

Copy link
Contributor Author

commented Oct 31, 2018

First working version done.

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.