-
Notifications
You must be signed in to change notification settings - Fork 528
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
Visibility control headers #286
Conversation
…s export is insufficient.
Add visibility control headers. Set the building flag for the respective header in each CMakeLists.txt. Add public macros in headers where the automatic symbols export is insufficient.
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.
First of all, why did you decided to go for manual visibility control here, but for global visibility in moveit/srdfdom#69?
If you go for manual visibility (which in general is more memory efficient and thus should be preferred): Instead of manually writing the boiler-plate visibility-control header files, I suggest to use corresponding cmake functionality, namely generate_export_header
.
Please have a look for an example at ros-visualization/rviz#1335
These are instances where the global visibility is insufficient. For example global static variables will not get exported properly without manual visibility. The decision to use the boiler-plate headers follows this logic: |
So, you (need to) mix global and manual visibility? IMO, that's horrible.
I don't agree with @wjwwood on this. Manually creating those visibility headers is potentially error-prone and auto-creating them isn't that costly I think. Maybe other maintainers can weigh in with their opinion? |
Well we will have to agree to disagree. I don’t think the boilerplate headers are error prone and they haven’t changed in years and years. I won’t repeat my reasoning here since it’s on that issue. |
@lilustga I tried to compile this branch with a windows machine but moveit_core is failing because it can't find boost zlib, do you know how to fix it .? |
@JafarAbdi That error can be fixed by removing the following from moveit_core/CMakeLists.txt. It is not required for the version of boost that is being used now.
This PR specifically regards the visibility control headers, I discussed with Henning having specific topic PRs so we could get consensus on the couple main items individually. This fork contains all the changes to build on windows: https://github.com/lilustga/moveit2/tree/builds_on_windows |
Added 'clang off' comments for the visibility headers to ignore the indented if defs.
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.
@lilustga To me it looks like the include paths might be wrong which could lead to the issues with missing header files you described.
moved visibilty headers into named include folder.
Codecov Report
@@ Coverage Diff @@
## main #286 +/- ##
=======================================
Coverage 48.00% 48.00%
=======================================
Files 157 157
Lines 14843 14843
=======================================
Hits 7124 7124
Misses 7719 7719
Continue to review full report at Codecov.
|
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 see green, awesome! I think we should merge this as is and add an issue describing why we are using manual visibility in these cases and what might be required to switch to global in the future.
@lilustga you might be interested in our efforts to add Windows CI to the Moveit project using the packages from the RoboStack project. Our Foxy stack is currently a bit behind (noetic has much more packages), but with a little help we could create Windows packages so that they could be used as a basis for a CI similar to what we're adding here for Moveit 1: moveit/moveit#2604 (specifically this github action: https://github.com/RoboStack/moveit/blob/tests_with_conda_pkgs/.github/workflows/cross_platform_ci.yml) You can find the currently available packages here: https://robostack.github.io/foxy.html |
@wolfv, I'm interested. Cross platform CI would be great! Lets discuss what's needed to get there. |
Do you want to join us on our Gitter chat room (Gitter.im/robostack/Lobby)? Or feel free to send me an email and we can discuss by email/video/... |
@ooeygui do you have an opinion on this? |
Hi @AndyZe , We've documented this at the Azure Edge Robotics landing page - https://aka.ms/ros/visibility (and will be adding docs to ros.org as well). Edit: We are also having conversations with @wolfv and team with Open Robotics about RoboStack. It's a great solution which creates one model for Windows, Mac and Linux. We have a tracking issue at https://aka.ms/ROSOnWindowsIssues - ms-iot/ROSOnWindows#324. |
closing because #530 was merged. |
Co-authored-by: cmelliott2 <[email protected]>
Description
Add visibility control headers.
Set the building flag for the respective header in each CMakeLists.txt.
Add public macros in headers where the automatic symbols export is insufficient.
Checklist