webots_ros2_driver native MacOS support #733
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Currently webots_ros2 only builds natively on Ubuntu. Using Robostack, a partially supported ROS2 installation can also be done fairly easily directly on MacOS.
This pull requests makes some changes to the build process, so webots_ros2 also builds natively on MacOS.
Affected Packages
List of affected packages:
Tasks
Additional context
This pull-request is pretty much WIP and not ready to be merged yet.
Note that for testing purposes I made changes to the reduced webots source code (the one generated by sync_controller_lib.sh) directly here in the repository.
Currently the build process for MacOS always targets an Application Bundle build, i.e., resources and dynamic libraries are expected to be prefixed with
Contents/...
. As webots_ros2_driver only targets linux for now, it however expects files to be in the unprefixed location. For now I solved this by only conditionally prefixing paths determined by the variableBUILD_MACOS_BUNDLE
. This however requires changes in the build process of webots. Another solution would be to leave the paths as they are, and change only webots_ros2_driver to use the files under the Contents prefix.Further note that I bumped the minimum cmake version to version 3.15 to fix a problem with findPython module during the build process. If this is undesirable I can look If I find a workaround that does not depend on a version bump.