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

BPMPD Thread Safety #221

Open
marip8 opened this issue Dec 9, 2020 · 2 comments
Open

BPMPD Thread Safety #221

marip8 opened this issue Dec 9, 2020 · 2 comments
Labels
bug Something isn't working

Comments

@marip8
Copy link
Contributor

marip8 commented Dec 9, 2020

I tried solving an optimization using the BPMPD solver in a multi-threaded context and encountered a segfault deep inside BPMPD. Switching the solver to both OSQP and qpOASES solves the issue, which seems to indicate that some aspect of trajopt with the BPMPD solver is not thread safe. I'm not sure if this comes from the solver library itself or the trajopt_sco wrapper.

I encounter this issue at this version of the repository.

@marip8 marip8 added the bug Something isn't working label Dec 9, 2020
@marip8
Copy link
Contributor Author

marip8 commented Dec 9, 2020

If I had to hazard a guess, this issue may be caused by the couple of static variables in the BPMPD interface library that get used by multiple functions

https://github.com/ros-industrial-consortium/trajopt_ros/blob/b84e4ae30fa658d2911f3e375bb6009dd8ba7084/trajopt_sco/src/bpmpd_interface.cpp#L205-L207

@Levi-Armstrong @mpowelson is there a reason that these variables are static and not a member of the class?

@Levi-Armstrong
Copy link
Contributor

Nope, This was just how it was originally implemented. Change if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants