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

Update controller.py #185

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Bernicorn
Copy link

implemented the IDM longitudinal controller

@eleurent
Copy link
Collaborator

Hello Bernicorn,

I do not understand the purpose of this PR, since the IDM longitudinal controller is already implemented in https://github.com/eleurent/highway-env/blob/3ef36a0fb17f91769ecac9581206bd51cce41108/highway_env/vehicle/behavior.py#L12 which is a subclass of ControlledVehicle.

@Bernicorn
Copy link
Author

First of all i´m a beginner in python and programming. That was my first try to do this^^
Still three months ago, we talked about it in issue #133 and you asked about it to make a pull request. I´ve added the feature, that the controller is deactivated during the lanechange. Thats why i made this new function.
If the controller is activated during a lanechange, the controller protect the agent from an crash. If the agent will do any critical decisions, like an dangerous lanechange, he will get no penalty for it.

@eleurent
Copy link
Collaborator

eleurent commented Apr 29, 2021

Right, okay.
However, your proposed change results in duplicated code, which is not ideal.
I think that a better solution would be to propose a new ActionType, which uses the existing IDMVehicle behavioral model for the ego-vehicle, and executes lateral actions.

I'll propose an updated version

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

Successfully merging this pull request may close these issues.

None yet

2 participants