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

119 bug incorrect position calculation #120

Merged
merged 3 commits into from
Dec 1, 2023

Conversation

samuelkuehnel
Copy link
Collaborator

@samuelkuehnel samuelkuehnel commented Nov 30, 2023

Description

the transformation from (lat,lon)-coordinates was fixed. The calculated and real values now match.
position_correct

The new calculation was copied from pylot
Fixes #119

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Does this PR introduce a breaking change?

no

Most important changes

Updated Calculation method in coordinate_transformation.py
Reference values are now read from the Carla OpenDrive-Map
Class GeoRef removed as not needed anymore

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works (might be obsolete with CI later on)
  • New and existing unit tests pass locally with my changes (might be obsolete with CI later on)

@samuelkuehnel samuelkuehnel linked an issue Nov 30, 2023 that may be closed by this pull request
@samuelkuehnel samuelkuehnel self-assigned this Nov 30, 2023
@samuelkuehnel samuelkuehnel requested a review from MaxJa4 November 30, 2023 17:53
@samuelkuehnel samuelkuehnel added the bug Something isn't working label Nov 30, 2023
Copy link

Simulation results

Metric Value
Avg. driving score 0.005892
Avg. route completion 0.02
Avg. infraction penalty 0.348058
Collisions with pedestrians 0.0
Collisions with vehicles 0.0
Collisions with layout 709.196
Red lights infractions 0.0
Stop sign infractions 0.0
Off-road infractions 0.001
Route deviations 0.0
Route timeouts 709.196
Agent blocked 0.0
Yield emergency vehicles infractions 0.0
Scenario timeouts 709.196
Min speed infractions 0.0

Copy link

github-actions bot commented Dec 1, 2023

Simulation results

Metric Value
Avg. driving score 0.005892
Avg. route completion 0.02
Avg. infraction penalty 0.348058
Collisions with pedestrians 0.0
Collisions with vehicles 0.0
Collisions with layout 709.196
Red lights infractions 0.0
Stop sign infractions 0.0
Off-road infractions 0.001
Route deviations 0.0
Route timeouts 709.196
Agent blocked 0.0
Yield emergency vehicles infractions 0.0
Scenario timeouts 709.196
Min speed infractions 0.0

@samuelkuehnel samuelkuehnel requested review from robertik10 and removed request for MaxJa4 December 1, 2023 14:06
x, y, z = geodetic_to_ecef(lat, lon, h)
return ecef_to_enu(x, y, z, lat_ref, lon_ref, h_ref)
# Is not necessary in new version
# y *= -1
Copy link
Collaborator

@robertik10 robertik10 Dec 1, 2023

Choose a reason for hiding this comment

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

# alt + 331.00000 is needed, because the altitude of the map itself has to be accounted for
# TODO: maybe can be removed

Copy link
Collaborator

@robertik10 robertik10 left a comment

Choose a reason for hiding this comment

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

Looks really good!

@robertik10 robertik10 merged commit 2c70374 into main Dec 1, 2023
3 checks passed
@MaxJa4 MaxJa4 deleted the 119-bug-incorrect-position-calculation branch December 1, 2023 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

[Bug]: Incorrect position calculation
2 participants