-
Notifications
You must be signed in to change notification settings - Fork 0
Fix macOS RViz launch and setup guide #13
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -67,6 +67,10 @@ select_manager() { | |
| prepare() { | ||
| check_host | ||
| select_manager | ||
| if [[ -z "${CONDA_BUILD_SYSROOT:-}" ]]; then | ||
| CONDA_BUILD_SYSROOT="$(xcrun --show-sdk-path)" | ||
| export CONDA_BUILD_SYSROOT | ||
| fi | ||
|
Comment on lines
+70
to
+73
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/usr/bin/env bash
set -euo pipefail
rg -n 'CONDA_BUILD_SYSROOT|SDKROOT|CMAKE_OSX_SYSROOT|cmake-args' \
scripts/macos.sh robostack.yaml waybionic_rviz_plugins/CMakeLists.txt || true
if [ -d build ]; then
rg -n 'CMAKE_OSX_SYSROOT|isysroot|SDKROOT|CONDA_BUILD_SYSROOT' \
build --glob 'CMakeCache.txt' --glob 'flags.make' || true
fiRepository: Waybionic/waybionic_ground_station Length of output: 361 🏁 Script executed: #!/usr/bin/env bash
set -euo pipefail
printf '%s\n' '--- scripts/macos.sh ---'
wc -l scripts/macos.sh
cat -n scripts/macos.sh | sed -n '1,190p'
printf '%s\n' '--- repository build/config files ---'
git ls-files | rg '(^|/)(robostack\.yaml|.*(toolchain|colcon|CMakeLists\.txt|setup\.cfg|\.cmake)$)|(^|/)CMakePresets\.json$' | sed -n '1,200p'
printf '%s\n' '--- all SDK-related references ---'
rg -n -i 'CONDA_BUILD_SYSROOT|SDKROOT|CMAKE_OSX_SYSROOT|CMAKE_TOOLCHAIN_FILE|cmake-args|colcon build|toolchain' . \
--glob '!build/**' --glob '!install/**' --glob '!log/**' | sed -n '1,300p'Repository: Waybionic/waybionic_ground_station Length of output: 6785 🏁 Script executed: #!/usr/bin/env bash
set -euo pipefail
printf '%s\n' '--- robostack.yaml ---'
cat -n robostack.yaml
printf '%s\n' '--- package CMake files ---'
for file in waybionic_bringup/CMakeLists.txt waybionic_description/CMakeLists.txt waybionic_rviz_plugins/CMakeLists.txt; do
printf '\n--- %s ---\n' "$file"
cat -n "$file"
done
printf '%s\n' '--- package metadata and environment configuration ---'
rg -n -i 'conda|sysroot|sdk|cmake|macos|osx|toolchain|environment' \
robostack.yaml package.xml setup.cfg setup.py pyproject.toml \
waybionic_bringup waybionic_description waybionic_rviz_plugins \
--glob '!**/build/**' --glob '!**/install/**' --glob '!**/log/**' 2>/dev/null || trueRepository: Waybionic/waybionic_ground_station Length of output: 8941 🌐 Web query:
💡 Result: In CMake, the SDKROOT environment variable is used to initialize the CMAKE_OSX_SYSROOT variable when it is not explicitly set by the user or build configuration [1][2]. Key technical details regarding their relationship: 1. Initialization: When configuring a project, if CMAKE_OSX_SYSROOT has not been set, CMake checks the environment for the SDKROOT variable [1][3]. If SDKROOT is set, its value is used to initialize CMAKE_OSX_SYSROOT [1][2]. 2. Purpose: CMAKE_OSX_SYSROOT specifies the location or name of the Apple platform SDK (e.g., macOS, iOS, tvOS, visionOS, or watchOS) used for building [1][2]. It instructs the compiler to use the -isysroot flag [1][4]. 3. Recommended Usage: While setting SDKROOT in the environment is a valid way to influence the build, CMake documentation notes that CMAKE_OSX_SYSROOT is intended to be set locally by the user creating a build tree and should typically be stored as a CACHE entry [1][2]. Users can explicitly set the SDK by configuring their project with -DCMAKE_OSX_SYSROOT= [1][2]. 4. Automatic Behavior: If both CMAKE_OSX_SYSROOT and SDKROOT are unset, the behavior depends on the compiler. Some Clang compilers do not have a default SDK selection; in such cases, if CMAKE_OSX_SYSROOT is empty, CMake will automatically pass -isysroot using the path returned by xcrun --show-sdk-path [1][2]. Despite the OSX in the variable names, these settings apply to all Apple platforms including macOS, iOS, tvOS, visionOS, and watchOS [1][2]. These variables are ignored on non-Apple platforms [1][2]. Citations:
🌐 Web query:
💡 Result: When building packages on macOS with conda-build, CONDA_BUILD_SYSROOT is an environment variable set by conda-build that points to the directory containing the macOS SDK [1][2]. This variable is essential for ensuring that compiler tools target the correct SDK version during the build process [1][3]. For CMake builds, you must explicitly pass this path because CMake does not automatically detect and use the sysroot defined by the compiler environment [1][4]. You should use the following CMake option in your build configuration: -DCMAKE_OSX_SYSROOT=${CONDA_BUILD_SYSROOT} In addition to CONDA_BUILD_SYSROOT, conda-build also sets MACOSX_DEPLOYMENT_TARGET. While many build tools (like CMake and setuptools) pick up MACOSX_DEPLOYMENT_TARGET automatically, CONDA_BUILD_SYSROOT requires the explicit assignment shown above [1][5]. To configure the SDK path, you can define CONDA_BUILD_SYSROOT in your conda_build_config.yaml file [1][3]: CONDA_BUILD_SYSROOT: - /path/to/your/MacOSX.sdk # [osx] Official conda-build documentation recommends translating these environment variables into compiler arguments to ensure consistency [1][4]. For example, when invoking Clang directly, it is standard practice to use: clang.. -isysroot ${CONDA_BUILD_SYSROOT} -mmacosx-version-min=${MACOSX_DEPLOYMENT_TARGET}.. Citations:
🌐 Web query:
💡 Result: The SDKROOT environment variable is used in Apple development and build systems (such as CMake) to specify the location or name of the software development kit (SDK) to be used for compiling code [1]. There is no universal default value for SDKROOT; its behavior depends on how the build system or compiler processes it [1]. In many contexts, if SDKROOT is not set explicitly, it is considered empty, and the compiler or build tool is expected to either select a default SDK on its own or provide a mechanism to determine the appropriate path [1]. For example, when using CMake, if CMAKE_OSX_SYSROOT is not explicitly defined, it initializes from the SDKROOT environment variable [1]. If SDKROOT is also not set, the value remains empty, and the compiler will typically attempt to select a default macOS SDK automatically [1]. In scenarios where a compiler has no default selection, CMake may automatically use the path provided by the xcrun --show-sdk-path command [1]. To explicitly set or view the SDK path in your environment, you can use the xcrun tool: export SDKROOT="$(xcrun --sdk macosx --show-sdk-path)" You can also specify a particular SDK by replacing macosx with another platform name, such as iphoneos, watchos, or tvos [1]. Citations: 🌐 Web query:
💡 Result: In the context of conda-build, CONDA_BUILD_SYSROOT and CMAKE_OSX_SYSROOT are related variables used to ensure that software compiled on macOS targets the correct software development kit (SDK) [1][2]. CONDA_BUILD_SYSROOT is an environment variable managed and set by conda-build [1][2]. It points to the directory containing the macOS SDK that should be used for compilation [1][2]. Conda-build typically populates this variable based on configurations defined in your conda_build_config.yaml file [1]. CMAKE_OSX_SYSROOT is a CMake-specific variable that tells the CMake build system which SDK to use when generating build files [1][2]. Because CMake does not automatically detect the value set in CONDA_BUILD_SYSROOT, you must explicitly pass it to CMake during the configuration phase of your build script (build.sh) [1][2]. The recommended approach to bridge these two is to pass the conda-build variable into the CMake configuration command [1][2]: -DCMAKE_OSX_SYSROOT=${CONDA_BUILD_SYSROOT} Using this pattern ensures that CMake uses the same SDK path that conda-build has prepared for your environment, which is critical for maintaining consistency and avoiding issues with SDK version mismatch or linking against incorrect system libraries [1]. Documentation regarding these tools and variables is maintained in the conda-build source repository, specifically within resources/compiler-tools.rst [1]. Citations:
🏁 Script executed: #!/usr/bin/env bash
set -euo pipefail
printf '%s\n' '--- local references to the variables ---'
rg -n -F 'CONDA_BUILD_SYSROOT' . --glob '!build/**' --glob '!install/**' --glob '!log/**'
printf '%s\n' '--- local references to SDKROOT ---'
rg -n -F 'SDKROOT' . --glob '!build/**' --glob '!install/**' --glob '!log/**' || true
printf '%s\n' '--- local references to CMAKE_OSX_SYSROOT ---'
rg -n -F 'CMAKE_OSX_SYSROOT' . --glob '!build/**' --glob '!install/**' --glob '!log/**' || trueRepository: Waybionic/waybionic_ground_station Length of output: 491 Pass the SDK path to CMake.
🤖 Prompt for AI AgentsSource: MCP tools |
||
| } | ||
|
|
||
| setup_environment() { | ||
|
|
@@ -150,7 +154,8 @@ case "$command_name" in | |
| ;; | ||
| launch) | ||
| prepare | ||
| run_workspace ros2 launch waybionic_bringup ground_station.launch.py "$@" | ||
| run_workspace env RMW_IMPLEMENTATION="${RMW_IMPLEMENTATION:-rmw_cyclonedds_cpp}" \ | ||
| ros2 launch waybionic_bringup ground_station.launch.py "$@" | ||
| ;; | ||
| run) | ||
| [[ $# -gt 0 ]] || fail "run requires a command" | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -41,6 +41,12 @@ target_include_directories(${PROJECT_NAME} PUBLIC | |
| target_link_libraries(${PROJECT_NAME} Qt5::Widgets) | ||
| ament_target_dependencies(${PROJECT_NAME} ${THIS_PACKAGE_INCLUDE_DEPENDS}) | ||
|
|
||
| if(APPLE) | ||
| # RoboStack exports optional Python type-support dylibs through RViz targets. | ||
| # Do not retain those unused dylibs in this C++-only plugin. | ||
| target_link_options(${PROJECT_NAME} PRIVATE "LINKER:-dead_strip_dylibs") | ||
| endif() | ||
|
Comment on lines
+44
to
+48
Comment on lines
+44
to
+48
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/usr/bin/env bash
set -euo pipefail
rg -n --hidden -g '!build/**' \
'cmake_minimum_required|CMAKE_VERSION|cmake[[:space:]]*:' .Repository: Waybionic/waybionic_ground_station Length of output: 400 🏁 Script executed: #!/usr/bin/env bash
set -euo pipefail
printf '%s\n' '--- repository files mentioning CMake or RoboStack ---'
rg -n --hidden -g '!build/**' -g '!**/.git/**' \
'RoboStack|robostack|CMake|cmake|ubuntu|docker|ros:' \
README* .github Dockerfile* docker* waybionic_rviz_plugins package.xml 2>/dev/null || true
printf '%s\n' '--- relevant build metadata ---'
fd -HI -t f \
'(^|/)(Dockerfile[^/]*|.*\.ya?ml|.*\.yaml|package\.xml|CMakeLists\.txt|README.*)$' . \
| sortRepository: Waybionic/waybionic_ground_station Length of output: 2423 🏁 Script executed: #!/usr/bin/env bash
set -euo pipefail
printf '%s\n' '--- native environment instructions ---'
cat -n robostack.yaml
sed -n '1,45p' README.md
printf '%s\n' '--- CI and container build configuration ---'
cat -n .github/workflows/ros2_build_test.yml
cat -n docker/Dockerfile
printf '%s\n' '--- plugin build file ---'
cat -n waybionic_rviz_plugins/CMakeLists.txt | sed -n '1,60p'Repository: Waybionic/waybionic_ground_station Length of output: 5441 🌐 Web query:
💡 Result: According to the official ROS 2 repository standards, the minimum required CMake version for ROS 2 Jazzy is 3.20 [1]. While some individual packages may maintain their own historical minimums, the established standard for ROS 2 Jazzy, as documented in the ROS Enhancement Proposals (REP) and reflected in core repository updates, is version 3.20 [1]. This requirement ensures compatibility with modern build standards and helps avoid deprecation warnings associated with older versions of CMake [1]. Citations: 🌐 Web query:
💡 Result: In the RoboStack Jazzy distribution, the Citations:
🌐 Web query:
💡 Result: The target_link_options command was introduced in CMake 3.13 [1][2]. This command is used to add options to the link step for executable, shared library, or module library targets [3][4]. When used, it populates the LINK_OPTIONS target property (for PRIVATE and PUBLIC items) and the INTERFACE_LINK_OPTIONS target property (for PUBLIC and INTERFACE items) [3][5][4]. Key details about the command include: - Scope: The INTERFACE, PUBLIC, and PRIVATE keywords are required to specify the scope of the options [3][4]. - Limitations: It cannot be used for static library targets, as they do not use a linker; for those, the STATIC_LIBRARY_OPTIONS target property should be used instead [3][4]. - Generator Expressions: The command supports the use of generator expressions [3][4]. - Extensions: In CMake 3.18 and later, the command gained additional support for host and device-specific link options when dealing with device linking (e.g., CUDA) via the Citations:
🌐 Web query:
💡 Result: REP 2000 is the ROS Enhancement Proposal that defines the target platforms and release-specific dependency requirements for ROS 2 distributions [1]. Regarding the ROS 2 Jazzy Jalisco release, the official REP 2000 documentation lists the minimum/targeted CMake version as 3.22.1 for the primary Ubuntu platform [1]. While your query mentioned CMake 3.20, REP 2000 explicitly specifies 3.22.1 for the Jazzy release [1]. {confidence: 100%} Citations: 🌐 Web query:
💡 Result: ROS 2 Jazzy Jalisco is primarily developed for and tested on Ubuntu 24.04 (Noble Numbat), which includes CMake 3.28. While ROS 2 does not strictly enforce a universal "minimum" CMake version across all possible build environments, it is developed with the expectation of supporting the versions available on its target platforms [1][2]. For Jazzy, the build system assumes a relatively modern CMake environment. In the context of ROS 2 development, CMake 3.20 is often cited as a threshold for modern features, and many ROS 2 packages maintain compatibility with versions at or above this level to leverage newer CMake functionality [3]. Although you may encounter Citations:
🌐 Web query:
💡 Result: As of August 22, 2026, the latest version of the cmake package available on the conda-forge channel is 4.4.2 [1][2]. Citations:
Raise
🤖 Prompt for AI AgentsSource: MCP tools |
||
|
|
||
| pluginlib_export_plugin_description_file(rviz_common plugin_description.xml) | ||
|
|
||
| install( | ||
|
|
||
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.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: Waybionic/waybionic_ground_station
Length of output: 911
🌐 Web query:
Homebrew manpage brew install cask already installed behavior brew reinstall cask💡 Result:
When you attempt to install a Cask that is already installed using brew install --cask <cask_name>, Homebrew will issue a warning informing you that the Cask is already installed and will not perform the installation [1][2]. It does not automatically reinstall or upgrade the Cask in this scenario [3][1]. If you intend to reinstall a Cask, you should use the brew reinstall --cask <cask_name> command [1][2]. This command uninstalls the current version and then reinstalls the Cask using the same options that were used during its original installation [4][5]. Summary of Behaviors: - brew install --cask <cask_name>: Issues a warning if the Cask is already installed and performs no action [1][2]. - brew reinstall --cask <cask_name>: Explicitly uninstalls the existing Cask and performs a fresh installation [4][5]. Note: If you are trying to ensure a Cask is up to date, the standard practice is to use brew upgrade --cask <cask_name> (or simply brew upgrade if you wish to upgrade all packages) [3][6][7]. The upgrade command will skip Casks that are already at the latest version [7].
Citations:
Use
brew reinstallfor Miniforge recovery.If
mamba --versionstill fails, runbrew reinstall --cask miniforge.brew install --cask miniforgedoes not reinstall an existing cask. Then reopen Terminal.🤖 Prompt for AI Agents
Source: MCP tools