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

Optimize the copy and swap constructors in robot_model::Model #174

Closed
yrh012 opened this issue Mar 28, 2024 · 0 comments
Closed

Optimize the copy and swap constructors in robot_model::Model #174

yrh012 opened this issue Mar 28, 2024 · 0 comments
Assignees

Comments

@yrh012
Copy link

yrh012 commented Mar 28, 2024

In this task, I will focus on enhancing the efficiency of the copy and swap constructors in robot_model::Model. The current implementation of the copy constructor re-initializes a new model object, re-parses the URDFs, and rebuilds the collision geometry models, which is not optimal.

Upon investigation, we found that OsqpEigen::Solver solver_; prevents the compiler from performing a default copy due to its unique pointers, which should not have multiple owners. To address this, I will create a class wrapper around OsqpEigen::Solver solver_; and implement a copy constructor that re-initializes the solver.

Furthermore, I will improve the readability of robot_model::Model by relocating the init_solver from robot_model to a separate file. This change will make the robot_model::Model code more streamlined and easier to understand.

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

When branches are created from issues, their pull requests are automatically linked.

1 participant