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

discretize matrices without control library #33109

Closed
wants to merge 2 commits into from

Conversation

avangerp
Copy link

Description

Discretizing matrices A and B in pure python and numpy, Removing control dependency

Verification

run tests

solves issue #33092

Copy link
Contributor

github-actions bot commented Jul 28, 2024

Thanks for contributing to openpilot! In order for us to review your PR as quickly as possible, check the following:

  • Convert your PR to a draft unless it's ready to review
  • Read the contributing docs
  • Before marking as "ready for review", ensure:
    • the goal is clearly stated in the description
    • all the tests are passing
    • the change is something we merge
    • include a route or your device' dongle ID if relevant

@avangerp avangerp marked this pull request as draft July 28, 2024 17:16
@avangerp avangerp marked this pull request as ready for review July 28, 2024 17:35
@simontheflutist
Copy link

Matrix exponential is notorious for being numerically unstable: https://www.cs.jhu.edu/~misha/ReadingSeminar/Papers/Moler03.pdf

Are you sure scipy isn't the right approach here?

@maxime-desroches
Copy link
Contributor

Thanks for the PR. I will close this in favor of https://github.com/commaai/openpilot/pull/33103/files since the discretization is a bit simpler.

Also check out this for how to compute A_d and B_d in a single step without the need for computing the inverse of A

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants