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

Converting from cartesian coordinates to Frenet frame around the centerline #123

Merged
merged 23 commits into from
Jun 14, 2024

Conversation

AhmadAmine998
Copy link
Collaborator

@AhmadAmine998 AhmadAmine998 commented Mar 18, 2024

Sample use:

        x = np.array([[
            obs["agent_0"]["pose_x"],
            obs["agent_0"]["pose_y"],
            obs["agent_0"]["delta"],
            obs["agent_0"]["linear_vel_x"],
            obs["agent_0"]["pose_theta"],
        ]]).T
        frenet_pose = env.track.cartesian_to_frenet(x[0, 0], x[1, 0], x[4, 0], s_guess=0)

s_guess is used as the s-coordinate from the previous timestep to ensure continuity of frenet pose between timesteps.

@luigiberducci
Copy link
Collaborator

Hi @AhmadAmine998, it looks nice!
There are some conflicts to resolve. Moreover, having a couple of tests to check the consistency of frenet_to_cartesian and cartesian_to_frenet would be cool. Could you take care of that?

@luigiberducci luigiberducci self-requested a review April 5, 2024 07:05
Copy link
Collaborator

@luigiberducci luigiberducci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@luigiberducci luigiberducci merged commit 69e9dfe into v1.0.0 Jun 14, 2024
7 checks passed
@luigiberducci luigiberducci deleted the dev-frenet-utils branch June 14, 2024 15:03
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.

2 participants