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

ROS2 Jazzy Installation on Apple Silicon(M1) MacOS X(Sonoma 14.5) #4550

Closed

Conversation

woensug-choi
Copy link

@woensug-choi woensug-choi commented Jun 17, 2024

Tested and designed on macOS Sonoma 14.5 with an Apple M3 chip (36 GB), it took about 15 minutes each to install ROS2 Jazzy and Gazebo Harmonic.

Notes

References: (None of below worked for me, so I made this script)

For those in need, one-liner installation script

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/IOES-Lab/ROS2_Jazzy_MacOS_Native_AppleSilicon/main/install.sh)"

@woensug-choi
Copy link
Author

woensug-choi commented Jun 20, 2024

If we can't add anything with curl, the process to download and apply patches can't be added. Then, this PR is conceptually no go.

@rgov
Copy link

rgov commented Jun 20, 2024

(I'm just a user, not a member of the ROS team.)

If we can't add anything with curl, the process to download and apply patches can't be added. Then, this PR is conceptually no go.

I think so. It is unusual (and unsafe) for a README to instruct you to apply a set of 3rd party patches before building. It would be a lot better to submit the patches as individual PRs to the subprojects so the development team can review them and decide how best to incorporate them into the project.

  • Most of the places that you are hardcoding /opt/homebrew paths should probably instead be passing in CMake variables for find_package() to use, like -DFREETYPE_DIR=$(brew --prefix freetype2).

    • It's better to ask Homebrew where packages are installed with brew --prefix.
  • It isn't advisable to patch files belonging to other packages inside the virtual environment, like easy_install. The deprecation warnings might be ugly but they're harmless.

  • The patches that set include_directories(${orocos_kdl_INCLUDE_DIRS}) look reasonable. Is this useful for all platforms? If yes, why does it work as-is on Linux but not macOS?

    • The patches that hardcode the path /opt/homebrew/Cellar/orocos-kdl/1.5.1/include/ are very brittle and will break any time the orocos-kdl formula is updated to a new version. Instead, you should probably use find_package(orocos_kdl REQUIRED) and then use the ${orocos_kdl_INCLUDE_DIRS} variable.
  • Can you detail the patch that changes the read_ahead_queue_size option to use intermediate uint64_t storage? There was fix: use size_t instead of uint64_t in play_options YAML converter rosbag2#1575 which changed from uint64_t to size_t.

  • What are the patches related to precompiled headers, and why were they necessary?

  • It's probably best to continue building universal binaries (arm64 + x86_64) unless there is an issue cross-compiling on Apple silicon?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants