-
Notifications
You must be signed in to change notification settings - Fork 453
dynamically link JTC parameter validation instead of header only #2127
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
Conversation
Previously validate_jtc_parameters defined validation functions in the header file but didn't marked them with inline. This caused errors when we try to use it in more than one header file. While I was refactoring other files I got the linker error, so seperated the declaration and definitions.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2127 +/- ##
==========================================
+ Coverage 84.76% 84.78% +0.01%
==========================================
Files 151 151
Lines 14619 14629 +10
Branches 1269 1269
==========================================
+ Hits 12392 12403 +11
+ Misses 1767 1766 -1
Partials 460 460
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
bmagyar
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you!
|
@christophfroehlich I've removed the backport labels as this may cause issues to people inheriting from the JTC. Happy to discuss though |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure about this here, as the joint_trajectory_controller_parameters library will be broken now.
People might have been able to use the parameter library without linking against the joint_trajectory_controller, which is now not possible.
Sorry, haven't had a proper look before.
I don't understand why. This means that the generate_parameter_library does not have proper include guards, because we don't include the validation file anywhere else? |
I think you didn't get me, what I said. I meant I'm reorganizing, rewriting and adding something to make the tolerances.hpp faster to compile and better. That's why I got linker error. As validate_jtc_parameters.hpp defines 2 functions without inline this violated ODR (I'm adding tolerances.cpp for better compilation speed and decoupling from .hpp). |
|
So, tolerances.hpp also includes JTC Params header file and joint_trajectory_controller.hpp also includes it. So, viola! We have multiple definitions in 2 .cpp (if we add my Refactored tolerances.cpp). So, you are 100% correct that:
And I'll say Yet. |
|
|
I'm about to initiate that PR in like a hour or so. So, I think instead of explaining here, just see it! Edit: PR opened as #2133. |
Hello respected maintainers and reviewers! Again this is Surya!
This PR addresses,
When I was refactoring tolerances.hpp I got linker error of multiple definitions of this header file. Because it defines functions directly in header without any inline, so I seperated them in .hpp and .cpp
I also added some doxygen-style comments for documentation of these functions.
Regards,
Surya