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

Lane direction is not taken into account #74

Open
hahne opened this issue May 22, 2023 · 3 comments
Open

Lane direction is not taken into account #74

hahne opened this issue May 22, 2023 · 3 comments
Labels
enhancement New feature or request

Comments

@hahne
Copy link

hahne commented May 22, 2023

Hi,

Thanks for the great work!

One question, is there a reason why the lane direction is not taken into account or am I missing something?

According to the OpenDRIVE standard, lanes are grouped in left and in right lanes:
<lanes> <laneSection s="0.0"> <left> <lane id="2" type="border" level="false"> <link> </link> <width sOffset="0.0" a="1.0" b="0.0" c="0.0" d="0.0"/> </lane> <lane id="1" type="driving" level="false"> <link> </link> <width sOffset="0.0" a="4.0" b="0.0" c="0.0" d="0.0"/> </lane> </left> <center> <lane id="0" type="none" level="false"> <link> </link> </lane> </center> <right> <lane id="-1" type="driving" level="false"> <link> </link> <width sOffset="0.0" a="4.0" b="0.0" c="0.0" d="0.0"/> </lane> <lane id="-2" type="border" level="false"> <link> </link> <width sOffset="0.0" a="1.0" b="0.0" c="0.0" d="0.0"/> </lane> </right> </laneSection> </lanes>

This tells you that the lane direction is equal to the center lane direction for for the lanes grouped under the -tag. But I don't see this information being available in libOpenDRIVE. Am I missing something?

I added it in my implementation. Can make a pull request if there's any interest.

Kind Regards,
Johannes

@pageldev
Copy link
Owner

Hi Johannes, thanks for the feedback!

Can you point me to the chapter in the OpenDrive format spec for the lane direction info? Not 100% sure what you mean.

@michikommader
Copy link
Contributor

michikommader commented Jun 23, 2023

As far as I always interpreted OpenDRIVE, lanes have their "direction" defined implicitly by their index and their road's rule attribute holding information about right-hand (RHT) or left-hand traffic (LHT):

Lanes -1, -2, etc. are defined as being right of the reference line geometry.

  • If rule == RHT, their direction is the same as the geometric direction of the reference line.
  • If rule == LHT, their direction is the opposite of the geometric direction of the reference line.

Lanes 1, 2, etc. are defined as being left of the reference line geometry.

  • If rule == RHT, their direction is the opposite of the geometric direction of the reference line.
  • If rule == LHT, their direction is the same as the geometric direction of the reference line.

Lane 0 is defined in direction of the course of the reference line geometry.

@pageldev
Copy link
Owner

Looks like the rule attribute was introduced in v1.45. When creating this project I targeted v1.4.

@pageldev pageldev added the enhancement New feature or request label Jun 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants