Fix heading computation to ensure consistent coordinate order with poses#57
Open
yuan-yin wants to merge 1 commit intohyzhou404:mainfrom
Open
Fix heading computation to ensure consistent coordinate order with poses#57yuan-yin wants to merge 1 commit intohyzhou404:mainfrom
yuan-yin wants to merge 1 commit intohyzhou404:mainfrom
Conversation
|
Hi! Would you happen to know if there is any problem with the commit that is resulting in it not being merged? I applied your commit to my local codebase and it improved the performance of the LTF policy. Just was wondering if there was any reason why it hasn't been merged in. Thanks! |
Contributor
Author
Hi! Sorry, I don't have more insight on this. There haven't been any discussions about the PR since then. Good to know that it improves things. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR corrects the heading computation so that it is consistent with the coordinate system used for trajectory poses in vehicle coordinates.
The heading should be computed as
heading = arctan2(lateral_displacement, forward_displacement),where
lateral_displacement = plan_traj[:, 0]andforward_displacement = plan_traj[:, 1].In the original implementation (and even earlier in the unsafe
arctanversion before the PR #56) the arguments ofarctan2were swapped, effectively producing an angle equal toπ/2 – heading.This fix restores the proper geometric interpretation of the poses, improves simulation fidelity, and leads to higher evaluation scores across different methods.