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

Handling vehicle section transfers #7

Open
CarlinLiao opened this issue Feb 6, 2021 · 0 comments
Open

Handling vehicle section transfers #7

CarlinLiao opened this issue Feb 6, 2021 · 0 comments
Assignees

Comments

@CarlinLiao
Copy link
Member

https://github.com/spartalab/aimsim/blob/56e9beaeb158b0c045f117e3b44f2c7421879659/aimsim/endpoints/remover.py#L55-L58

From #2 (comment)

@ribsthakkar

How are you going to handle if the section is not the center, do you just reject the transfer. I am not sure I am understanding this segementation of vehicles just yet.

@CarlinLiao

The remover ignores the transfer if it's the front of the vehicle.
The remover returns the vehicle to the simulator if it's the center, since it can't update the position. (On the road, when it passes a vehicle center to a remover, it deletes the vehicle from its own scope even though it hasn't passed the rear on yet. This is kind of hacky but vehicles' positions are updated by their centers but the remover doesn't have a trajectory to use for this, so whatever.)
The remover should never see a vehicle rear.

@ribsthakkar

I am still not sure if I am understanding. The three cases you said make it seem like the remover does nothing with any section of the vehicle.

@CarlinLiao

The remover doesn't actually do any removing... (maybe this is a bad name). The road removes the vehicle from its internal list itself once a vehicle's center section exits the road (because vehicle positions are based on its center).

When a vehicle section exits a road, the road passes the section to the remover. The remover reports that the vehicle exited to the parent simulator iff the section it gets is the center, and the simulator logs the vehicle's time in the sim.

I can see how this is confusing. Will have to think more about it. The general idea is that the road notices when a vehicle or vehicle section has left its domain and transfers it to the downstream object, which has to figure out what to do with it. In the the Remover's case, it decides whether to report the vehicle as "exited" to the parent simulator.

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