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

Spiral KappaStart/ KappaEnd #235

Open
wendy0527 opened this issue May 23, 2024 · 1 comment
Open

Spiral KappaStart/ KappaEnd #235

wendy0527 opened this issue May 23, 2024 · 1 comment

Comments

@wendy0527
Copy link

how to solve the start and end curvatures by fitting many points(xi,yi) ? Can you explain,the following code got multiple spirals using two points.
`
def road(self, **kwargs):
start_x = 0 # x coordinate at the beginning of the curvature
start_y = 0 # y coordinate at the beginning of the curvature
start_h = 0 # heading at the beginning of the curvature

    end_x = 150  # x coordinate at the end of the curvature
    end_y = 20  # y coordinate at the end of the curvature
    end_h = 0  # heading at the end of the curvature

    clothoids = pcloth.SolveG2(
        start_x,
        start_y,
        start_h,
        xodr.STD_START_CLOTH,
        end_x,
        end_y,
        end_h,
        xodr.STD_START_CLOTH,
    )
    # create spirals from each responce
    roadgeoms = [
        xodr.Spiral(x.KappaStart, x.KappaEnd, length=x.length) for x in clothoids
    ]

`

@MandolinMicke
Copy link
Collaborator

The method implemented is scenariogeneration only fits three clothods between two points (with headings) based on the pyclothoids package.

If you want to know exactly how it works, or other methods in that package I would suggest to visit https://github.com/phillipd94/pyclothoids

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