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

Trajopt optimizations #390

Merged
merged 4 commits into from
Feb 27, 2024

Conversation

rjoomen
Copy link
Contributor

@rjoomen rjoomen commented Feb 27, 2024

I noticed significant inefficiencies in creating/updating constraints and costs. With some profiling using perf and hotspot I solved a number of issues leading to a nice speedup for problems with large numbers of variables.

@rjoomen
Copy link
Contributor Author

rjoomen commented Feb 27, 2024

Properly reserve SparseMatrix

Before:
image
After:
image

@rjoomen
Copy link
Contributor Author

rjoomen commented Feb 27, 2024

exprToEigen initialize from triplets

Before, lots of time spent in coeffRef():
image
After (now SparseVector is the remaining issue):
image

@rjoomen
Copy link
Contributor Author

rjoomen commented Feb 27, 2024

Create SparseVector from doublets

Before:
image
After (all below threshold):
image

@Levi-Armstrong
Copy link
Contributor

Awesome! This was on my todo list.

@Levi-Armstrong Levi-Armstrong merged commit ecd37fc into tesseract-robotics:master Feb 27, 2024
8 of 10 checks passed
@rjoomen rjoomen deleted the optimizations branch February 27, 2024 18: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.

2 participants