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

Vision latency #36

Merged
merged 11 commits into from
Feb 18, 2019
Merged

Vision latency #36

merged 11 commits into from
Feb 18, 2019

Conversation

james-ward
Copy link
Contributor

Clean up code
Use proportional controller to correct lateral offset when aligning
Tests on vision.py component

@codecov-io
Copy link

codecov-io commented Feb 18, 2019

Codecov Report

Merging #36 into master will increase coverage by 4.59%.
The diff coverage is 97.88%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #36      +/-   ##
==========================================
+ Coverage   77.15%   81.74%   +4.59%     
==========================================
  Files          18       20       +2     
  Lines        1160     1282     +122     
  Branches      119      120       +1     
==========================================
+ Hits          895     1048     +153     
+ Misses        239      208      -31     
  Partials       26       26
Impacted Files Coverage Δ
tests/test_functions.py 100% <100%> (ø)
utilities/functions.py 90% <100%> (+3.33%) ⬆️
tests/test_vision.py 100% <100%> (ø)
components/vision.py 98.36% <100%> (+33.44%) ⬆️
automations/alignment.py 55.35% <40%> (+1.78%) ⬆️
utilities/pure_pursuit.py 89.58% <0%> (+2.77%) ⬆️
autonomous/test.py 100% <0%> (+31.81%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 99a5255...e226e2a. Read the comment docs.

@@ -31,3 +31,10 @@ def rescale_js(
def constrain_angle(angle: float) -> float:
"""Wrap an angle to the interval [-pi, pi]."""
return math.atan2(math.sin(angle), math.cos(angle))


def rotate_vector(x: float, y: float, angle: float) -> (float, float):
Copy link
Member

Choose a reason for hiding this comment

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

We should probably use this function everywhere we do this too (we do this in the swerve code too).

@james-ward james-ward merged commit 1bda7e4 into thedropbears:master Feb 18, 2019
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