We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug
value_ptr_
value_
ros2_control/hardware_interface/include/hardware_interface/handle.hpp
Lines 75 to 125 in d4139b7
The text was updated successfully, but these errors were encountered:
Hello @kimsh5904,
Thank you for reporting the issue. Let me check and get back to you. If you already have a minimal example, it already helps to reproduce it.
Thank you!
Sorry, something went wrong.
I think what we can see here is wrong ptr copy, I'm not sure but maybe we wold like to do something like this:
Handle(const Handle & other) noexcept { std::unique_lock<std::shared_mutex> lock(other.handle_mutex_); std::unique_lock<std::shared_mutex> lock_this(handle_mutex_); prefix_name_ = other.prefix_name_; interface_name_ = other.interface_name_; handle_name_ = other.handle_name_; value_ = other.value_; value_ptr_ = std::get_if<double>(&value_); }
We would like copy only the value but the pointer should still point to our member value_ not to member of the other class
I've added some tests here: #2011
The changes look good to me. See if you can find some issues in the tests. I'm happy to check back and fix them.
Thank you for your time guys! :)
Successfully merging a pull request may close this issue.
Describe the bug
value_ptr_
points the samevalue_
after calling the below operatorsros2_control/hardware_interface/include/hardware_interface/handle.hpp
Lines 75 to 125 in d4139b7
The text was updated successfully, but these errors were encountered: