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

Universal DistToDestination metric #2042

Merged
merged 4 commits into from
May 30, 2023
Merged

Universal DistToDestination metric #2042

merged 4 commits into from
May 30, 2023

Conversation

Adaickalavan
Copy link
Member

DistToDestination metric is now computed by summing the
(i) off-route distance driven by the vehicle from its last on-route position, and
(ii) the distance to goal from the vehicle's last on-route position.

Copy link
Collaborator

@Gamenot Gamenot left a comment

Choose a reason for hiding this comment

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

Good work!

Comment on lines +641 to +642
"Route computed in reverse direction from point_b to "
f"point_a resulting in negative distance: {dist_tot}."
Copy link
Collaborator

Choose a reason for hiding this comment

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

Perhaps we should be using the term displacement rather than distance here since distance can also mean magnitude from a point.

Copy link
Member Author

Choose a reason for hiding this comment

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

If the route from point_b to point_a is not straight, then the route distance will be longer than the displacement between point_b and point_a. So rephrasing the error message as "Route computed in reverse direction from point_b to point_a resulting in negative displacement: {dist_tot}." also sounds a little awkward as the displacement might be shorter than the printed dist_tot.

smarts/env/gymnasium/wrappers/metric/costs.py Outdated Show resolved Hide resolved
smarts/env/gymnasium/wrappers/metric/metrics.py Outdated Show resolved Hide resolved
@Adaickalavan Adaickalavan merged commit 22b9ad4 into master May 30, 2023
@Adaickalavan Adaickalavan deleted the fix-dist-to-dest branch May 30, 2023 16:29
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.

3 participants