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

fix-arm64 pdm4ar2024 #123

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

fix-arm64 pdm4ar2024 #123

wants to merge 5 commits into from

Conversation

alezana
Copy link
Member

@alezana alezana commented Aug 6, 2024

No description provided.

Copy link

codecov bot commented Aug 6, 2024

Codecov Report

Attention: Patch coverage is 79.00677% with 93 lines in your changes missing coverage. Please review.

Project coverage is 80.05%. Comparing base (c217817) to head (ae95961).
Report is 3 commits behind head on master.

Files with missing lines Patch % Lines
...dg_commons/sim/agents/idm_agent/idm_agent_utils.py 68.82% 47 Missing and 6 partials ⚠️
src/dg_commons/eval/efficiency.py 62.66% 19 Missing and 9 partials ⚠️
src/dg_commons/eval/safety.py 95.94% 2 Missing and 4 partials ⚠️
src/dg_commons/eval/comfort.py 87.87% 2 Missing and 2 partials ⚠️
..._commons/sim/agents/idm_agent/vehicle_projected.py 88.23% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #123      +/-   ##
==========================================
+ Coverage   78.31%   80.05%   +1.74%     
==========================================
  Files          72       77       +5     
  Lines        4943     5386     +443     
  Branches      331      397      +66     
==========================================
+ Hits         3871     4312     +441     
+ Misses        991      970      -21     
- Partials       81      104      +23     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@alezana alezana changed the title Update pyproject.toml fix-arm64 pdm4ar2024 Nov 8, 2024
* add eval functions

* add idm agent

* rename the files

* add unit test for safety eval

* add unit test for efficiency metric

* minor

* minor

* add unit test for comfort evaluation

* minor

* idm unit test with minor fix

* add idm agent

* idm unit test with minor fix

* minor

* minor

* returns collided players

* minors + fix for python3.9

* improve test coverage

* use f-string

* bugfix

* add eval functions (#124)

Add common functions to evaluate the performance of ego vehicle in the simulation.
For safety, the functions to find the minimum distance, minimum time-to-collision(ttc) and maximum deceleration-rate-to-avoid-collision(drac) are implemented. The vehicle geometry is considered in the computation.
For efficiency, the function to find the first time that the ego vehicle entered its desired lane is implemented. It only checks whether the vehicle enters the goal lane(or its predecessor/successor), regardless of the progress on the lane.
For comfort, the max jerk and the rms of frequency-weighted acceleration(according to ISO2631) is computed.

This will be merged after tested locally for the pdm4ar exercise.
---------

Co-authored-by: alezana <[email protected]>

* revert change in eval

* revert change in eval

---------

Co-authored-by: alezana <[email protected]>
Copy link
Contributor

@code-review-doctor code-review-doctor bot left a comment

Choose a reason for hiding this comment

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

Worth considering. View full project report here.

from .vehicle_projected import VehicleStatePrj


@dataclass
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
@dataclass
@dataclass(frozen=True)

Use frozen=True to make the dataclasses immutable and hashable. Read more.

from dg_commons.sim.models.vehicle_dynamic import VehicleStateDyn


@dataclass(unsafe_hash=True, eq=True, order=True)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
@dataclass(unsafe_hash=True, eq=True, order=True)
@dataclass(unsafe_hash=True, eq=True, order=True, frozen=True)

Use frozen=True to make the dataclasses immutable and hashable. Explained here.

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