From d8c96374b0835fc4ac3a9e6485e0e1ab7ff4b77a Mon Sep 17 00:00:00 2001 From: Steve Nogar Date: Fri, 22 Sep 2017 13:56:20 -0400 Subject: [PATCH 01/60] changes to rosdep --- .gitignore | 1 + rosdeps.yaml | 16 ++++++++-------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index 9e37669..abbd5a0 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ *_ws +.DS_Store diff --git a/rosdeps.yaml b/rosdeps.yaml index d694428..ffcf453 100644 --- a/rosdeps.yaml +++ b/rosdeps.yaml @@ -1,7 +1,7 @@ gazebo: osx: homebrew: - packages: [gazebo7] + packages: [gazebo8] python: osx: homebrew: @@ -10,21 +10,21 @@ python: packages: [pip, setuptools, nose] python-imaging: osx: - homebrew: - packages: [homebrew/python/pillow] + pip: + packages: [pip, Pillow] python-matplotlib: osx: homebrew: - packages: [homebrew/python/matplotlib] + packages: [matplotlib] python-numpy: osx: homebrew: - packages: [homebrew/python/numpy] + packages: [numpy] python-scapy: osx: - homebrew: - packages: [homebrew/python/scapy] + pip: + packages: [pip, scapy] python-scipy: osx: homebrew: - packages: [homebrew/python/scipy] + packages: [scipy] From 79d3352241b17e42465da2a93353b5843f21e5a3 Mon Sep 17 00:00:00 2001 From: Steve Nogar Date: Fri, 22 Sep 2017 14:02:51 -0400 Subject: [PATCH 02/60] Change to rosdeps --- rosdeps.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rosdeps.yaml b/rosdeps.yaml index ffcf453..219f5b3 100644 --- a/rosdeps.yaml +++ b/rosdeps.yaml @@ -1,3 +1,7 @@ +pcl: + osx: + homebrew: + packages: [pcl] gazebo: osx: homebrew: From cfd76f35ab05cdecad0971eb3707d9c703f99910 Mon Sep 17 00:00:00 2001 From: Steve Nogar Date: Fri, 22 Sep 2017 14:17:45 -0400 Subject: [PATCH 03/60] rosdep --- rosdeps.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rosdeps.yaml b/rosdeps.yaml index 219f5b3..0e987ae 100644 --- a/rosdeps.yaml +++ b/rosdeps.yaml @@ -1,4 +1,4 @@ -pcl: +libpcl-all-dev: osx: homebrew: packages: [pcl] From 45239806e09d956e2b664eee2e35fde46435f29d Mon Sep 17 00:00:00 2001 From: Steve Nogar Date: Fri, 22 Sep 2017 20:40:17 -0400 Subject: [PATCH 04/60] rosdep --- rosdeps.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/rosdeps.yaml b/rosdeps.yaml index 0e987ae..0d1546e 100644 --- a/rosdeps.yaml +++ b/rosdeps.yaml @@ -1,3 +1,11 @@ +ogre: + osx: + homebrew: + package: [ogre1.9] +matplotlib: + osx: + pip: + packages: [pip, matplotlib] libpcl-all-dev: osx: homebrew: From 11d914b305c7808fb0f63326af76ffe04787d0ae Mon Sep 17 00:00:00 2001 From: Steve Nogar Date: Sun, 24 Sep 2017 22:10:43 -0400 Subject: [PATCH 05/60] Updated script to support gazebo8 and ogre1.9 --- README.md | 106 +--------------- install | 352 +++++++++++++++++++++++++++--------------------------- 2 files changed, 183 insertions(+), 275 deletions(-) mode change 100755 => 100644 install diff --git a/README.md b/README.md index 284ceb6..997666a 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,12 @@ -ros-install-osx [![Build Status](https://travis-ci.org/mikepurvis/ros-install-osx.svg?branch=master)](https://travis-ci.org/mikepurvis/ros-install-osx) +ros-install-osx =============== This repo aims to maintain a usable, scripted, up-to-date installation procedure for -[ROS](http://ros.org). The intent is that the `install` script may be executed on a -bare Yosemite or El Capitan machine and produce a working desktop_full installation, +[ROS](http://ros.org) Kinetic. The intent is that the `install` script may be executed on a +bare Sierra machine and produce a working desktop_full installation, including RQT, rviz, and Gazebo. -This is the successor to my [popular gist on the same topic][1]. +This is based on [Mike Purvis' script](https://github.com/mikepurvis/ros-install-osx). It modifies the install to use Gazebo8 and supporting packages such that ogre1.9 and up to date Rviz can be used. [1]: https://gist.github.com/mikepurvis/9837958 @@ -14,12 +14,12 @@ This is the successor to my [popular gist on the same topic][1]. Usage ----- - curl https://raw.githubusercontent.com/mikepurvis/ros-install-osx/master/install | bash + curl https://raw.githubusercontent.com/smnogar/ros-install-osx/master/install | bash or ```shell -git clone https://github.com/mikepurvis/ros-install-osx.git +git clone https://github.com/smnogar/ros-install-osx cd ros-install-osx ./install ``` @@ -38,97 +38,3 @@ You will be prompted for your sudo password at the following points in this proc The installation can be done entirely without sudo if Homebrew and XQuartz are already installed, rosdep is already installed and initialized, and you set the `ROS_INSTALL_DIR` environment variable to a path which already exists and you have write access to. - - -Step by Step ------------- - -The `install` script should just work for most users. However, if you run into trouble, -it's a pretty big pain to rebuild everything. Note that in this scenario, it may make -sense to treat the script as a list of instructions, and execute them one by one, -manually. - -If you have a build fail, for example with rviz, note that you can modify the `catkin build` -line to start at a particular package. Inside your `indigo_desktop_full_ws` dir, run: - - catkin build --start-with rviz - -If you've resolved whatever issue stopped the build previously, this will pick up where -it left off. - - -## Troubleshooting - -### Python and pip packages - -Already-installed homebrew and pip packages are the most significant source of errors, -especially pip packages linked against the system Python rather than Homebrew's Python, -and Homebrew packages (like Ogre) where multiple versions end up installed, and things -which depend on them end up linked to the different versions. If you have MacPorts or -Fink installed, and Python from either of those is in your path, that will definitely -be trouble. - -The script makes _some_ attempt at detecting and warning about these situations, but some -problems of this kind will only be visible as segfaults at runtime. - -Unfortunately, it's pretty destructive to do so, but the most reliable way to give -yourself a clean start is removing the current homebrew installation, and all -currently-installed pip packages. - -For pip: `pip freeze | xargs sudo pip uninstall -y` - -For homebrew, see the following: https://gist.github.com/mxcl/1173223 - -If you take these steps, obviously also remove your ROS workspace and start the install -process over from scratch as well. Finally, audit your `$PATH` variable to ensure that -when you run `python`, you're getting Homebrew's `python`. -Another way to check which Python you are running is to do: - -```bash -which python # Should result in /usr/local/bin/python -ls -l $(which python) # Should show a symlink pointing to Homebrew's Cellar -``` - -If you are getting permission errors when you `sudo uninstall` pip packages, -see [Issue #11](https://github.com/mikepurvis/ros-install-osx/issues/11) and -[this StackOverflow Q&A](http://stackoverflow.com/a/35051066/2653356). - -### El Capitan support - -The `install` script may not work as smoothly in OS X El Capitan. -Here are some pointers, tips, and hacks to help you complete the installation. -This list was compiled based on the discussion in [Issue #12](https://github.com/mikepurvis/ros-install-osx/issues/12). - -#### library not found for -ltbb - -See [Issue #4](https://github.com/mikepurvis/ros-install-osx/issues/4). -You need to compile using Xcode's Command Line Tools: - -```shell -xcode-select --install # Install the Command Line Tools -sudo xcode-select -s /Library/Developer/CommandLineTools # Switch to using them -gcc --version # Verify that you are compiling using Command Line Tools -``` - -The last command should output something that includes the following: - -```bash -Configured with: --prefix=/Library/Developer/CommandLineTools/usr -``` - -You'll then have to rerun the entire `install` script or do the following: - -```bash -rm -rf /opt/ros/indigo/* # More generally, /opt/ros/${ROS_DISTRO}/* -rm -rf build/ devel/ # Assuming your working dir is the catkin workspace -catkin build \ - ... # See actual script for the 4-line-long command -``` - -#### dyld: Library not loaded - -If you see this after installation, when trying to execute `rosrun`, then you -have [System Integrity Protection](https://support.apple.com/en-us/HT204899) enabled. -The installation script should have detected that and *suggested* a quick fix. -Please refer to the very last section of -[`install`](https://github.com/mikepurvis/ros-install-osx/blob/master/install) diff --git a/install b/install old mode 100755 new mode 100644 index 8ad3fcf..e37a622 --- a/install +++ b/install @@ -1,183 +1,185 @@ -#!/bin/bash -# Software License Agreement (BSD) +# NOTE: These instructions do not represent a robust, self-troubleshooting install; they +# are definitely not suitable for dumping to a giant script and running as one. If you +# use them, they should be run one at a time, with an eye out for errors or problems +# along the way. # -# Author Mike Purvis -# Copyright (c) 2014-2016, Clearpath Robotics, Inc., All rights reserved. -# -# Redistribution and use in source and binary forms, with or without modification, are permitted provided that -# the following conditions are met: -# * Redistributions of source code must retain the above copyright notice, this list of conditions and the -# following disclaimer. -# * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the -# following disclaimer in the documentation and/or other materials provided with the distribution. -# * Neither the name of Clearpath Robotics nor the names of its contributors may be used to endorse or -# promote products derived from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED -# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -# TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. - -ROS_DISTRO=${ROS_DISTRO:-indigo} +# The #1 issue you are likely to encounter is with Homebrew or Python packages whose +# binary components link against system Python. This will result in runtime segfaults, +# especially in rviz. If you suspect this is occurring, you can attempt to remove and +# reinstall the offending packages, or go for the nuclear option--- empty your Cellar +# and site-packages folders and start over with brewed python from the beginning. + +# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +# If a cleanup is necessary, proceed with extreme caution!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +ROS_DISTRO=${ROS_DISTRO:-kinetic} ROS_CONFIGURATION=${ROS_CONFIGURATION:-desktop_full} ROS_EXTRA_PACKAGES=${ROS_EXTRA_PACKAGES:-} ROS_INSTALL_DIR=${ROS_INSTALL_DIR:-/opt/ros/${ROS_DISTRO}} -do_install() -{ - set -e - - # Homebrew - if ! hash brew 2>/dev/null; then - ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" - echo export PATH='/usr/local/bin:$PATH' >> ~/.bash_profile - source ~/.bash_profile - brew doctor - fi - brew update - - # XQuartz - if ! hash xquartz 2>/dev/null; then - brew install caskroom/cask/brew-cask - brew cask install xquartz - echo "Log out and in to finalize XQuartz setup." - exit 0 - fi - - # Check for pip packages in the system Python directory. - if [ $(ls /Library/Python/2.7/site-packages/ | wc -l) -gt 1 ]; then - echo "These instructions are about to install Python from Homebrew. However, there are already" - echo "pip packages installed against the system python, in the following path:" - echo - echo " /Library/Python/2.7/site-packages/" - echo - echo "If you have problems, please uninstall these packages:" - echo - echo " for i in \$( pip freeze ); do sudo -H pip uninstall -y \$i; done" - echo - echo "Then delete the build directory and start over again from scratch." - fi - - # Check for root-owned stuff in /usr/local - if [ $(find /usr/local/* -maxdepth 3 -type d -user root | wc -l) -gt 1 ]; then - echo "Looks like you have some stuff owned by the root user in /usr/local. The installation can" - echo "continue, but if there are pip packages which were installed using sudo, this will be a" - echo "problem if rosdep tries to update them. If you have issues installing dependencies, consider" - echo "nuking your Homebrew installation and starting from scratch:" - echo - echo " https://gist.github.com/mxcl/1173223" - echo - echo "Alternatively, you could try chowning the contents of /usr/local to yourself:" - echo - echo " sudo chown -R $USER:admin /usr/local/*" - fi - - # Brewed Python - if [ $(which python) != "/usr/local/bin/python" ]; then - brew install python - mkdir -p ~/Library/Python/2.7/lib/python/site-packages - echo "$(brew --prefix)/lib/python2.7/site-packages" >> ~/Library/Python/2.7/lib/python/site-packages/homebrew.pth - fi - - # Gives us console_bridge, urdfdom, and gtest. - brew tap ros/deps - - # This tap gives us formulae for Gazebo and its dependencies, including SDF. - brew tap osrf/simulation - - # Homebrew science gives us vtk and PCL, among other things. - brew tap homebrew/science - - # Homebrew python gets us bottles for numpy, scipy, etc. - brew tap homebrew/python - - # ROS infrastructure tools - brew install libyaml || true - pip install -U setuptools rosdep rosinstall_generator wstool rosinstall catkin_tools bloom empy sphinx pycurl - - # Initialize and update rosdep - if [ ! -d /etc/ros/rosdep/ ]; then - echo "This sudo prompt is to initialize rosdep (creates the /etc/ros/rosdep path)." - sudo rosdep init - fi - if [ ! -f /etc/ros/rosdep/10-ros-install-osx.list ]; then - echo "This sudo prompt adds the the brewed python rosdep yaml to /etc/ros/rosdep/10-ros-install-osx.list." - sudo sh -c "echo 'yaml https://raw.githubusercontent.com/mikepurvis/ros-install-osx/master/rosdeps.yaml osx' > /etc/ros/rosdep/sources.list.d/10-ros-install-osx.list" - fi - rosdep update - - # Remove previous workspace if present, create and enter new one. - WS=${ROS_DISTRO}_${ROS_CONFIGURATION}_ws - if [ -d "$WS" ]; then - rm -rf "$WS" - fi - mkdir $WS - pushd $WS - - # Standard source install - rosinstall_generator ${ROS_CONFIGURATION} ${ROS_EXTRA_PACKAGES} --rosdistro ${ROS_DISTRO} --deps --tar > ${WS}.rosinstall - wstool init -j8 src ${WS}.rosinstall - - # Grabbing these older meshes allows rviz to run with Ogre 1.7 rather than Ogre 1.8+. - # Some details here: https://github.com/ros-visualization/rviz/issues/782 - if [ -d src/rviz ]; then - pushd src/rviz/ogre_media/models - curl https://raw.githubusercontent.com/ros-visualization/rviz/hydro-devel/ogre_media/models/rviz_cone.mesh > rviz_cone.mesh - curl https://raw.githubusercontent.com/ros-visualization/rviz/hydro-devel/ogre_media/models/rviz_cube.mesh > rviz_cube.mesh - curl https://raw.githubusercontent.com/ros-visualization/rviz/hydro-devel/ogre_media/models/rviz_cylinder.mesh > rviz_cylinder.mesh - curl https://raw.githubusercontent.com/ros-visualization/rviz/hydro-devel/ogre_media/models/rviz_sphere.mesh > rviz_sphere.mesh - popd - fi - - # This patch originates from here: https://github.com/ros/catkin/pull/784 - if [ -d src/catkin ]; then - pushd src/catkin/cmake - curl https://raw.githubusercontent.com/ros/catkin/8a47f4eceb4954beb4a5b38b50793d0bbe2c96cf/cmake/catkinConfig.cmake.in > catkinConfig.cmake.in - popd - fi - - # Package dependencies. - rosdep install --from-paths src --ignore-src --rosdistro ${ROS_DISTRO} -y --as-root pip:no --skip-keys=python-qt-bindings-qwt5 - - # Clean out or create the install directory. - if [ -d ${ROS_INSTALL_DIR} ]; then - rm -rf ${ROS_INSTALL_DIR}/* - else - echo "This sudo prompt is to create and chown ${ROS_INSTALL_DIR}." - sudo mkdir -p ${ROS_INSTALL_DIR} - sudo chown $USER ${ROS_INSTALL_DIR} - fi - - # Parallel build. - catkin config --install --install-space ${ROS_INSTALL_DIR} --cmake-args \ +# Homebrew +if ! hash brew 2>/dev/null; then + ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" + echo export PATH='/usr/local/bin:$PATH' >> ~/.bash_profile + source ~/.bash_profile + brew doctor +fi +brew update + +# XQuartz +if ! hash xquartz 2>/dev/null; then + brew install caskroom/cask/brew-cask + brew cask install xquartz + echo "Log out and in to finalize XQuartz setup." + exit 0 +fi + +# Check for pip packages in the system Python directory. +if [ $(ls /Library/Python/2.7/site-packages/ | wc -l) -gt 1 ]; then + echo "These instructions are about to install Python from Homebrew. However, there are already" + echo "pip packages installed against the system python, in the following path:" + echo + echo " /Library/Python/2.7/site-packages/" + echo + echo "If you have problems, please uninstall these packages:" + echo + echo " for i in \$( pip freeze ); do sudo -H pip uninstall -y \$i; done" + echo + echo "Then delete the build directory and start over again from scratch." +fi + +# Check for root-owned stuff in /usr/local +if [ $(find /usr/local/* -maxdepth 3 -type d -user root | wc -l) -gt 1 ]; then + echo "Looks like you have some stuff owned by the root user in /usr/local. The installation can" + echo "continue, but if there are pip packages which were installed using sudo, this will be a" + echo "problem if rosdep tries to update them. If you have issues installing dependencies, consider" + echo "nuking your Homebrew installation and starting from scratch:" + echo + echo " https://gist.github.com/mxcl/1173223" + echo + echo "Alternatively, you could try chowning the contents of /usr/local to yourself:" + echo + echo " sudo chown -R $USER:admin /usr/local/*" +fi + +# Brewed Python +if [ $(which python) != "/usr/local/bin/python" ]; then + brew install python + mkdir -p ~/Library/Python/2.7/lib/python/site-packages + echo "$(brew --prefix)/lib/python2.7/site-packages" >> ~/Library/Python/2.7/lib/python/site-packages/homebrew.pth +fi + +# ros +brew tap ros/deps + +# This tap gives us formulae for Gazebo and its dependencies, including SDF. +brew tap osrf/simulation + +# Homebrew science gives us vtk and PCL, among other things. +brew tap homebrew/science + +echo "Installing qt5 and pyqt5" + +# fixes some compiling errors (will take awhile to compile) +brew install cmake --HEAD || true + +# boost 1.59 is needed since not everything has been updated for 1.65 (also a long compile) +brew install boost@1.59 --c++11 --with-icu4c +brew install boost-python@1.59 + +# use gazebo8 and ogre1.9 for consistency with rviz +brew install ogre1.9 +brew install gazebo8 || true + +brew install libyaml || true +brew install qt5 pyqt5 || true +brew link qt5 --force || true + +# Install the ROS infrastructure tools, you may have to run this several times until all python deps are properly installed +sudo -H pip install -U setuptools rosdep rosinstall_generator wstool rosinstall catkin_tools catkin_pkg bloom empy sphinx + +# Download ROS sources +rosinstall_generator ${ROS_CONFIGURATION} --rosdistro kinetic --deps > kinetic.rosinstall +rosinstall_generator geometry2 --rosdistro kinetic --deps > geometry2.rosinstall +rosinstall_generator class_loader --rosdistro kinetic --upstream-development > class_loader.rosinstall +rosinstall_generator rospack --rosdistro lunar --upstream-development > rospack.rosinstall +rosinstall_generator rviz --rosdistro kinetic --upstream-development > rviz.rosinstall +rosinstall_generator gazebo_ros_control --rosdistro kinetic --deps-only --deps --deps-depth 1 --exclude gazebo_dev gazebo_ros> gazebo8_ros_pkgs_deps.rosinstall + +wstool init + +# base install +wstool merge -ry ../kinetic.rosinstall + +# so that tf2 has tf2_tools +wstool merge -ry ../geometry2.rosinstall + +# fix number of errors on compiling +wstool merge -ry ../class_loader.rosinstall + +# load gazebo8 support packages +wstool set gazebo8_ros_pkgs --git https://github.com/osrf/gazebo8_ros_pkgs-release.git -v upstream/2.5.10 -y + +# remove gazebo7 support +wstool remove gazebo_ros_pkgs/gazebo_ros_pkgs gazebo_ros_pkgs/gazebo_ros gazebo_ros_pkgs/gazebo_plugins gazebo_ros_pkgs/gazebo_msgs gazebo_ros_pkgs/gazebo_dev + +# gazebo8 support packages deps +wstool merge -ry ../gazebo8_ros_pkgs_deps.rosinstall + +# +wstool merge -ry ../rospack.rosinstall + +# need upstream-dev to fix compiling errors +wstool merge -ry ../rviz.rosinstall + +wstool update -j8 + +# Initialize and update rosdep +if [ ! -d /etc/ros/rosdep/ ]; then + echo "This sudo prompt is to initialize rosdep (creates the /etc/ros/rosdep path)." + sudo rosdep init +fi +if [ ! -f /etc/ros/rosdep/10-ros-install-osx.list ]; then + echo "This sudo prompt adds the the brewed python rosdep yaml to /etc/ros/rosdep/10-ros-install-osx.list." + sudo sh -c "echo 'yaml https://raw.githubusercontent.com/smnogar/ros-install-osx/master/rosdeps.yaml osx' > /etc/ros/rosdep/sources.list.d/10-ros-install-osx.list" +fi + +# This patch originates from here: https://github.com/ros/catkin/pull/784 +# this is necessary for python to find dylibs +if [ -d src/catkin ]; then + pushd src/catkin/cmake + curl https://raw.githubusercontent.com/ros/catkin/8a47f4eceb4954beb4a5b38b50793d0bbe2c96cf/cmake/catkinConfig.cmake.in > catkinConfig.cmake.in + popd +fi + +# # Install the necessary ROS dependencies +# sudo rosdep init +rosdep update +rosdep check --from-paths src --ignore-src --rosdistro kinetic --skip-keys="ppython-qt-bindings-qwt5 libqt5-core libqt5-gui libqt5-opengl libqt5-opengl-dev libqt5-widgets qt5-qmake qtbase5-dev python-imaging python-qt5-bindings python-qt5-bindings-gl python-qt5-bindings-webkit libogre-dev gazebo gazebo7 libgazebo7-dev" -y +rosdep install --from-paths src --ignore-src --rosdistro kinetic --skip-keys="ppython-qt-bindings-qwt5 libqt5-core libqt5-gui libqt5-opengl libqt5-opengl-dev libqt5-widgets qt5-qmake qtbase5-dev python-imaging python-qt5-bindings python-qt5-bindings-gl python-qt5-bindings-webkit libogre-dev gazebo gazebo7 libgazebo7-dev" -y + +# this is importnat for python to work +ln -s /usr/local/share/sip/Qt5 /usr/local/share/sip/PyQt5 + +catkin config --install --install-space /opt/ros/kinetic --cmake-args \ -DCATKIN_ENABLE_TESTING=1 \ -DCMAKE_BUILD_TYPE=Release \ -DPYTHON_LIBRARY=$(python -c "import sys; print sys.prefix")/lib/libpython2.7.dylib \ - -DPYTHON_INCLUDE_DIR=$(python -c "import sys; print sys.prefix")/include/python2.7 - catkin build --limit-status-rate 1 - popd - - echo "Installation successful, please source the ROS workspace:" - echo - echo " source ${ROS_INSTALL_DIR}/setup.bash" - echo - - # Check for SIP if on OSX/macOS 10.11 (El Capitan) or later - if [[ `sw_vers -productVersion` > "10.10" ]] - then - if `csrutil status | grep -q enabled` - then - echo "You have System Integrity Protection enabled." - echo - echo "This prevents DYLD_LIBRARY_PATH from being exported to subshells" - echo "Please add: export DYLD_LIBRARY_PATH=\$DYLD_LIBRARY_PATH:/opt/ros/\$ROS_DISTRO/lib" - echo "To the start of /opt/ros/$ROS_DISTRO/bin/rosrun to work around the issue." - fi - fi -} - -do_install + -DPYTHON_INCLUDE_DIR=$(python -c "import sys; print sys.prefix")/include/python2.7 \ + -DCMAKE_FIND_FRAMEWORK=LAST +catkin build + + +# Check for SIP if on OSX/macOS 10.11 (El Capitan) or later +if [[ `sw_vers -productVersion` > "10.10" ]] +then + if `csrutil status | grep -q enabled` + then + echo "You have System Integrity Protection enabled." + echo + echo "This prevents DYLD_LIBRARY_PATH from being exported to subshells" + echo "Please add: export DYLD_LIBRARY_PATH=\$DYLD_LIBRARY_PATH:/opt/ros/\$ROS_DISTRO/lib" + echo "To the start of /opt/ros/$ROS_DISTRO/bin/rosrun to work around the issue." + fi +fi \ No newline at end of file From aed915b1c633625297465757a086128c81ce4b35 Mon Sep 17 00:00:00 2001 From: Steve Nogar Date: Mon, 25 Sep 2017 10:28:48 -0400 Subject: [PATCH 06/60] Small changes to install script, rosdeps Added a couple more dependencies to rosinstall, added boost@1.59 to rosdeps.yaml --- install | 37 +++++++++++++++++++++++++++---------- rosdeps.yaml | 4 ++++ 2 files changed, 31 insertions(+), 10 deletions(-) diff --git a/install b/install index e37a622..c316f6f 100644 --- a/install +++ b/install @@ -79,7 +79,7 @@ brew tap osrf/simulation # Homebrew science gives us vtk and PCL, among other things. brew tap homebrew/science -echo "Installing qt5 and pyqt5" +echo "Installing brew software" # fixes some compiling errors (will take awhile to compile) brew install cmake --HEAD || true @@ -93,8 +93,16 @@ brew install ogre1.9 brew install gazebo8 || true brew install libyaml || true -brew install qt5 pyqt5 || true -brew link qt5 --force || true +brew install qt pyqt || true +# brew link qt5 --force || true + + # Remove previous workspace if present, create and enter new one. +WS=${ROS_DISTRO}_${ROS_CONFIGURATION}_ws +if [ -d "$WS" ]; then +rm -rf "$WS" +fi +mkdir $WS +pushd $WS # Install the ROS infrastructure tools, you may have to run this several times until all python deps are properly installed sudo -H pip install -U setuptools rosdep rosinstall_generator wstool rosinstall catkin_tools catkin_pkg bloom empy sphinx @@ -105,7 +113,11 @@ rosinstall_generator geometry2 --rosdistro kinetic --deps > geometry2.rosinstall rosinstall_generator class_loader --rosdistro kinetic --upstream-development > class_loader.rosinstall rosinstall_generator rospack --rosdistro lunar --upstream-development > rospack.rosinstall rosinstall_generator rviz --rosdistro kinetic --upstream-development > rviz.rosinstall -rosinstall_generator gazebo_ros_control --rosdistro kinetic --deps-only --deps --deps-depth 1 --exclude gazebo_dev gazebo_ros> gazebo8_ros_pkgs_deps.rosinstall +rosinstall_generator gazebo_ros_control --rosdistro kinetic --deps-only --deps --deps-depth 1 --exclude gazebo_dev gazebo_ros > gazebo8_ros_pkgs_deps.rosinstall +rosinstall_generator realtime_tools ros_control --rosdistro kinetic --deps --deps-depth 1 > extra_deps.rosinstall + +mkdir src +pushd src wstool init @@ -133,8 +145,13 @@ wstool merge -ry ../rospack.rosinstall # need upstream-dev to fix compiling errors wstool merge -ry ../rviz.rosinstall +# some extra missing packages +wstool merge -ry ../extra_deps.rosinstall + wstool update -j8 +popd + # Initialize and update rosdep if [ ! -d /etc/ros/rosdep/ ]; then echo "This sudo prompt is to initialize rosdep (creates the /etc/ros/rosdep path)." @@ -145,6 +162,12 @@ if [ ! -f /etc/ros/rosdep/10-ros-install-osx.list ]; then sudo sh -c "echo 'yaml https://raw.githubusercontent.com/smnogar/ros-install-osx/master/rosdeps.yaml osx' > /etc/ros/rosdep/sources.list.d/10-ros-install-osx.list" fi +# # Install the necessary ROS dependencies +# sudo rosdep init +rosdep update +rosdep check --from-paths src --ignore-src --rosdistro kinetic --skip-keys="ppython-qt-bindings-qwt5 libqt5-core libqt5-gui libqt5-opengl libqt5-opengl-dev libqt5-widgets qt5-qmake qtbase5-dev python-imaging python-qt5-bindings python-qt5-bindings-gl python-qt5-bindings-webkit libogre-dev gazebo gazebo7 libgazebo7-dev" -y +rosdep install --from-paths src --ignore-src --rosdistro kinetic --skip-keys="ppython-qt-bindings-qwt5 libqt5-core libqt5-gui libqt5-opengl libqt5-opengl-dev libqt5-widgets qt5-qmake qtbase5-dev python-imaging python-qt5-bindings python-qt5-bindings-gl python-qt5-bindings-webkit libogre-dev gazebo gazebo7 libgazebo7-dev" -y + # This patch originates from here: https://github.com/ros/catkin/pull/784 # this is necessary for python to find dylibs if [ -d src/catkin ]; then @@ -153,12 +176,6 @@ if [ -d src/catkin ]; then popd fi -# # Install the necessary ROS dependencies -# sudo rosdep init -rosdep update -rosdep check --from-paths src --ignore-src --rosdistro kinetic --skip-keys="ppython-qt-bindings-qwt5 libqt5-core libqt5-gui libqt5-opengl libqt5-opengl-dev libqt5-widgets qt5-qmake qtbase5-dev python-imaging python-qt5-bindings python-qt5-bindings-gl python-qt5-bindings-webkit libogre-dev gazebo gazebo7 libgazebo7-dev" -y -rosdep install --from-paths src --ignore-src --rosdistro kinetic --skip-keys="ppython-qt-bindings-qwt5 libqt5-core libqt5-gui libqt5-opengl libqt5-opengl-dev libqt5-widgets qt5-qmake qtbase5-dev python-imaging python-qt5-bindings python-qt5-bindings-gl python-qt5-bindings-webkit libogre-dev gazebo gazebo7 libgazebo7-dev" -y - # this is importnat for python to work ln -s /usr/local/share/sip/Qt5 /usr/local/share/sip/PyQt5 diff --git a/rosdeps.yaml b/rosdeps.yaml index 0d1546e..eb1c01c 100644 --- a/rosdeps.yaml +++ b/rosdeps.yaml @@ -1,3 +1,7 @@ +boost: + osx: + homebrew: + packages: [boost@1.59, boost-python@1.59] ogre: osx: homebrew: From d9c987fe4896ca65ca1aa69476f7c0aedb91ead9 Mon Sep 17 00:00:00 2001 From: Steve Nogar Date: Mon, 25 Sep 2017 23:07:49 -0400 Subject: [PATCH 07/60] default matplotlib back to pip --- rosdeps.yaml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/rosdeps.yaml b/rosdeps.yaml index eb1c01c..071976e 100644 --- a/rosdeps.yaml +++ b/rosdeps.yaml @@ -28,10 +28,6 @@ python-imaging: osx: pip: packages: [pip, Pillow] -python-matplotlib: - osx: - homebrew: - packages: [matplotlib] python-numpy: osx: homebrew: From 768eb8d97eb6231f5c73ba2e7a03d9a998cdb6eb Mon Sep 17 00:00:00 2001 From: Steve Nogar Date: Wed, 27 Sep 2017 22:01:11 -0400 Subject: [PATCH 08/60] updates for high sierra Not much changed, update pips and do a brew upgrade and it should be good to go --- install | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/install b/install index c316f6f..ebe29cf 100644 --- a/install +++ b/install @@ -166,7 +166,7 @@ fi # sudo rosdep init rosdep update rosdep check --from-paths src --ignore-src --rosdistro kinetic --skip-keys="ppython-qt-bindings-qwt5 libqt5-core libqt5-gui libqt5-opengl libqt5-opengl-dev libqt5-widgets qt5-qmake qtbase5-dev python-imaging python-qt5-bindings python-qt5-bindings-gl python-qt5-bindings-webkit libogre-dev gazebo gazebo7 libgazebo7-dev" -y -rosdep install --from-paths src --ignore-src --rosdistro kinetic --skip-keys="ppython-qt-bindings-qwt5 libqt5-core libqt5-gui libqt5-opengl libqt5-opengl-dev libqt5-widgets qt5-qmake qtbase5-dev python-imaging python-qt5-bindings python-qt5-bindings-gl python-qt5-bindings-webkit libogre-dev gazebo gazebo7 libgazebo7-dev" -y +rosdep install --from-paths src --ignore-src --rosdistro kinetic --skip-keys="ppython-qt-bindings-qwt5 libqt5-core libqt5-gui libqt5-opengl libqt5-opengl-dev libqt5-widgets qt5-qmake qtbase5-dev python-imaging python-qt5-bindings python-qt5-bindings-gl python-qt5-bindings-webkit libogre-dev gazebo gazebo7 libgazebo7-dev matplotlib" -y # This patch originates from here: https://github.com/ros/catkin/pull/784 # this is necessary for python to find dylibs @@ -179,6 +179,10 @@ fi # this is importnat for python to work ln -s /usr/local/share/sip/Qt5 /usr/local/share/sip/PyQt5 +# this may help +# brew link --force qt5 && ln -s /usr/local/Cellar/qt5/5.4.0/mkspecs /usr/local/mkspecs && ln -s /usr/local/Cellar/qt5/5.4.0/plugins /usr/local/plugins + + catkin config --install --install-space /opt/ros/kinetic --cmake-args \ -DCATKIN_ENABLE_TESTING=1 \ -DCMAKE_BUILD_TYPE=Release \ From d35cab31706f93610a9f8c733e615bde9f5d86c3 Mon Sep 17 00:00:00 2001 From: Steve Nogar Date: Sat, 30 Sep 2017 14:33:15 -0400 Subject: [PATCH 09/60] change gazebo8 install --- install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install b/install index ebe29cf..e33bcbf 100644 --- a/install +++ b/install @@ -90,7 +90,7 @@ brew install boost-python@1.59 # use gazebo8 and ogre1.9 for consistency with rviz brew install ogre1.9 -brew install gazebo8 || true +brew install gazebo8 --without-bullet || true brew install libyaml || true brew install qt pyqt || true From d314b8d23dec9ffbb7d0f3e092b48aa52f376f58 Mon Sep 17 00:00:00 2001 From: Stephen Nogar Date: Mon, 23 Oct 2017 10:17:31 -0400 Subject: [PATCH 10/60] changed gazebo8 to default install --- install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install b/install index e33bcbf..ebe29cf 100644 --- a/install +++ b/install @@ -90,7 +90,7 @@ brew install boost-python@1.59 # use gazebo8 and ogre1.9 for consistency with rviz brew install ogre1.9 -brew install gazebo8 --without-bullet || true +brew install gazebo8 || true brew install libyaml || true brew install qt pyqt || true From 216d235f01b6cbb937cb96beaf7b272246b74641 Mon Sep 17 00:00:00 2001 From: Steve Nogar Date: Sat, 2 Dec 2017 15:50:18 -0500 Subject: [PATCH 11/60] changes to gazebo8 install --- install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install b/install index e33bcbf..ebe29cf 100644 --- a/install +++ b/install @@ -90,7 +90,7 @@ brew install boost-python@1.59 # use gazebo8 and ogre1.9 for consistency with rviz brew install ogre1.9 -brew install gazebo8 --without-bullet || true +brew install gazebo8 || true brew install libyaml || true brew install qt pyqt || true From e11df24dd7ed5bdfec1ddadb8405327c8f76484b Mon Sep 17 00:00:00 2001 From: Steve Nogar Date: Sat, 16 Dec 2017 21:06:27 -0500 Subject: [PATCH 12/60] Updated --- README.md | 45 +++++++++++++++++++++++++++++++++++++++++++++ install | 12 ++++++++---- 2 files changed, 53 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 997666a..89d8eff 100644 --- a/README.md +++ b/README.md @@ -38,3 +38,48 @@ You will be prompted for your sudo password at the following points in this proc The installation can be done entirely without sudo if Homebrew and XQuartz are already installed, rosdep is already installed and initialized, and you set the `ROS_INSTALL_DIR` environment variable to a path which already exists and you have write access to. + +# Troubleshooting + +Below are assorted tips that I have compiled for fixing any issues that can crop up. + +* It is basically impossible to get indigo to work on macOS sierra + * This has to do with home-brew dropping qt4 support: https://github.com/mikepurvis/ros-install-osx/issues/63 +* Could also install indigo on snapdragon, but would take a VERY long time to install +* rosdep —skip-keys command is useful for resolving dependencies + * rosdep check --from-paths src --ignore-src --rosdistro kinetic --skip-keys geographiclib --skip-keys geographiclib-tools +* Indigo still doesn’t work using qt@4 + * Can’t detect correct qt installation +* Important steps to get kinetic to work (all of these are critical): + * Make sure using brew python/pip + * Use boost@1.59 —c++11 —with-icu4c + * Newest version (1.65) does not include tr1 libraries so some packages fail + * Use boost-python@1.59 + * Rviz needs ogre1.9 + * Actually I think you can get away with regular ogre, which is necessary for gazebo7 + * Follow attached install script + * make sure to "brew link qt5 —force” +* boost 1.65 causes major problems + * rviz does not compile with it + * this issue is related: https://github.com/osrf/homebrew-simulation/issues/267 + * need to use cmake —HEAD to build + * This may have been resolved +* Gazebo8 + * Uses Ogre1.9, requires "gazebo8_ros_pkgs-release” to integrate with ROS kinetic +* Geometry2 + * Better support for tf2 +* cmake args: + *Use install script +* High Sierra + * Make sure to set `ROS_MASTER_URI` to the actual machine name + * Otherwise significant delays exist in running especially python based commands +* If having QT errors compiling look at the end of this thread: + * https://github.com/Homebrew/legacy-homebrew/issues/29938 + * Basically add path +* Command for updating pip if getting weird python errors + * pip freeze --local | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 pip install -U +* If you start getting weird errors with accessing too many files, try: + * `ulimit -n 4096` + * See [here](https://superuser.com/questions/433746/is-there-a-fix-for-the-too-many-open-files-in-system-error-on-os-x-10-7-1) for details +* [If running out of pty devices](https://codybonney.com/increase-the-max-number-of-ptys-on-os-x-10-8-3/) +* image_publisher currently fails. [See this fix](https://github.com/ros-perception/image_pipeline/pull/304) \ No newline at end of file diff --git a/install b/install index ebe29cf..2976150 100644 --- a/install +++ b/install @@ -85,8 +85,8 @@ echo "Installing brew software" brew install cmake --HEAD || true # boost 1.59 is needed since not everything has been updated for 1.65 (also a long compile) -brew install boost@1.59 --c++11 --with-icu4c -brew install boost-python@1.59 +brew install boost +brew install boost-python # use gazebo8 and ogre1.9 for consistency with rviz brew install ogre1.9 @@ -94,7 +94,11 @@ brew install gazebo8 || true brew install libyaml || true brew install qt pyqt || true -# brew link qt5 --force || true +brew link qt --force || true + +# fix from https://github.com/Homebrew/legacy-homebrew/issues/29938 for qt +# cmake errors on catkin build +echo export PATH='/usr/local/opt/qt5/bin:$PATH' >> ~/.bash_profile # Remove previous workspace if present, create and enter new one. WS=${ROS_DISTRO}_${ROS_CONFIGURATION}_ws @@ -105,7 +109,7 @@ mkdir $WS pushd $WS # Install the ROS infrastructure tools, you may have to run this several times until all python deps are properly installed -sudo -H pip install -U setuptools rosdep rosinstall_generator wstool rosinstall catkin_tools catkin_pkg bloom empy sphinx +sudo -H pip install -U setuptools rosdep rosinstall_generator wstool rosinstall catkin_tools catkin_pkg bloom empy sphinx wxPython # Download ROS sources rosinstall_generator ${ROS_CONFIGURATION} --rosdistro kinetic --deps > kinetic.rosinstall From 9872b2989f509f228fc451438435396f144c85b3 Mon Sep 17 00:00:00 2001 From: Steve Nogar Date: Sat, 16 Dec 2017 23:21:40 -0500 Subject: [PATCH 13/60] More changes --- README.md | 3 ++- install | 7 ++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 89d8eff..7695beb 100644 --- a/README.md +++ b/README.md @@ -82,4 +82,5 @@ Below are assorted tips that I have compiled for fixing any issues that can crop * `ulimit -n 4096` * See [here](https://superuser.com/questions/433746/is-there-a-fix-for-the-too-many-open-files-in-system-error-on-os-x-10-7-1) for details * [If running out of pty devices](https://codybonney.com/increase-the-max-number-of-ptys-on-os-x-10-8-3/) -* image_publisher currently fails. [See this fix](https://github.com/ros-perception/image_pipeline/pull/304) \ No newline at end of file +* image_publisher currently fails. [See this fix](https://github.com/ros-perception/image_pipeline/pull/304) +* For Gazebo plugins, don't forget to setup `/opt/ros/kinetic/lib` in `GAZEBO_PLUGIN_PATH` and to export it into env \ No newline at end of file diff --git a/install b/install index 2976150..50759ae 100644 --- a/install +++ b/install @@ -84,8 +84,7 @@ echo "Installing brew software" # fixes some compiling errors (will take awhile to compile) brew install cmake --HEAD || true -# boost 1.59 is needed since not everything has been updated for 1.65 (also a long compile) -brew install boost +brew install boost --c++11 --with-icu4c brew install boost-python # use gazebo8 and ogre1.9 for consistency with rviz @@ -135,7 +134,9 @@ wstool merge -ry ../geometry2.rosinstall wstool merge -ry ../class_loader.rosinstall # load gazebo8 support packages -wstool set gazebo8_ros_pkgs --git https://github.com/osrf/gazebo8_ros_pkgs-release.git -v upstream/2.5.10 -y +# wstool set gazebo8_ros_pkgs --git https://github.com/osrf/gazebo8_ros_pkgs-release.git -v upstream/2.5.14 -y +wstool set gazebo_ros_pkgs --git https://github.com/ros-simulation/gazebo_ros_pkgs -v 2.5.14 -y + # remove gazebo7 support wstool remove gazebo_ros_pkgs/gazebo_ros_pkgs gazebo_ros_pkgs/gazebo_ros gazebo_ros_pkgs/gazebo_plugins gazebo_ros_pkgs/gazebo_msgs gazebo_ros_pkgs/gazebo_dev From 6ac15ec8529c332d93440445f804bf177c89e4f3 Mon Sep 17 00:00:00 2001 From: Steve Nogar Date: Sun, 17 Dec 2017 16:00:02 -0500 Subject: [PATCH 14/60] Moved to upstream geometry2 --- install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install b/install index 50759ae..2e162d0 100644 --- a/install +++ b/install @@ -112,7 +112,7 @@ sudo -H pip install -U setuptools rosdep rosinstall_generator wstool rosinstall # Download ROS sources rosinstall_generator ${ROS_CONFIGURATION} --rosdistro kinetic --deps > kinetic.rosinstall -rosinstall_generator geometry2 --rosdistro kinetic --deps > geometry2.rosinstall +rosinstall_generator geometry2 --rosdistro kinetic --upstream-development > geometry2.rosinstall rosinstall_generator class_loader --rosdistro kinetic --upstream-development > class_loader.rosinstall rosinstall_generator rospack --rosdistro lunar --upstream-development > rospack.rosinstall rosinstall_generator rviz --rosdistro kinetic --upstream-development > rviz.rosinstall From 965650b895c30bb254fbbff52a5fdfd4e588286e Mon Sep 17 00:00:00 2001 From: Steve Nogar Date: Mon, 18 Dec 2017 22:41:14 -0500 Subject: [PATCH 15/60] changed rosdeps --- rosdeps.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rosdeps.yaml b/rosdeps.yaml index 071976e..18a032a 100644 --- a/rosdeps.yaml +++ b/rosdeps.yaml @@ -1,7 +1,7 @@ boost: osx: homebrew: - packages: [boost@1.59, boost-python@1.59] + packages: [boost, boost-python] ogre: osx: homebrew: From d065c79c1b732403ce6f50a2c207780e75185a76 Mon Sep 17 00:00:00 2001 From: Steve Nogar Date: Mon, 18 Dec 2017 22:45:31 -0500 Subject: [PATCH 16/60] addex wxtools to rosdeps --- rosdeps.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rosdeps.yaml b/rosdeps.yaml index 18a032a..73d4df3 100644 --- a/rosdeps.yaml +++ b/rosdeps.yaml @@ -40,3 +40,7 @@ python-scipy: osx: homebrew: packages: [scipy] +python-wxtools: + osx: + pip: + packages: wxPython \ No newline at end of file From 34345621ac55278f36700743a2cd422ea31876a9 Mon Sep 17 00:00:00 2001 From: Steve Nogar Date: Mon, 18 Dec 2017 22:48:26 -0500 Subject: [PATCH 17/60] change to rosdep again --- rosdeps.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rosdeps.yaml b/rosdeps.yaml index 73d4df3..2f1271f 100644 --- a/rosdeps.yaml +++ b/rosdeps.yaml @@ -43,4 +43,4 @@ python-scipy: python-wxtools: osx: pip: - packages: wxPython \ No newline at end of file + packages: [wxPython] \ No newline at end of file From e1f983f01b18d5f7f1a14c2c6c08fb8484470a56 Mon Sep 17 00:00:00 2001 From: Steve Nogar Date: Mon, 18 Dec 2017 22:49:22 -0500 Subject: [PATCH 18/60] more rosdep --- rosdeps.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rosdeps.yaml b/rosdeps.yaml index 2f1271f..779f087 100644 --- a/rosdeps.yaml +++ b/rosdeps.yaml @@ -43,4 +43,4 @@ python-scipy: python-wxtools: osx: pip: - packages: [wxPython] \ No newline at end of file + packages: [pip, wxPython] \ No newline at end of file From 970c1e81b8133fac1618df1074d0447a257d7482 Mon Sep 17 00:00:00 2001 From: Steve Nogar Date: Tue, 19 Dec 2017 22:03:18 -0500 Subject: [PATCH 19/60] it finally worked --- README.md | 4 ++++ install | 71 +++++++++++++++++++++++++++++-------------------------- 2 files changed, 42 insertions(+), 33 deletions(-) diff --git a/README.md b/README.md index 7695beb..5ac5503 100644 --- a/README.md +++ b/README.md @@ -81,6 +81,10 @@ Below are assorted tips that I have compiled for fixing any issues that can crop * If you start getting weird errors with accessing too many files, try: * `ulimit -n 4096` * See [here](https://superuser.com/questions/433746/is-there-a-fix-for-the-too-many-open-files-in-system-error-on-os-x-10-7-1) for details + * or + * `sudo sysctl -w kern.maxfiles=67584` + * `sudo sysctl -w kern.maxfilesperproc=65536 # (67584 - 2048)` + * `ulimit -n 65536` * [If running out of pty devices](https://codybonney.com/increase-the-max-number-of-ptys-on-os-x-10-8-3/) * image_publisher currently fails. [See this fix](https://github.com/ros-perception/image_pipeline/pull/304) * For Gazebo plugins, don't forget to setup `/opt/ros/kinetic/lib` in `GAZEBO_PLUGIN_PATH` and to export it into env \ No newline at end of file diff --git a/install b/install index 2e162d0..8763112 100644 --- a/install +++ b/install @@ -92,13 +92,27 @@ brew install ogre1.9 brew install gazebo8 || true brew install libyaml || true -brew install qt pyqt || true -brew link qt --force || true +# brew install qt pyqt || true +# brew link qt --force || true +brew install qt5 pyqt5 sip +export CMAKE_PREFIX_PATH=$(brew --prefix qt5) + # fix from https://github.com/Homebrew/legacy-homebrew/issues/29938 for qt # cmake errors on catkin build echo export PATH='/usr/local/opt/qt5/bin:$PATH' >> ~/.bash_profile +# This hack is required to make qt_gui_cpp compile correctly. See https://github.com/mikepurvis/ros-install-osx/pull/84#issuecomment-338209466 +pushd /usr/local/share/sip +if [ ! -e PyQt5 ]; then +ln -s Qt5 PyQt5 +fi +popd + +# Get homebrew's opencv3 from a bottle so that we don't have to build it. +brew install opencv3 + + # Remove previous workspace if present, create and enter new one. WS=${ROS_DISTRO}_${ROS_CONFIGURATION}_ws if [ -d "$WS" ]; then @@ -108,16 +122,16 @@ mkdir $WS pushd $WS # Install the ROS infrastructure tools, you may have to run this several times until all python deps are properly installed -sudo -H pip install -U setuptools rosdep rosinstall_generator wstool rosinstall catkin_tools catkin_pkg bloom empy sphinx wxPython +sudo -H pip install -U setuptools rosdep rosinstall_generator wstool rosinstall catkin_tools catkin_pkg bloom empy sphinx # Download ROS sources rosinstall_generator ${ROS_CONFIGURATION} --rosdistro kinetic --deps > kinetic.rosinstall rosinstall_generator geometry2 --rosdistro kinetic --upstream-development > geometry2.rosinstall -rosinstall_generator class_loader --rosdistro kinetic --upstream-development > class_loader.rosinstall -rosinstall_generator rospack --rosdistro lunar --upstream-development > rospack.rosinstall +# rosinstall_generator class_loader --rosdistro kinetic --upstream-development > class_loader.rosinstall +# rosinstall_generator rospack --rosdistro lunar --upstream-development > rospack.rosinstall rosinstall_generator rviz --rosdistro kinetic --upstream-development > rviz.rosinstall -rosinstall_generator gazebo_ros_control --rosdistro kinetic --deps-only --deps --deps-depth 1 --exclude gazebo_dev gazebo_ros > gazebo8_ros_pkgs_deps.rosinstall -rosinstall_generator realtime_tools ros_control --rosdistro kinetic --deps --deps-depth 1 > extra_deps.rosinstall +# rosinstall_generator gazebo_ros_control --rosdistro kinetic --deps-only --deps --deps-depth 1 --exclude gazebo_dev gazebo_ros > gazebo8_ros_pkgs_deps.rosinstall +# rosinstall_generator realtime_tools ros_control --rosdistro kinetic --deps --deps-depth 1 > extra_deps.rosinstall mkdir src pushd src @@ -130,28 +144,15 @@ wstool merge -ry ../kinetic.rosinstall # so that tf2 has tf2_tools wstool merge -ry ../geometry2.rosinstall -# fix number of errors on compiling -wstool merge -ry ../class_loader.rosinstall - -# load gazebo8 support packages -# wstool set gazebo8_ros_pkgs --git https://github.com/osrf/gazebo8_ros_pkgs-release.git -v upstream/2.5.14 -y +# remove gazebo7 support and add gazebo8 wstool set gazebo_ros_pkgs --git https://github.com/ros-simulation/gazebo_ros_pkgs -v 2.5.14 -y - - -# remove gazebo7 support wstool remove gazebo_ros_pkgs/gazebo_ros_pkgs gazebo_ros_pkgs/gazebo_ros gazebo_ros_pkgs/gazebo_plugins gazebo_ros_pkgs/gazebo_msgs gazebo_ros_pkgs/gazebo_dev -# gazebo8 support packages deps -wstool merge -ry ../gazebo8_ros_pkgs_deps.rosinstall - -# -wstool merge -ry ../rospack.rosinstall - # need upstream-dev to fix compiling errors wstool merge -ry ../rviz.rosinstall -# some extra missing packages -wstool merge -ry ../extra_deps.rosinstall +# don't need to compile this +wstool remove opencv3 wstool update -j8 @@ -164,14 +165,15 @@ if [ ! -d /etc/ros/rosdep/ ]; then fi if [ ! -f /etc/ros/rosdep/10-ros-install-osx.list ]; then echo "This sudo prompt adds the the brewed python rosdep yaml to /etc/ros/rosdep/10-ros-install-osx.list." - sudo sh -c "echo 'yaml https://raw.githubusercontent.com/smnogar/ros-install-osx/master/rosdeps.yaml osx' > /etc/ros/rosdep/sources.list.d/10-ros-install-osx.list" + sudo sh -c "echo 'yaml https://raw.githubusercontent.com/smnogar/ros-install-osx/high-sierra/rosdeps.yaml osx' > /etc/ros/rosdep/sources.list.d/10-ros-install-osx.list" fi # # Install the necessary ROS dependencies # sudo rosdep init rosdep update -rosdep check --from-paths src --ignore-src --rosdistro kinetic --skip-keys="ppython-qt-bindings-qwt5 libqt5-core libqt5-gui libqt5-opengl libqt5-opengl-dev libqt5-widgets qt5-qmake qtbase5-dev python-imaging python-qt5-bindings python-qt5-bindings-gl python-qt5-bindings-webkit libogre-dev gazebo gazebo7 libgazebo7-dev" -y -rosdep install --from-paths src --ignore-src --rosdistro kinetic --skip-keys="ppython-qt-bindings-qwt5 libqt5-core libqt5-gui libqt5-opengl libqt5-opengl-dev libqt5-widgets qt5-qmake qtbase5-dev python-imaging python-qt5-bindings python-qt5-bindings-gl python-qt5-bindings-webkit libogre-dev gazebo gazebo7 libgazebo7-dev matplotlib" -y +rosdep check --from-paths src --ignore-src --rosdistro kinetic --skip-keys="gazebo7 libgazebo7-dev ogre" -y +rosdep install --from-paths src --ignore-src --rosdistro kinetic --skip-keys="gazebo7 libgazebo7-dev ogre" -y + # This patch originates from here: https://github.com/ros/catkin/pull/784 # this is necessary for python to find dylibs @@ -188,13 +190,16 @@ ln -s /usr/local/share/sip/Qt5 /usr/local/share/sip/PyQt5 # brew link --force qt5 && ln -s /usr/local/Cellar/qt5/5.4.0/mkspecs /usr/local/mkspecs && ln -s /usr/local/Cellar/qt5/5.4.0/plugins /usr/local/plugins -catkin config --install --install-space /opt/ros/kinetic --cmake-args \ - -DCATKIN_ENABLE_TESTING=1 \ - -DCMAKE_BUILD_TYPE=Release \ - -DPYTHON_LIBRARY=$(python -c "import sys; print sys.prefix")/lib/libpython2.7.dylib \ - -DPYTHON_INCLUDE_DIR=$(python -c "import sys; print sys.prefix")/include/python2.7 \ - -DCMAKE_FIND_FRAMEWORK=LAST -catkin build +catkin config --install \ +--install-space /opt/ros/kinetic \ +--cmake-args \ + -DCATKIN_ENABLE_TESTING=1 \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_FIND_FRAMEWORK=LAST \ + -DPYTHON_EXECUTABLE=$(which python2) \ + -DPYTHON_LIBRARY=$(python2 -c "import sys; print sys.prefix")/lib/libpython2.7.dylib \ + -DPYTHON_INCLUDE_DIR=$(python2 -c "import sys; print sys.prefix")/include/python2.7 +catkin build --limit-status-rate 1 # Check for SIP if on OSX/macOS 10.11 (El Capitan) or later From ada6ee9d1af34907ef0778efd4aa86bedaf0a744 Mon Sep 17 00:00:00 2001 From: Stephen Nogar Date: Wed, 20 Dec 2017 12:32:39 -0500 Subject: [PATCH 20/60] Updated based on newest mikepurvis --- README.md | 116 ++++++++++++-- install | 415 +++++++++++++++++++++++++-------------------------- rosdeps.yaml | 89 ++++++++--- 3 files changed, 375 insertions(+), 245 deletions(-) mode change 100644 => 100755 install diff --git a/README.md b/README.md index 5ac5503..2f2b9ce 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,12 @@ -ros-install-osx +ros-install-osx [![Build Status](https://travis-ci.org/mikepurvis/ros-install-osx.svg?branch=master)](https://travis-ci.org/mikepurvis/ros-install-osx) =============== This repo aims to maintain a usable, scripted, up-to-date installation procedure for -[ROS](http://ros.org) Kinetic. The intent is that the `install` script may be executed on a -bare Sierra machine and produce a working desktop_full installation, -including RQT, rviz, and Gazebo. +[ROS](http://ros.org), currently Lunar. The intent is that the `install` script may +be executed on a El Capitan or newer machine and produce a working desktop_full +installation, including RQT, rviz, and Gazebo. -This is based on [Mike Purvis' script](https://github.com/mikepurvis/ros-install-osx). It modifies the install to use Gazebo8 and supporting packages such that ogre1.9 and up to date Rviz can be used. +This is the successor to my [popular gist on the same topic][1]. [1]: https://gist.github.com/mikepurvis/9837958 @@ -14,12 +14,8 @@ This is based on [Mike Purvis' script](https://github.com/mikepurvis/ros-install Usage ----- - curl https://raw.githubusercontent.com/smnogar/ros-install-osx/master/install | bash - -or - ```shell -git clone https://github.com/smnogar/ros-install-osx +git clone https://github.com/mikepurvis/ros-install-osx.git cd ros-install-osx ./install ``` @@ -39,7 +35,101 @@ The installation can be done entirely without sudo if Homebrew and XQuartz are a installed, rosdep is already installed and initialized, and you set the `ROS_INSTALL_DIR` environment variable to a path which already exists and you have write access to. -# Troubleshooting + +Step by Step +------------ + +The `install` script should just work for most users. However, if you run into trouble, +it's a pretty big pain to rebuild everything. Note that in this scenario, it may make +sense to treat the script as a list of instructions, and execute them one by one, +manually. + +If you have a build fail, for example with rviz, note that you can modify the `catkin build` +line to start at a particular package. Inside your `indigo_desktop_full_ws` dir, run: + + catkin build --start-with rviz + +If you've resolved whatever issue stopped the build previously, this will pick up where +it left off. + + +## Troubleshooting + +### Python and pip packages + +Already-installed homebrew and pip packages are the most significant source of errors, +especially pip packages linked against the system Python rather than Homebrew's Python, +and Homebrew packages (like Ogre) where multiple versions end up installed, and things +which depend on them end up linked to the different versions. If you have MacPorts or +Fink installed, and Python from either of those is in your path, that will definitely +be trouble. + +The script makes _some_ attempt at detecting and warning about these situations, but some +problems of this kind will only be visible as segfaults at runtime. + +Unfortunately, it's pretty destructive to do so, but the most reliable way to give +yourself a clean start is removing the current homebrew installation, and all +currently-installed pip packages. + +For pip: `pip freeze | xargs sudo pip uninstall -y` + +For homebrew, see the following: https://gist.github.com/mxcl/1173223 + +If you take these steps, obviously also remove your ROS workspace and start the install +process over from scratch as well. Finally, audit your `$PATH` variable to ensure that +when you run `python`, you're getting Homebrew's `python`. +Another way to check which Python you are running is to do: + +```bash +which python # Should result in /usr/local/bin/python +ls -l $(which python) # Should show a symlink pointing to Homebrew's Cellar +``` + +If you are getting permission errors when you `sudo uninstall` pip packages, +see [Issue #11](https://github.com/mikepurvis/ros-install-osx/issues/11) and +[this StackOverflow Q&A](http://stackoverflow.com/a/35051066/2653356). + +### El Capitan support + +The `install` script may not work as smoothly in OS X El Capitan. +Here are some pointers, tips, and hacks to help you complete the installation. +This list was compiled based on the discussion in [Issue #12](https://github.com/mikepurvis/ros-install-osx/issues/12). + +#### library not found for -ltbb + +See [Issue #4](https://github.com/mikepurvis/ros-install-osx/issues/4). +You need to compile using Xcode's Command Line Tools: + +```shell +xcode-select --install # Install the Command Line Tools +sudo xcode-select -s /Library/Developer/CommandLineTools # Switch to using them +gcc --version # Verify that you are compiling using Command Line Tools +``` + +The last command should output something that includes the following: + +```bash +Configured with: --prefix=/Library/Developer/CommandLineTools/usr +``` + +You'll then have to rerun the entire `install` script or do the following: + +```bash +rm -rf /opt/ros/indigo/* # More generally, /opt/ros/${ROS_DISTRO}/* +rm -rf build/ devel/ # Assuming your working dir is the catkin workspace +catkin build \ + ... # See actual script for the 4-line-long command +``` + +#### dyld: Library not loaded + +If you see this after installation, when trying to execute `rosrun`, then you +have [System Integrity Protection](https://support.apple.com/en-us/HT204899) enabled. +The installation script should have detected that and *suggested* a quick fix. +Please refer to the very last section of +[`install`](https://github.com/mikepurvis/ros-install-osx/blob/master/install) + +#### Assorted notes Below are assorted tips that I have compiled for fixing any issues that can crop up. @@ -54,16 +144,12 @@ Below are assorted tips that I have compiled for fixing any issues that can crop * Make sure using brew python/pip * Use boost@1.59 —c++11 —with-icu4c * Newest version (1.65) does not include tr1 libraries so some packages fail - * Use boost-python@1.59 * Rviz needs ogre1.9 - * Actually I think you can get away with regular ogre, which is necessary for gazebo7 * Follow attached install script * make sure to "brew link qt5 —force” * boost 1.65 causes major problems * rviz does not compile with it * this issue is related: https://github.com/osrf/homebrew-simulation/issues/267 - * need to use cmake —HEAD to build - * This may have been resolved * Gazebo8 * Uses Ogre1.9, requires "gazebo8_ros_pkgs-release” to integrate with ROS kinetic * Geometry2 diff --git a/install b/install old mode 100644 new mode 100755 index 8763112..ee822b9 --- a/install +++ b/install @@ -1,216 +1,213 @@ -# NOTE: These instructions do not represent a robust, self-troubleshooting install; they -# are definitely not suitable for dumping to a giant script and running as one. If you -# use them, they should be run one at a time, with an eye out for errors or problems -# along the way. +#!/bin/bash +# Software License Agreement (BSD) # -# The #1 issue you are likely to encounter is with Homebrew or Python packages whose -# binary components link against system Python. This will result in runtime segfaults, -# especially in rviz. If you suspect this is occurring, you can attempt to remove and -# reinstall the offending packages, or go for the nuclear option--- empty your Cellar -# and site-packages folders and start over with brewed python from the beginning. - -# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -# If a cleanup is necessary, proceed with extreme caution!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +# Author Mike Purvis +# Copyright (c) 2014-2016, Clearpath Robotics, Inc., All rights reserved. +# +# Redistribution and use in source and binary forms, with or without modification, are permitted provided that +# the following conditions are met: +# * Redistributions of source code must retain the above copyright notice, this list of conditions and the +# following disclaimer. +# * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the +# following disclaimer in the documentation and/or other materials provided with the distribution. +# * Neither the name of Clearpath Robotics nor the names of its contributors may be used to endorse or +# promote products derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +# TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. ROS_DISTRO=${ROS_DISTRO:-kinetic} ROS_CONFIGURATION=${ROS_CONFIGURATION:-desktop_full} ROS_EXTRA_PACKAGES=${ROS_EXTRA_PACKAGES:-} ROS_INSTALL_DIR=${ROS_INSTALL_DIR:-/opt/ros/${ROS_DISTRO}} -# Homebrew -if ! hash brew 2>/dev/null; then - ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" - echo export PATH='/usr/local/bin:$PATH' >> ~/.bash_profile - source ~/.bash_profile - brew doctor -fi -brew update - -# XQuartz -if ! hash xquartz 2>/dev/null; then - brew install caskroom/cask/brew-cask - brew cask install xquartz - echo "Log out and in to finalize XQuartz setup." - exit 0 -fi - -# Check for pip packages in the system Python directory. -if [ $(ls /Library/Python/2.7/site-packages/ | wc -l) -gt 1 ]; then - echo "These instructions are about to install Python from Homebrew. However, there are already" - echo "pip packages installed against the system python, in the following path:" - echo - echo " /Library/Python/2.7/site-packages/" - echo - echo "If you have problems, please uninstall these packages:" - echo - echo " for i in \$( pip freeze ); do sudo -H pip uninstall -y \$i; done" - echo - echo "Then delete the build directory and start over again from scratch." -fi - -# Check for root-owned stuff in /usr/local -if [ $(find /usr/local/* -maxdepth 3 -type d -user root | wc -l) -gt 1 ]; then - echo "Looks like you have some stuff owned by the root user in /usr/local. The installation can" - echo "continue, but if there are pip packages which were installed using sudo, this will be a" - echo "problem if rosdep tries to update them. If you have issues installing dependencies, consider" - echo "nuking your Homebrew installation and starting from scratch:" - echo - echo " https://gist.github.com/mxcl/1173223" - echo - echo "Alternatively, you could try chowning the contents of /usr/local to yourself:" - echo - echo " sudo chown -R $USER:admin /usr/local/*" -fi - -# Brewed Python -if [ $(which python) != "/usr/local/bin/python" ]; then - brew install python - mkdir -p ~/Library/Python/2.7/lib/python/site-packages - echo "$(brew --prefix)/lib/python2.7/site-packages" >> ~/Library/Python/2.7/lib/python/site-packages/homebrew.pth -fi - -# ros -brew tap ros/deps - -# This tap gives us formulae for Gazebo and its dependencies, including SDF. -brew tap osrf/simulation - -# Homebrew science gives us vtk and PCL, among other things. -brew tap homebrew/science - -echo "Installing brew software" - -# fixes some compiling errors (will take awhile to compile) -brew install cmake --HEAD || true - -brew install boost --c++11 --with-icu4c -brew install boost-python - -# use gazebo8 and ogre1.9 for consistency with rviz -brew install ogre1.9 -brew install gazebo8 || true - -brew install libyaml || true -# brew install qt pyqt || true -# brew link qt --force || true -brew install qt5 pyqt5 sip -export CMAKE_PREFIX_PATH=$(brew --prefix qt5) - - -# fix from https://github.com/Homebrew/legacy-homebrew/issues/29938 for qt -# cmake errors on catkin build -echo export PATH='/usr/local/opt/qt5/bin:$PATH' >> ~/.bash_profile - -# This hack is required to make qt_gui_cpp compile correctly. See https://github.com/mikepurvis/ros-install-osx/pull/84#issuecomment-338209466 -pushd /usr/local/share/sip -if [ ! -e PyQt5 ]; then -ln -s Qt5 PyQt5 -fi -popd - -# Get homebrew's opencv3 from a bottle so that we don't have to build it. -brew install opencv3 - - - # Remove previous workspace if present, create and enter new one. -WS=${ROS_DISTRO}_${ROS_CONFIGURATION}_ws -if [ -d "$WS" ]; then -rm -rf "$WS" -fi -mkdir $WS -pushd $WS - -# Install the ROS infrastructure tools, you may have to run this several times until all python deps are properly installed -sudo -H pip install -U setuptools rosdep rosinstall_generator wstool rosinstall catkin_tools catkin_pkg bloom empy sphinx - -# Download ROS sources -rosinstall_generator ${ROS_CONFIGURATION} --rosdistro kinetic --deps > kinetic.rosinstall -rosinstall_generator geometry2 --rosdistro kinetic --upstream-development > geometry2.rosinstall -# rosinstall_generator class_loader --rosdistro kinetic --upstream-development > class_loader.rosinstall -# rosinstall_generator rospack --rosdistro lunar --upstream-development > rospack.rosinstall -rosinstall_generator rviz --rosdistro kinetic --upstream-development > rviz.rosinstall -# rosinstall_generator gazebo_ros_control --rosdistro kinetic --deps-only --deps --deps-depth 1 --exclude gazebo_dev gazebo_ros > gazebo8_ros_pkgs_deps.rosinstall -# rosinstall_generator realtime_tools ros_control --rosdistro kinetic --deps --deps-depth 1 > extra_deps.rosinstall - -mkdir src -pushd src - -wstool init - -# base install -wstool merge -ry ../kinetic.rosinstall - -# so that tf2 has tf2_tools -wstool merge -ry ../geometry2.rosinstall - -# remove gazebo7 support and add gazebo8 -wstool set gazebo_ros_pkgs --git https://github.com/ros-simulation/gazebo_ros_pkgs -v 2.5.14 -y -wstool remove gazebo_ros_pkgs/gazebo_ros_pkgs gazebo_ros_pkgs/gazebo_ros gazebo_ros_pkgs/gazebo_plugins gazebo_ros_pkgs/gazebo_msgs gazebo_ros_pkgs/gazebo_dev - -# need upstream-dev to fix compiling errors -wstool merge -ry ../rviz.rosinstall - -# don't need to compile this -wstool remove opencv3 - -wstool update -j8 - -popd - -# Initialize and update rosdep -if [ ! -d /etc/ros/rosdep/ ]; then - echo "This sudo prompt is to initialize rosdep (creates the /etc/ros/rosdep path)." - sudo rosdep init -fi -if [ ! -f /etc/ros/rosdep/10-ros-install-osx.list ]; then - echo "This sudo prompt adds the the brewed python rosdep yaml to /etc/ros/rosdep/10-ros-install-osx.list." - sudo sh -c "echo 'yaml https://raw.githubusercontent.com/smnogar/ros-install-osx/high-sierra/rosdeps.yaml osx' > /etc/ros/rosdep/sources.list.d/10-ros-install-osx.list" -fi - -# # Install the necessary ROS dependencies -# sudo rosdep init -rosdep update -rosdep check --from-paths src --ignore-src --rosdistro kinetic --skip-keys="gazebo7 libgazebo7-dev ogre" -y -rosdep install --from-paths src --ignore-src --rosdistro kinetic --skip-keys="gazebo7 libgazebo7-dev ogre" -y - - -# This patch originates from here: https://github.com/ros/catkin/pull/784 -# this is necessary for python to find dylibs -if [ -d src/catkin ]; then - pushd src/catkin/cmake - curl https://raw.githubusercontent.com/ros/catkin/8a47f4eceb4954beb4a5b38b50793d0bbe2c96cf/cmake/catkinConfig.cmake.in > catkinConfig.cmake.in - popd -fi - -# this is importnat for python to work -ln -s /usr/local/share/sip/Qt5 /usr/local/share/sip/PyQt5 - -# this may help -# brew link --force qt5 && ln -s /usr/local/Cellar/qt5/5.4.0/mkspecs /usr/local/mkspecs && ln -s /usr/local/Cellar/qt5/5.4.0/plugins /usr/local/plugins - - -catkin config --install \ ---install-space /opt/ros/kinetic \ ---cmake-args \ - -DCATKIN_ENABLE_TESTING=1 \ - -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_FIND_FRAMEWORK=LAST \ - -DPYTHON_EXECUTABLE=$(which python2) \ - -DPYTHON_LIBRARY=$(python2 -c "import sys; print sys.prefix")/lib/libpython2.7.dylib \ - -DPYTHON_INCLUDE_DIR=$(python2 -c "import sys; print sys.prefix")/include/python2.7 -catkin build --limit-status-rate 1 - - -# Check for SIP if on OSX/macOS 10.11 (El Capitan) or later -if [[ `sw_vers -productVersion` > "10.10" ]] -then - if `csrutil status | grep -q enabled` - then - echo "You have System Integrity Protection enabled." - echo - echo "This prevents DYLD_LIBRARY_PATH from being exported to subshells" - echo "Please add: export DYLD_LIBRARY_PATH=\$DYLD_LIBRARY_PATH:/opt/ros/\$ROS_DISTRO/lib" - echo "To the start of /opt/ros/$ROS_DISTRO/bin/rosrun to work around the issue." - fi -fi \ No newline at end of file +do_install() +{ + set -e + + # Homebrew + if ! hash brew 2>/dev/null; then + ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" + echo export PATH='/usr/local/bin:$PATH' >> ~/.bash_profile + source ~/.bash_profile + brew doctor + fi + brew update + + # XQuartz + if ! hash xquartz 2>/dev/null; then + brew install caskroom/cask/brew-cask + brew cask install xquartz + echo "Log out and in to finalize XQuartz setup." + exit 0 + fi + + # Check for pip packages in the system Python directory. + if [ $(ls /Library/Python/2.7/site-packages/ | wc -l) -gt 1 ]; then + echo "These instructions are about to install Python from Homebrew. However, there are already" + echo "pip packages installed against the system python, in the following path:" + echo + echo " /Library/Python/2.7/site-packages/" + echo + echo "If you have problems, please uninstall these packages:" + echo + echo " for i in \$( pip freeze ); do sudo -H pip uninstall -y \$i; done" + echo + echo "Then delete the build directory and start over again from scratch." + fi + + # Check for root-owned stuff in /usr/local + if [ $(find /usr/local/* -maxdepth 3 -type d -user root | wc -l) -gt 1 ]; then + echo "Looks like you have some stuff owned by the root user in /usr/local. The installation can" + echo "continue, but if there are pip packages which were installed using sudo, this will be a" + echo "problem if rosdep tries to update them. If you have issues installing dependencies, consider" + echo "nuking your Homebrew installation and starting from scratch:" + echo + echo " https://gist.github.com/mxcl/1173223" + echo + echo "Alternatively, you could try chowning the contents of /usr/local to yourself:" + echo + echo " sudo chown -R $USER:admin /usr/local/*" + fi + + # Brewed Python + if [ ! "$(which python2)" = "/usr/local/bin/python2" ]; then + brew install python + mkdir -p ~/Library/Python/2.7/lib/python/site-packages + echo "$(brew --prefix)/lib/python2.7/site-packages" >> ~/Library/Python/2.7/lib/python/site-packages/homebrew.pth + fi + + # Gives us console_bridge, urdfdom, and gtest. + brew tap ros/deps + + # This tap gives us formulae for Gazebo and its dependencies, including SDF. + brew tap osrf/simulation + + # Homebrew science gives us vtk and PCL, among other things. + brew tap homebrew/science + + # ROS infrastructure tools + brew install libyaml || true + pip2 install -U setuptools rosdep rosinstall_generator wstool rosinstall catkin_tools bloom empy sphinx pycurl + + # Rosdep has an issue detecting that qt5 is correctly installed, so preinstall it. This is a keg-only formula, + # so add its location to the prefix path in order for workspace packages to be able to find it. + brew install qt5 pyqt5 sip + export CMAKE_PREFIX_PATH=$(brew --prefix qt5) + + # This hack is required to make qt_gui_cpp compile correctly. See https://github.com/mikepurvis/ros-install-osx/pull/84#issuecomment-338209466 + pushd /usr/local/share/sip + if [ ! -e PyQt5 ]; then + ln -s Qt5 PyQt5 + fi + popd + + # Get homebrew's opencv3 from a bottle so that we don't have to build it. + brew install opencv3 + + # Mock out python and pip so that we get the brewed versions when rosdep and other programs call them. + # Mock out pip so that we get the brewed pip2 when rosdep calls it to make an installation. + export PATH=$(pwd)/shim:$PATH + + # Initialize and update rosdep + if [ ! -d /etc/ros/rosdep/ ]; then + echo "This sudo prompt is to initialize rosdep (creates the /etc/ros/rosdep path)." + sudo rosdep init + fi + if [ ! -f /etc/ros/rosdep/sources.list.d/10-ros-install-osx.list ]; then + echo "This sudo prompt adds the the brewed python rosdep yaml to /etc/ros/rosdep/sources.list.d/10-ros-install-osx.list" + sudo sh -c "echo 'yaml file://$(pwd)/rosdeps.yaml osx' > /etc/ros/rosdep/sources.list.d/10-ros-install-osx.list" + fi + rosdep update + + # Remove previous workspace if present, create and enter new one. + WS=${ROS_DISTRO}_${ROS_CONFIGURATION}_ws + if [ -d "$WS" ]; then + rm -rf "$WS" + fi + mkdir $WS + cd $WS + + # Standard source install + rosinstall_generator ${ROS_CONFIGURATION} ${ROS_EXTRA_PACKAGES} --rosdistro ${ROS_DISTRO} --deps --tar > ${WS}.rosinstall + wstool init src + pushd src + # Avoid downloading opencv3; we already installed it from homebrew. + wstool merge file://$(pwd)/../${WS}.rosinstall + wstool remove opencv3 + + # kinetic rospack fails to compile with new versions of boost + wstool rm rospack + wstool set rospack --git https://github.com/ros/rospack.git + wstool update -j8 --delete-changed-uris + + # See: https://github.com/ros/catkin/pull/784 + if [ -d catkin ]; then + curl https://raw.githubusercontent.com/ros/catkin/8a47f4eceb4954beb4a5b38b50793d0bbe2c96cf/cmake/catkinConfig.cmake.in > catkin/cmake/catkinConfig.cmake.in + fi + + # Pending release: https://github.com/ros-visualization/rviz/pull/1165 + if [ -d rviz ]; then + curl https://raw.githubusercontent.com/mikepurvis/rviz/21eac2bcc061bb623fd17aa449f6215c493b27f2/CMakeLists.txt > rviz/CMakeLists.txt + fi + + if [ -d image_pipeline ]; then + # Pending merge and release: https://github.com/ros-perception/image_pipeline/pull/303 + curl https://raw.githubusercontent.com/mikepurvis/image_pipeline/d308d00aed5b66961f9e13ab7a50660a24be7c7f/image_proc/CMakeLists.txt > image_pipeline/image_proc/CMakeLists.txt + curl https://raw.githubusercontent.com/mikepurvis/image_pipeline/d308d00aed5b66961f9e13ab7a50660a24be7c7f/stereo_image_proc/CMakeLists.txt > image_pipeline/stereo_image_proc/CMakeLists.txt + + # Pending merge and release: https://github.com/ros-perception/image_pipeline/pull/304 + curl https://raw.githubusercontent.com/mbreyer/image_pipeline/4bf67d3c861cb157e8174f67250680263b18d2b7/image_publisher/CMakeLists.txt > image_pipeline/image_publisher/CMakeLists.txt + fi + + # Package dependencies. + rosdep install --from-paths . --ignore-src --rosdistro ${ROS_DISTRO} -y --as-root pip:no + popd + + # Clean out or create the install directory. + if [ -d ${ROS_INSTALL_DIR} ]; then + rm -rf ${ROS_INSTALL_DIR}/* + else + echo "This sudo prompt is to create and chown ${ROS_INSTALL_DIR}." + sudo mkdir -p ${ROS_INSTALL_DIR} + sudo chown $USER ${ROS_INSTALL_DIR} + fi + + # Parallel build. + catkin config --install \ + --install-space ${ROS_INSTALL_DIR} \ + --cmake-args \ + -DCATKIN_ENABLE_TESTING=1 \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_FIND_FRAMEWORK=LAST \ + -DPYTHON_EXECUTABLE=$(which python2) \ + -DPYTHON_LIBRARY=$(python2 -c "import sys; print sys.prefix")/lib/libpython2.7.dylib \ + -DPYTHON_INCLUDE_DIR=$(python2 -c "import sys; print sys.prefix")/include/python2.7 + catkin build --limit-status-rate 1 + + echo "Installation successful, please source the ROS workspace:" + echo + echo " source ${ROS_INSTALL_DIR}/setup.bash" + echo + + # Check for SIP if on OSX/macOS 10.11 (El Capitan) or later + if [[ `sw_vers -productVersion` > "10.10" ]] + then + if `csrutil status | grep -q enabled` + then + echo "You have System Integrity Protection enabled." + echo + echo "This prevents DYLD_LIBRARY_PATH from being exported to subshells" + echo "Please add: export DYLD_LIBRARY_PATH=\$DYLD_LIBRARY_PATH:/opt/ros/\$ROS_DISTRO/lib" + echo "To the start of /opt/ros/$ROS_DISTRO/bin/rosrun to work around the issue." + fi + fi +} + +do_install diff --git a/rosdeps.yaml b/rosdeps.yaml index 779f087..086fd1a 100644 --- a/rosdeps.yaml +++ b/rosdeps.yaml @@ -1,46 +1,93 @@ -boost: +# Override the default key to get us Ogre 1.9 instead of 1.7. +libogre-dev: osx: homebrew: - packages: [boost, boost-python] -ogre: + packages: [ogre1.9] + +# Use Gazebo 8 instead of 7. +gazebo: osx: homebrew: - package: [ogre1.9] -matplotlib: - osx: - pip: - packages: [pip, matplotlib] -libpcl-all-dev: + packages: [gazebo8] +gazebo7: osx: - homebrew: - packages: [pcl] -gazebo: + homebrew: + packages: [gazebo8] +libgazebo7-dev: osx: homebrew: packages: [gazebo8] + +# Don't try to install opencv3 +opencv3: + osx: + homebrew: + packages: [] + +# Installing all this Python stuff from homebrew instead of pip +# means we get pre-built bottles and don't have to build it all +# each time. python: osx: homebrew: packages: [python] pip: packages: [pip, setuptools, nose] -python-imaging: +python-matplotlib: osx: - pip: - packages: [pip, Pillow] + homebrew: + packages: [homebrew/science/matplotlib] python-numpy: osx: homebrew: packages: [numpy] -python-scapy: - osx: - pip: - packages: [pip, scapy] python-scipy: osx: homebrew: packages: [scipy] python-wxtools: osx: - pip: - packages: [pip, wxPython] \ No newline at end of file + homebrew: + packages: [wxmac] + +# Zero out all the QT5 keys. We'll install it ourselves upfront. +libqt5-opengl-dev: + osx: + homebrew: + packages: [] +libqt5-opengl: + osx: + homebrew: + packages: [] +libqt5-core: + osx: + homebrew: + packages: [] +python-qt5-bindings-gl: + osx: + homebrew: + packages: [] +python-qt5-bindings-webkit: + osx: + homebrew: + packages: [] +libqt5-gui: + osx: + homebrew: + packages: [] +libqt5-widgets: + osx: + homebrew: + packages: [] +qtbase5-dev: + osx: + homebrew: + packages: [] +qt5-qmake: + osx: + homebrew: + packages: [] +python-qt5-bindings: + osx: + homebrew: + packages: [] \ No newline at end of file From e6952b096cf9504148abd599913af82506c6c570 Mon Sep 17 00:00:00 2001 From: Stephen Nogar Date: Wed, 20 Dec 2017 13:28:08 -0500 Subject: [PATCH 21/60] updated readme --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 2f2b9ce..d72f04a 100644 --- a/README.md +++ b/README.md @@ -173,4 +173,7 @@ Below are assorted tips that I have compiled for fixing any issues that can crop * `ulimit -n 65536` * [If running out of pty devices](https://codybonney.com/increase-the-max-number-of-ptys-on-os-x-10-8-3/) * image_publisher currently fails. [See this fix](https://github.com/ros-perception/image_pipeline/pull/304) -* For Gazebo plugins, don't forget to setup `/opt/ros/kinetic/lib` in `GAZEBO_PLUGIN_PATH` and to export it into env \ No newline at end of file +* For Gazebo plugins, don't forget to setup `/opt/ros/kinetic/lib` in `GAZEBO_PLUGIN_PATH` and to export it into env +* mavros/mavlink + * [workaround to get mavros to compile (endian.h) errors] (https://github.com/mavlink/mavros/issues/851) + * libmavconn fails with Boost 1.66, use 1.65.1 \ No newline at end of file From 2a5be10677967200bc883dfd20b381596559aed1 Mon Sep 17 00:00:00 2001 From: Stephen Nogar Date: Wed, 20 Dec 2017 15:06:01 -0500 Subject: [PATCH 22/60] more updates to readme --- README.md | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index d72f04a..be7db21 100644 --- a/README.md +++ b/README.md @@ -142,20 +142,9 @@ Below are assorted tips that I have compiled for fixing any issues that can crop * Can’t detect correct qt installation * Important steps to get kinetic to work (all of these are critical): * Make sure using brew python/pip - * Use boost@1.59 —c++11 —with-icu4c - * Newest version (1.65) does not include tr1 libraries so some packages fail * Rviz needs ogre1.9 - * Follow attached install script - * make sure to "brew link qt5 —force” -* boost 1.65 causes major problems - * rviz does not compile with it - * this issue is related: https://github.com/osrf/homebrew-simulation/issues/267 * Gazebo8 - * Uses Ogre1.9, requires "gazebo8_ros_pkgs-release” to integrate with ROS kinetic -* Geometry2 - * Better support for tf2 -* cmake args: - *Use install script + * Uses Ogre1.9 * High Sierra * Make sure to set `ROS_MASTER_URI` to the actual machine name * Otherwise significant delays exist in running especially python based commands @@ -175,5 +164,4 @@ Below are assorted tips that I have compiled for fixing any issues that can crop * image_publisher currently fails. [See this fix](https://github.com/ros-perception/image_pipeline/pull/304) * For Gazebo plugins, don't forget to setup `/opt/ros/kinetic/lib` in `GAZEBO_PLUGIN_PATH` and to export it into env * mavros/mavlink - * [workaround to get mavros to compile (endian.h) errors] (https://github.com/mavlink/mavros/issues/851) - * libmavconn fails with Boost 1.66, use 1.65.1 \ No newline at end of file + * [workaround to get mavros to compile (endian.h) errors] (https://github.com/mavlink/mavros/issues/851) \ No newline at end of file From 83d336c19d5674cfed99a5477ae300d9e45a0683 Mon Sep 17 00:00:00 2001 From: Stephen Nogar Date: Thu, 21 Dec 2017 19:03:15 -0500 Subject: [PATCH 23/60] Found fix for gazebo not working right --- install | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/install b/install index ee822b9..7f9a46e 100755 --- a/install +++ b/install @@ -142,10 +142,13 @@ do_install() wstool merge file://$(pwd)/../${WS}.rosinstall wstool remove opencv3 - # kinetic rospack fails to compile with new versions of boost - wstool rm rospack - wstool set rospack --git https://github.com/ros/rospack.git - wstool update -j8 --delete-changed-uris + # fix for old boost version errors + if [ "${ROS_DISTRO}" = "kinetic" ]; then + wstool rm rospack + wstool set rospack --git https://github.com/ros/rospack.git -y + fi + wstool update -j8 + # See: https://github.com/ros/catkin/pull/784 if [ -d catkin ]; then @@ -166,6 +169,11 @@ do_install() curl https://raw.githubusercontent.com/mbreyer/image_pipeline/4bf67d3c861cb157e8174f67250680263b18d2b7/image_publisher/CMakeLists.txt > image_pipeline/image_publisher/CMakeLists.txt fi + # this causes issues for some nodes. See https://github.com/ros/ros_comm/issues/1207 + if [ -d ros_comm ]; then + curl https://raw.githubusercontent.com/ros/ros_comm/2d987bcbb46768168dccdd58f35bdee8b705d52a/tools/rosmaster/src/rosmaster/util.py > ros_comm/rosmaster/src/rosmaster/util.py + fi + # Package dependencies. rosdep install --from-paths . --ignore-src --rosdistro ${ROS_DISTRO} -y --as-root pip:no popd From 71052f971278866f20eb42a6604529642314abb1 Mon Sep 17 00:00:00 2001 From: Stephen Nogar Date: Thu, 21 Dec 2017 19:17:00 -0500 Subject: [PATCH 24/60] Fixed link to correct version --- install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install b/install index 7f9a46e..e385af1 100755 --- a/install +++ b/install @@ -171,7 +171,7 @@ do_install() # this causes issues for some nodes. See https://github.com/ros/ros_comm/issues/1207 if [ -d ros_comm ]; then - curl https://raw.githubusercontent.com/ros/ros_comm/2d987bcbb46768168dccdd58f35bdee8b705d52a/tools/rosmaster/src/rosmaster/util.py > ros_comm/rosmaster/src/rosmaster/util.py + curl https://raw.githubusercontent.com/ros/ros_comm/d727416e243b0ae0757754d540648f01b13d990a/tools/rosmaster/src/rosmaster/util.py > ros_comm/rosmaster/src/rosmaster/util.py fi # Package dependencies. From 50758e370ae2ab754e0e481c4af4fb0cddf64d27 Mon Sep 17 00:00:00 2001 From: Stephen Nogar Date: Wed, 3 Jan 2018 15:24:38 -0500 Subject: [PATCH 25/60] added custom rosdeps --- rosdeps.yaml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/rosdeps.yaml b/rosdeps.yaml index 086fd1a..395da34 100644 --- a/rosdeps.yaml +++ b/rosdeps.yaml @@ -24,9 +24,20 @@ opencv3: homebrew: packages: [] +geographiclib: + osx: + homebrew: + packages: [geographiclib] +geographiclib-tools: + osx: + homebrew: + packages: [] + + # Installing all this Python stuff from homebrew instead of pip # means we get pre-built bottles and don't have to build it all # each time. + python: osx: homebrew: From c327cac222f20d37add578d6c68ab6b2f1adab88 Mon Sep 17 00:00:00 2001 From: Steve Nogar Date: Thu, 4 Jan 2018 17:13:11 -0500 Subject: [PATCH 26/60] Added entry to ignore linux joystick drivers --- README.md | 5 +++-- rosdeps.yaml | 5 +++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index be7db21..5348916 100644 --- a/README.md +++ b/README.md @@ -157,10 +157,11 @@ Below are assorted tips that I have compiled for fixing any issues that can crop * `ulimit -n 4096` * See [here](https://superuser.com/questions/433746/is-there-a-fix-for-the-too-many-open-files-in-system-error-on-os-x-10-7-1) for details * or - * `sudo sysctl -w kern.maxfiles=67584` - * `sudo sysctl -w kern.maxfilesperproc=65536 # (67584 - 2048)` + * `sudo sysctl -w kern.maxfiles=99999` + * `sudo sysctl -w kern.maxfilesperproc=99999` * `ulimit -n 65536` * [If running out of pty devices](https://codybonney.com/increase-the-max-number-of-ptys-on-os-x-10-8-3/) + * `sudo sysctl -w kern.tty.ptmx_max=999` * image_publisher currently fails. [See this fix](https://github.com/ros-perception/image_pipeline/pull/304) * For Gazebo plugins, don't forget to setup `/opt/ros/kinetic/lib` in `GAZEBO_PLUGIN_PATH` and to export it into env * mavros/mavlink diff --git a/rosdeps.yaml b/rosdeps.yaml index 395da34..1172301 100644 --- a/rosdeps.yaml +++ b/rosdeps.yaml @@ -33,6 +33,11 @@ geographiclib-tools: homebrew: packages: [] +# ignore joystick drivers +joy: + osx: + homebrew: + packages: [] # Installing all this Python stuff from homebrew instead of pip # means we get pre-built bottles and don't have to build it all From b10f506a10d166c1db6ce1a551f42722d016addc Mon Sep 17 00:00:00 2001 From: Steve Nogar Date: Thu, 12 Jul 2018 10:12:10 -0400 Subject: [PATCH 27/60] fixes for boost 1.67 and rosconsole --- README.md | 72 ++++++++++++++++++++++++++++++++++++++++++++++------ install | 59 ++++++++++++++++++++++++------------------ rosdeps.yaml | 44 +++++++++++++++++++++++++++++--- 3 files changed, 140 insertions(+), 35 deletions(-) diff --git a/README.md b/README.md index 5348916..bc46d9b 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,10 @@ ros-install-osx [![Build Status](https://travis-ci.org/mikepurvis/ros-install-osx.svg?branch=master)](https://travis-ci.org/mikepurvis/ros-install-osx) =============== +**Note: This should work as of 7/11/18** + +* This commonly breaks depending on what gets pushed over brew and whether the corresponding packages update deprecated code. + This repo aims to maintain a usable, scripted, up-to-date installation procedure for [ROS](http://ros.org), currently Lunar. The intent is that the `install` script may be executed on a El Capitan or newer machine and produce a working desktop_full @@ -135,34 +139,86 @@ Below are assorted tips that I have compiled for fixing any issues that can crop * It is basically impossible to get indigo to work on macOS sierra * This has to do with home-brew dropping qt4 support: https://github.com/mikepurvis/ros-install-osx/issues/63 + * Could also install indigo on snapdragon, but would take a VERY long time to install + * rosdep —skip-keys command is useful for resolving dependencies * rosdep check --from-paths src --ignore-src --rosdistro kinetic --skip-keys geographiclib --skip-keys geographiclib-tools + * Indigo still doesn’t work using qt@4 * Can’t detect correct qt installation + * Important steps to get kinetic to work (all of these are critical): * Make sure using brew python/pip * Rviz needs ogre1.9 + * Gazebo8 * Uses Ogre1.9 + * High Sierra * Make sure to set `ROS_MASTER_URI` to the actual machine name * Otherwise significant delays exist in running especially python based commands + * If having QT errors compiling look at the end of this thread: * https://github.com/Homebrew/legacy-homebrew/issues/29938 * Basically add path + * Command for updating pip if getting weird python errors * pip freeze --local | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 pip install -U + * If you start getting weird errors with accessing too many files, try: - * `ulimit -n 4096` - * See [here](https://superuser.com/questions/433746/is-there-a-fix-for-the-too-many-open-files-in-system-error-on-os-x-10-7-1) for details - * or - * `sudo sysctl -w kern.maxfiles=99999` - * `sudo sysctl -w kern.maxfilesperproc=99999` - * `ulimit -n 65536` + * `ulimit -n 4096` + * See [here](https://superuser.com/questions/433746/is-there-a-fix-for-the-too-many-open-files-in-system-error-on-os-x-10-7-1) for details + * or + * `sudo sysctl -w kern.maxfiles=99999` + * `sudo sysctl -w kern.maxfilesperproc=99999` + * `ulimit -n 65536` + * [If running out of pty devices](https://codybonney.com/increase-the-max-number-of-ptys-on-os-x-10-8-3/) - * `sudo sysctl -w kern.tty.ptmx_max=999` + * `sudo sysctl -w kern.tty.ptmx_max=999` + * image_publisher currently fails. [See this fix](https://github.com/ros-perception/image_pipeline/pull/304) + * For Gazebo plugins, don't forget to setup `/opt/ros/kinetic/lib` in `GAZEBO_PLUGIN_PATH` and to export it into env + * mavros/mavlink - * [workaround to get mavros to compile (endian.h) errors] (https://github.com/mavlink/mavros/issues/851) \ No newline at end of file + * [workaround to get mavros to compile (endian.h) errors] (https://github.com/mavlink/mavros/issues/851) + +* If errors are encountered such as: + + ``` + Errors << qt_gui_cpp:cmake /Users/steve/Documents_local/temp/kinetic/logs/qt_gui_cpp/build.cmake.000.log + CMake Error at /Users/steve/Documents/ARL/Snapdragon/ros-install-osx/kinetic_desktop_full_ws/src/qt_gui_core/qt_gui_cpp/src/qt_gui_cpp/CMakeLists.txt:3 (find_package): + By not providing "FindQt5Widgets.cmake" in CMAKE_MODULE_PATH this project + has asked CMake to find a package configuration file provided by + "Qt5Widgets", but CMake did not find one. + + Could not find a package configuration file provided by "Qt5Widgets" with + any of the following names: + + Qt5WidgetsConfig.cmake + qt5widgets-config.cmake + + Add the installation prefix of "Qt5Widgets" to CMAKE_PREFIX_PATH or set + "Qt5Widgets_DIR" to a directory containing one of the above files. If + "Qt5Widgets" provides a separate development package or SDK, be sure it has + been installed. + ``` + + * It means qt or pyqt are not correctly installed or in the path. Try the various relevant lines in the installation script such as: + + * + + ``` + pushd /usr/local/share/sip + if [ ! -e PyQt5 ]; then + ln -s Qt5 PyQt5 + fi + popd + ``` + + * `export PATH=$(pwd)/shim:$PATH` + + * `brew link qt --force ` + + * `export PATH="/usr/local/opt/qt/bin:$PATH" ` \ No newline at end of file diff --git a/install b/install index e385af1..c1b8d4c 100755 --- a/install +++ b/install @@ -77,11 +77,11 @@ do_install() fi # Brewed Python - if [ ! "$(which python2)" = "/usr/local/bin/python2" ]; then - brew install python - mkdir -p ~/Library/Python/2.7/lib/python/site-packages - echo "$(brew --prefix)/lib/python2.7/site-packages" >> ~/Library/Python/2.7/lib/python/site-packages/homebrew.pth - fi + # if [ ! "$(which python2)" = "/usr/local/bin/python2" ]; then + # brew install python@2 + # mkdir -p ~/Library/Python/2.7/lib/python/site-packages + # echo "$(brew --prefix)/lib/python2.7/site-packages" >> ~/Library/Python/2.7/lib/python/site-packages/homebrew.pth + # fi # Gives us console_bridge, urdfdom, and gtest. brew tap ros/deps @@ -89,12 +89,9 @@ do_install() # This tap gives us formulae for Gazebo and its dependencies, including SDF. brew tap osrf/simulation - # Homebrew science gives us vtk and PCL, among other things. - brew tap homebrew/science - # ROS infrastructure tools brew install libyaml || true - pip2 install -U setuptools rosdep rosinstall_generator wstool rosinstall catkin_tools bloom empy sphinx pycurl + pip install -U setuptools rosdep rosinstall_generator wstool rosinstall catkin_tools bloom empy sphinx pycurl # Rosdep has an issue detecting that qt5 is correctly installed, so preinstall it. This is a keg-only formula, # so add its location to the prefix path in order for workspace packages to be able to find it. @@ -149,31 +146,42 @@ do_install() fi wstool update -j8 + # patch in latest python_qt_binding + wstool remove python_qt_binding + wstool set python_qt_binding --git https://github.com/ros-visualization/python_qt_binding.git + + # patch rostime for boost 1.67, obsolete once https://github.com/ros/roscpp_core/pull/79 is integrated in main branch + curl https://raw.githubusercontent.com/lsolanka/roscpp_core/e5de3c20eb178683c78e225d00bf0f47c48895a5/rostime/include/ros/impl/duration.h > roscpp_core/rostime/include/ros/impl/duration.h + curl https://raw.githubusercontent.com/lsolanka/roscpp_core/e5de3c20eb178683c78e225d00bf0f47c48895a5/rostime/include/ros/impl/time.h > roscpp_core/rostime/include/ros/impl/time.h + + # fix boncpp (Fixed in commit 1240bce but not released yet) + curl https://raw.githubusercontent.com/ros/bond_core/1240bce50ca1538cdad07dc472d31797257e0851/bondcpp/src/bond.cpp > bond_core/bondcpp/src/bond.cpp + + # add custom install for image_common/camera_calibration_parsers + curl https://raw.githubusercontent.com/smnogar/image_common/51969339f1fd7034952fa8c3d18b88fb015153c5/camera_calibration_parsers/CMakeLists.txt > image_common/camera_calibration_parsers/CMakeLists.txt + + # fix boost_python errors for cv_bridge + curl https://raw.githubusercontent.com/berkaydeniz/vision_opencv/9a7be3e4aabd69cdb5d1dc79e0bbe13f421ccba3/cv_bridge/CMakeLists.txt > vision_opencv/cv_bridge/CMakeLists.txt + + # add custom install for actionlib + curl https://raw.githubusercontent.com/ros/actionlib/677e952fcbfe49e6e4c5b835357f88740f49c6ff/include/actionlib/client/simple_action_client.h > actionlib/include/actionlib/client/simple_action_client.h + curl https://raw.githubusercontent.com/ros/actionlib/677e952fcbfe49e6e4c5b835357f88740f49c6ff/include/actionlib/destruction_guard.h > actionlib/include/actionlib/destruction_guard.h + curl https://raw.githubusercontent.com/ros/actionlib/677e952fcbfe49e6e4c5b835357f88740f49c6ff/include/actionlib/server/simple_action_server_imp.h > actionlib/include/actionlib/server/simple_action_server_imp.h + curl https://raw.githubusercontent.com/ros/actionlib/677e952fcbfe49e6e4c5b835357f88740f49c6ff/src/connection_monitor.cpp > actionlib/src/connection_monitor.cpp + + # patch tf2 (rosconsole errors are only fixed for melotic geometry 2 release) + curl https://raw.githubusercontent.com/ros/geometry2/0173a538f89c66e2783dc67ee3609660625e16b4/tf2/src/buffer_core.cpp > geometry2/tf2/src/buffer_core.cpp # See: https://github.com/ros/catkin/pull/784 if [ -d catkin ]; then curl https://raw.githubusercontent.com/ros/catkin/8a47f4eceb4954beb4a5b38b50793d0bbe2c96cf/cmake/catkinConfig.cmake.in > catkin/cmake/catkinConfig.cmake.in fi - # Pending release: https://github.com/ros-visualization/rviz/pull/1165 - if [ -d rviz ]; then - curl https://raw.githubusercontent.com/mikepurvis/rviz/21eac2bcc061bb623fd17aa449f6215c493b27f2/CMakeLists.txt > rviz/CMakeLists.txt - fi - if [ -d image_pipeline ]; then - # Pending merge and release: https://github.com/ros-perception/image_pipeline/pull/303 - curl https://raw.githubusercontent.com/mikepurvis/image_pipeline/d308d00aed5b66961f9e13ab7a50660a24be7c7f/image_proc/CMakeLists.txt > image_pipeline/image_proc/CMakeLists.txt - curl https://raw.githubusercontent.com/mikepurvis/image_pipeline/d308d00aed5b66961f9e13ab7a50660a24be7c7f/stereo_image_proc/CMakeLists.txt > image_pipeline/stereo_image_proc/CMakeLists.txt - # Pending merge and release: https://github.com/ros-perception/image_pipeline/pull/304 curl https://raw.githubusercontent.com/mbreyer/image_pipeline/4bf67d3c861cb157e8174f67250680263b18d2b7/image_publisher/CMakeLists.txt > image_pipeline/image_publisher/CMakeLists.txt fi - # this causes issues for some nodes. See https://github.com/ros/ros_comm/issues/1207 - if [ -d ros_comm ]; then - curl https://raw.githubusercontent.com/ros/ros_comm/d727416e243b0ae0757754d540648f01b13d990a/tools/rosmaster/src/rosmaster/util.py > ros_comm/rosmaster/src/rosmaster/util.py - fi - # Package dependencies. rosdep install --from-paths . --ignore-src --rosdistro ${ROS_DISTRO} -y --as-root pip:no popd @@ -190,8 +198,11 @@ do_install() # Parallel build. catkin config --install \ --install-space ${ROS_INSTALL_DIR} \ + --log-space ${CUSTOM_BUILD_DIR}/logs + --build-space ${CUSTOM_BUILD_DIR}/build + --devel-space ${CUSTOM_BUILD_DIR}/devel --cmake-args \ - -DCATKIN_ENABLE_TESTING=1 \ + -DCATKIN_ENABLE_TESTING=0 \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_FIND_FRAMEWORK=LAST \ -DPYTHON_EXECUTABLE=$(which python2) \ diff --git a/rosdeps.yaml b/rosdeps.yaml index 1172301..8c543c1 100644 --- a/rosdeps.yaml +++ b/rosdeps.yaml @@ -51,8 +51,8 @@ python: packages: [pip, setuptools, nose] python-matplotlib: osx: - homebrew: - packages: [homebrew/science/matplotlib] + pip: + packages: [matplotlib] python-numpy: osx: homebrew: @@ -106,4 +106,42 @@ qt5-qmake: python-qt5-bindings: osx: homebrew: - packages: [] \ No newline at end of file + packages: [] +google-mock: + osx: + homebrew: + pacakges: [] +gtest: + osx: + homebrew: + packages: [] + +python: + osx: + homebrew: + packages: [python@2] + +sdl: + osx: + homebrew: + packages: [sdl] + +ompl: + osx: + homebrew: + packages: [ompl] + +bfl: + osx: + homebrew: + packages: [] + +fcl: + osx: + homebrew: + packages: [fcl] + +libfcl-dev: + osx: + homebrew: + packages: [fcl] \ No newline at end of file From 239c7cb6f6c716f78e4292dad6766ef4f09fbb3a Mon Sep 17 00:00:00 2001 From: Steve Nogar Date: Thu, 12 Jul 2018 10:15:51 -0400 Subject: [PATCH 28/60] fix custom build dir --- install | 1 + 1 file changed, 1 insertion(+) diff --git a/install b/install index c1b8d4c..82f7060 100755 --- a/install +++ b/install @@ -26,6 +26,7 @@ ROS_DISTRO=${ROS_DISTRO:-kinetic} ROS_CONFIGURATION=${ROS_CONFIGURATION:-desktop_full} ROS_EXTRA_PACKAGES=${ROS_EXTRA_PACKAGES:-} ROS_INSTALL_DIR=${ROS_INSTALL_DIR:-/opt/ros/${ROS_DISTRO}} +CUSTOM_BUILD_DIR=${CUSTOM_BUILD_DIR:.} do_install() { From 8d08ebeaa8ecda94a418957ea53f613bb8c365a3 Mon Sep 17 00:00:00 2001 From: Steve Nogar Date: Sun, 16 Sep 2018 13:20:36 -0400 Subject: [PATCH 29/60] update for melodic as default --- README.md | 14 ++++++++- install | 86 ++++++++++++++++++++++++++++++++-------------------- rosdeps.yaml | 33 +++++++++++++++----- 3 files changed, 92 insertions(+), 41 deletions(-) diff --git a/README.md b/README.md index bc46d9b..6b9ae7a 100644 --- a/README.md +++ b/README.md @@ -133,6 +133,8 @@ The installation script should have detected that and *suggested* a quick fix. Please refer to the very last section of [`install`](https://github.com/mikepurvis/ros-install-osx/blob/master/install) +**It is strongly recommended to disable SIP** + #### Assorted notes Below are assorted tips that I have compiled for fixing any issues that can crop up. @@ -221,4 +223,14 @@ Below are assorted tips that I have compiled for fixing any issues that can crop * `brew link qt --force ` - * `export PATH="/usr/local/opt/qt/bin:$PATH" ` \ No newline at end of file + * `export PATH="/usr/local/opt/qt/bin:$PATH" ` + +* Python Crypto errors + + * ``` + pip uninstall Crypto + pip uninstall pycrypto + pip install pycrypto + ``` + + \ No newline at end of file diff --git a/install b/install index 82f7060..ecf173f 100755 --- a/install +++ b/install @@ -22,11 +22,10 @@ # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. -ROS_DISTRO=${ROS_DISTRO:-kinetic} +ROS_DISTRO=${ROS_DISTRO:-melodic} ROS_CONFIGURATION=${ROS_CONFIGURATION:-desktop_full} ROS_EXTRA_PACKAGES=${ROS_EXTRA_PACKAGES:-} ROS_INSTALL_DIR=${ROS_INSTALL_DIR:-/opt/ros/${ROS_DISTRO}} -CUSTOM_BUILD_DIR=${CUSTOM_BUILD_DIR:.} do_install() { @@ -92,7 +91,7 @@ do_install() # ROS infrastructure tools brew install libyaml || true - pip install -U setuptools rosdep rosinstall_generator wstool rosinstall catkin_tools bloom empy sphinx pycurl + pip install -U setuptools rosdep rosinstall_generator wstool rosinstall catkin_tools bloom empy sphinx pycurl osrf_pycommon # Rosdep has an issue detecting that qt5 is correctly installed, so preinstall it. This is a keg-only formula, # so add its location to the prefix path in order for workspace packages to be able to find it. @@ -138,31 +137,58 @@ do_install() pushd src # Avoid downloading opencv3; we already installed it from homebrew. wstool merge file://$(pwd)/../${WS}.rosinstall - wstool remove opencv3 # fix for old boost version errors if [ "${ROS_DISTRO}" = "kinetic" ]; then wstool rm rospack wstool set rospack --git https://github.com/ros/rospack.git -y - fi - wstool update -j8 - # patch in latest python_qt_binding - wstool remove python_qt_binding - wstool set python_qt_binding --git https://github.com/ros-visualization/python_qt_binding.git + wstool rm ros_comm/* + wstool set ros_comm --git https://github.com/ros/ros_comm.git -y - # patch rostime for boost 1.67, obsolete once https://github.com/ros/roscpp_core/pull/79 is integrated in main branch - curl https://raw.githubusercontent.com/lsolanka/roscpp_core/e5de3c20eb178683c78e225d00bf0f47c48895a5/rostime/include/ros/impl/duration.h > roscpp_core/rostime/include/ros/impl/duration.h - curl https://raw.githubusercontent.com/lsolanka/roscpp_core/e5de3c20eb178683c78e225d00bf0f47c48895a5/rostime/include/ros/impl/time.h > roscpp_core/rostime/include/ros/impl/time.h + wstool rm roscpp_core/* + wstool set roscpp_core --git https://github.com/ros/roscpp_core.git -y - # fix boncpp (Fixed in commit 1240bce but not released yet) - curl https://raw.githubusercontent.com/ros/bond_core/1240bce50ca1538cdad07dc472d31797257e0851/bondcpp/src/bond.cpp > bond_core/bondcpp/src/bond.cpp + wstool rm geometric_shapes + wstool set geometric_shapes --git https://github.com/ros-planning/geometric_shapes.git -y + + # patch in latest python_qt_binding + wstool remove python_qt_binding + wstool set python_qt_binding --git https://github.com/ros-visualization/python_qt_binding.git + + wstool remove opencv3 + + wstool update -j8 + + # patch rostime for boost 1.67, obsolete once https://github.com/ros/roscpp_core/pull/79 is integrated in main branch + curl https://raw.githubusercontent.com/lsolanka/roscpp_core/e5de3c20eb178683c78e225d00bf0f47c48895a5/rostime/include/ros/impl/duration.h > roscpp_core/rostime/include/ros/impl/duration.h + curl https://raw.githubusercontent.com/lsolanka/roscpp_core/e5de3c20eb178683c78e225d00bf0f47c48895a5/rostime/include/ros/impl/time.h > roscpp_core/rostime/include/ros/impl/time.h + + # add custom install for image_common/camera_calibration_parsers + curl https://raw.githubusercontent.com/smnogar/image_common/51969339f1fd7034952fa8c3d18b88fb015153c5/camera_calibration_parsers/CMakeLists.txt > image_common/camera_calibration_parsers/CMakeLists.txt + + # fix boost_python errors for cv_bridge + curl https://raw.githubusercontent.com/berkaydeniz/vision_opencv/9a7be3e4aabd69cdb5d1dc79e0bbe13f421ccba3/cv_bridge/CMakeLists.txt > vision_opencv/cv_bridge/CMakeLists.txt + + # patch tf2 (rosconsole errors are only fixed for melotic geometry 2 release) + curl https://raw.githubusercontent.com/ros/geometry2/0173a538f89c66e2783dc67ee3609660625e16b4/tf2/src/buffer_core.cpp > geometry2/tf2/src/buffer_core.cpp - # add custom install for image_common/camera_calibration_parsers - curl https://raw.githubusercontent.com/smnogar/image_common/51969339f1fd7034952fa8c3d18b88fb015153c5/camera_calibration_parsers/CMakeLists.txt > image_common/camera_calibration_parsers/CMakeLists.txt + # See: https://github.com/ros/catkin/pull/784 + if [ -d catkin ]; then + curl https://raw.githubusercontent.com/ros/catkin/8a47f4eceb4954beb4a5b38b50793d0bbe2c96cf/cmake/catkinConfig.cmake.in > catkin/cmake/catkinConfig.cmake.in + fi - # fix boost_python errors for cv_bridge - curl https://raw.githubusercontent.com/berkaydeniz/vision_opencv/9a7be3e4aabd69cdb5d1dc79e0bbe13f421ccba3/cv_bridge/CMakeLists.txt > vision_opencv/cv_bridge/CMakeLists.txt + if [ -d image_pipeline ]; then + # Pending merge and release: https://github.com/ros-perception/image_pipeline/pull/304 + curl https://raw.githubusercontent.com/mbreyer/image_pipeline/4bf67d3c861cb157e8174f67250680263b18d2b7/image_publisher/CMakeLists.txt > image_pipeline/image_publisher/CMakeLists.txt + fi + + fi + + wstool update -j8 + + # fix boncpp (Fixed in commit 1240bce but not released yet) + curl https://raw.githubusercontent.com/ros/bond_core/1240bce50ca1538cdad07dc472d31797257e0851/bondcpp/src/bond.cpp > bond_core/bondcpp/src/bond.cpp # add custom install for actionlib curl https://raw.githubusercontent.com/ros/actionlib/677e952fcbfe49e6e4c5b835357f88740f49c6ff/include/actionlib/client/simple_action_client.h > actionlib/include/actionlib/client/simple_action_client.h @@ -170,23 +196,20 @@ do_install() curl https://raw.githubusercontent.com/ros/actionlib/677e952fcbfe49e6e4c5b835357f88740f49c6ff/include/actionlib/server/simple_action_server_imp.h > actionlib/include/actionlib/server/simple_action_server_imp.h curl https://raw.githubusercontent.com/ros/actionlib/677e952fcbfe49e6e4c5b835357f88740f49c6ff/src/connection_monitor.cpp > actionlib/src/connection_monitor.cpp - # patch tf2 (rosconsole errors are only fixed for melotic geometry 2 release) - curl https://raw.githubusercontent.com/ros/geometry2/0173a538f89c66e2783dc67ee3609660625e16b4/tf2/src/buffer_core.cpp > geometry2/tf2/src/buffer_core.cpp - - # See: https://github.com/ros/catkin/pull/784 - if [ -d catkin ]; then - curl https://raw.githubusercontent.com/ros/catkin/8a47f4eceb4954beb4a5b38b50793d0bbe2c96cf/cmake/catkinConfig.cmake.in > catkin/cmake/catkinConfig.cmake.in - fi + # fix boost errors in laser_assembler + curl https://raw.githubusercontent.com/ros-perception/laser_assembler/5c504c05078a684746860efb9db433f73c896d32/test/test_assembler.cpp > laser_assembler/test/test_assembler.cpp - if [ -d image_pipeline ]; then - # Pending merge and release: https://github.com/ros-perception/image_pipeline/pull/304 - curl https://raw.githubusercontent.com/mbreyer/image_pipeline/4bf67d3c861cb157e8174f67250680263b18d2b7/image_publisher/CMakeLists.txt > image_pipeline/image_publisher/CMakeLists.txt + # make symnbolic link to correct header locaiton for rosbag_storage errors + if [ ! -d /usr/local/include/openssl ]; then + ln -s /usr/local/opt/openssl/include/* /usr/local/include/ fi # Package dependencies. rosdep install --from-paths . --ignore-src --rosdistro ${ROS_DISTRO} -y --as-root pip:no popd + + # Clean out or create the install directory. if [ -d ${ROS_INSTALL_DIR} ]; then rm -rf ${ROS_INSTALL_DIR}/* @@ -199,17 +222,14 @@ do_install() # Parallel build. catkin config --install \ --install-space ${ROS_INSTALL_DIR} \ - --log-space ${CUSTOM_BUILD_DIR}/logs - --build-space ${CUSTOM_BUILD_DIR}/build - --devel-space ${CUSTOM_BUILD_DIR}/devel --cmake-args \ - -DCATKIN_ENABLE_TESTING=0 \ + -DCMAKE_CXX_STANDARD=14 -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_FIND_FRAMEWORK=LAST \ -DPYTHON_EXECUTABLE=$(which python2) \ -DPYTHON_LIBRARY=$(python2 -c "import sys; print sys.prefix")/lib/libpython2.7.dylib \ -DPYTHON_INCLUDE_DIR=$(python2 -c "import sys; print sys.prefix")/include/python2.7 - catkin build --limit-status-rate 1 + catkin build echo "Installation successful, please source the ROS workspace:" echo diff --git a/rosdeps.yaml b/rosdeps.yaml index 8c543c1..40930c7 100644 --- a/rosdeps.yaml +++ b/rosdeps.yaml @@ -115,33 +115,52 @@ gtest: osx: homebrew: packages: [] - python: osx: homebrew: packages: [python@2] - sdl: osx: homebrew: packages: [sdl] - ompl: osx: homebrew: packages: [ompl] - bfl: osx: homebrew: packages: [] - fcl: osx: homebrew: packages: [fcl] - libfcl-dev: osx: homebrew: - packages: [fcl] \ No newline at end of file + packages: [fcl] +python-gnupg: + osx: + pip: [python-gnupg] +libgazebo9-dev: + osx: + homebrew: [gazebo9] +gazebo9: + osx: + homebrew: [gazebo9] +libgpgme-dev: + osx: + homebrew: [gpgme] + + + + + + + + + + + + + From fa7e6e1199beb3995070cf380ca7550eadafafb6 Mon Sep 17 00:00:00 2001 From: Steve Nogar Date: Sun, 7 Oct 2018 22:40:08 -0400 Subject: [PATCH 30/60] fixes for kinetic and gazebo9 for melodic --- install | 13 +++++++----- rosdeps.yaml | 57 +++++++++++++++------------------------------------- 2 files changed, 24 insertions(+), 46 deletions(-) diff --git a/install b/install index ecf173f..bee6d82 100755 --- a/install +++ b/install @@ -143,10 +143,10 @@ do_install() wstool rm rospack wstool set rospack --git https://github.com/ros/rospack.git -y - wstool rm ros_comm/* - wstool set ros_comm --git https://github.com/ros/ros_comm.git -y + # wstool rm ros_comm/xmlrpcpp ros_comm/topic_tools ros_comm/roswtf ros_comm/rostopic ros_comm/rostest ros_comm/rosservice ros_comm/rospy ros_comm/rosparam ros_comm/rosout ros_comm/rosnode ros_comm/rosmsg ros_comm/rosmaster ros_comm/roslz4 ros_comm/roslaunch ros_comm/rosgraph ros_comm/roscpp ros_comm/rosconsole ros_comm/rosbag_storage ros_comm/rosbag ros_comm/ros_comm ros_comm/message_filters + # wstool set ros_comm --git https://github.com/ros/ros_comm.git -y - wstool rm roscpp_core/* + wstool rm roscpp_core/rostime roscpp_core/roscpp_traits roscpp_core/roscpp_serialization roscpp_core/roscpp_core roscpp_core/cpp_common wstool set roscpp_core --git https://github.com/ros/roscpp_core.git -y wstool rm geometric_shapes @@ -154,12 +154,15 @@ do_install() # patch in latest python_qt_binding wstool remove python_qt_binding - wstool set python_qt_binding --git https://github.com/ros-visualization/python_qt_binding.git + wstool set python_qt_binding --git https://github.com/ros-visualization/python_qt_binding.git -y wstool remove opencv3 wstool update -j8 + # fix C++11 strings (https://github.com/rtv/Stage/pull/62) + curl https://raw.githubusercontent.com/rtv/Stage/c223a1af47e3dc1d66cc281e894c351e26d63328/libstage/stage.hh > stage/libstage/stage.hh + # patch rostime for boost 1.67, obsolete once https://github.com/ros/roscpp_core/pull/79 is integrated in main branch curl https://raw.githubusercontent.com/lsolanka/roscpp_core/e5de3c20eb178683c78e225d00bf0f47c48895a5/rostime/include/ros/impl/duration.h > roscpp_core/rostime/include/ros/impl/duration.h curl https://raw.githubusercontent.com/lsolanka/roscpp_core/e5de3c20eb178683c78e225d00bf0f47c48895a5/rostime/include/ros/impl/time.h > roscpp_core/rostime/include/ros/impl/time.h @@ -223,7 +226,7 @@ do_install() catkin config --install \ --install-space ${ROS_INSTALL_DIR} \ --cmake-args \ - -DCMAKE_CXX_STANDARD=14 + -DCMAKE_CXX_STANDARD=14 \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_FIND_FRAMEWORK=LAST \ -DPYTHON_EXECUTABLE=$(which python2) \ diff --git a/rosdeps.yaml b/rosdeps.yaml index 40930c7..abc1b35 100644 --- a/rosdeps.yaml +++ b/rosdeps.yaml @@ -18,6 +18,15 @@ libgazebo7-dev: homebrew: packages: [gazebo8] +gazebo9: + osx: + homebrew: + packages: [gazebo9] +libgazebo9-dev: + osx: + homebrew: + packages: [gazebo9] + # Don't try to install opencv3 opencv3: osx: @@ -115,52 +124,18 @@ gtest: osx: homebrew: packages: [] + python: osx: homebrew: packages: [python@2] -sdl: - osx: - homebrew: - packages: [sdl] -ompl: - osx: - homebrew: - packages: [ompl] -bfl: - osx: - homebrew: - packages: [] -fcl: - osx: - homebrew: - packages: [fcl] -libfcl-dev: - osx: - homebrew: - packages: [fcl] + python-gnupg: osx: - pip: [python-gnupg] -libgazebo9-dev: - osx: - homebrew: [gazebo9] -gazebo9: - osx: - homebrew: [gazebo9] + pip: + packages: [python-gnupg] + libgpgme-dev: osx: - homebrew: [gpgme] - - - - - - - - - - - - - + homebrew: + packages: [gpgme] \ No newline at end of file From 47812d24f5989683045bd3beb35f5ecb46ff65a7 Mon Sep 17 00:00:00 2001 From: Steve Nogar Date: Mon, 15 Oct 2018 12:45:10 -0400 Subject: [PATCH 31/60] move some options from kinetic to melodic install --- install | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/install b/install index bee6d82..d85ebe6 100755 --- a/install +++ b/install @@ -77,11 +77,11 @@ do_install() fi # Brewed Python - # if [ ! "$(which python2)" = "/usr/local/bin/python2" ]; then - # brew install python@2 - # mkdir -p ~/Library/Python/2.7/lib/python/site-packages - # echo "$(brew --prefix)/lib/python2.7/site-packages" >> ~/Library/Python/2.7/lib/python/site-packages/homebrew.pth - # fi + if [ ! "$(which python2)" = "/usr/local/bin/python2" ]; then + brew install python@2 + mkdir -p ~/Library/Python/2.7/lib/python/site-packages + echo "$(brew --prefix)/lib/python2.7/site-packages" >> ~/Library/Python/2.7/lib/python/site-packages/homebrew.pth + fi # Gives us console_bridge, urdfdom, and gtest. brew tap ros/deps @@ -167,12 +167,6 @@ do_install() curl https://raw.githubusercontent.com/lsolanka/roscpp_core/e5de3c20eb178683c78e225d00bf0f47c48895a5/rostime/include/ros/impl/duration.h > roscpp_core/rostime/include/ros/impl/duration.h curl https://raw.githubusercontent.com/lsolanka/roscpp_core/e5de3c20eb178683c78e225d00bf0f47c48895a5/rostime/include/ros/impl/time.h > roscpp_core/rostime/include/ros/impl/time.h - # add custom install for image_common/camera_calibration_parsers - curl https://raw.githubusercontent.com/smnogar/image_common/51969339f1fd7034952fa8c3d18b88fb015153c5/camera_calibration_parsers/CMakeLists.txt > image_common/camera_calibration_parsers/CMakeLists.txt - - # fix boost_python errors for cv_bridge - curl https://raw.githubusercontent.com/berkaydeniz/vision_opencv/9a7be3e4aabd69cdb5d1dc79e0bbe13f421ccba3/cv_bridge/CMakeLists.txt > vision_opencv/cv_bridge/CMakeLists.txt - # patch tf2 (rosconsole errors are only fixed for melotic geometry 2 release) curl https://raw.githubusercontent.com/ros/geometry2/0173a538f89c66e2783dc67ee3609660625e16b4/tf2/src/buffer_core.cpp > geometry2/tf2/src/buffer_core.cpp @@ -190,6 +184,9 @@ do_install() wstool update -j8 + # add custom install for image_common/camera_calibration_parsers + curl https://raw.githubusercontent.com/smnogar/image_common/51969339f1fd7034952fa8c3d18b88fb015153c5/camera_calibration_parsers/CMakeLists.txt > image_common/camera_calibration_parsers/CMakeLists.txt + # fix boncpp (Fixed in commit 1240bce but not released yet) curl https://raw.githubusercontent.com/ros/bond_core/1240bce50ca1538cdad07dc472d31797257e0851/bondcpp/src/bond.cpp > bond_core/bondcpp/src/bond.cpp @@ -207,6 +204,9 @@ do_install() ln -s /usr/local/opt/openssl/include/* /usr/local/include/ fi + # fix boost_python errors for cv_bridge + curl https://raw.githubusercontent.com/berkaydeniz/vision_opencv/9a7be3e4aabd69cdb5d1dc79e0bbe13f421ccba3/cv_bridge/CMakeLists.txt > vision_opencv/cv_bridge/CMakeLists.txt + # Package dependencies. rosdep install --from-paths . --ignore-src --rosdistro ${ROS_DISTRO} -y --as-root pip:no popd From 82f60bfcfdab4d340d7cd4a5d4c075c30105e59f Mon Sep 17 00:00:00 2001 From: Steve Nogar Date: Wed, 24 Oct 2018 12:35:42 -0400 Subject: [PATCH 32/60] melodic updates --- README.md | 15 ++++++++++++++- install | 3 ++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6b9ae7a..18dc818 100644 --- a/README.md +++ b/README.md @@ -140,14 +140,17 @@ Please refer to the very last section of Below are assorted tips that I have compiled for fixing any issues that can crop up. * It is basically impossible to get indigo to work on macOS sierra + * This has to do with home-brew dropping qt4 support: https://github.com/mikepurvis/ros-install-osx/issues/63 * Could also install indigo on snapdragon, but would take a VERY long time to install * rosdep —skip-keys command is useful for resolving dependencies + * rosdep check --from-paths src --ignore-src --rosdistro kinetic --skip-keys geographiclib --skip-keys geographiclib-tools * Indigo still doesn’t work using qt@4 + * Can’t detect correct qt installation * Important steps to get kinetic to work (all of these are critical): @@ -155,6 +158,7 @@ Below are assorted tips that I have compiled for fixing any issues that can crop * Rviz needs ogre1.9 * Gazebo8 + * Uses Ogre1.9 * High Sierra @@ -166,6 +170,7 @@ Below are assorted tips that I have compiled for fixing any issues that can crop * Basically add path * Command for updating pip if getting weird python errors + * pip freeze --local | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 pip install -U * If you start getting weird errors with accessing too many files, try: @@ -177,6 +182,7 @@ Below are assorted tips that I have compiled for fixing any issues that can crop * `ulimit -n 65536` * [If running out of pty devices](https://codybonney.com/increase-the-max-number-of-ptys-on-os-x-10-8-3/) + * `sudo sysctl -w kern.tty.ptmx_max=999` * image_publisher currently fails. [See this fix](https://github.com/ros-perception/image_pipeline/pull/304) @@ -184,6 +190,7 @@ Below are assorted tips that I have compiled for fixing any issues that can crop * For Gazebo plugins, don't forget to setup `/opt/ros/kinetic/lib` in `GAZEBO_PLUGIN_PATH` and to export it into env * mavros/mavlink + * [workaround to get mavros to compile (endian.h) errors] (https://github.com/mavlink/mavros/issues/851) * If errors are encountered such as: @@ -233,4 +240,10 @@ Below are assorted tips that I have compiled for fixing any issues that can crop pip install pycrypto ``` - \ No newline at end of file +* If having issues with packages not finding terminal_color, you need to up catkin_pkg_modules + + ```bash + sudo pip install --upgrade catkin_pkg_modules + ``` + + diff --git a/install b/install index d85ebe6..c348df3 100755 --- a/install +++ b/install @@ -91,7 +91,7 @@ do_install() # ROS infrastructure tools brew install libyaml || true - pip install -U setuptools rosdep rosinstall_generator wstool rosinstall catkin_tools bloom empy sphinx pycurl osrf_pycommon + pip install -U setuptools rosdep rosinstall_generator wstool rosinstall catkin_tools bloom empy sphinx pycurl osrf_pycommon termcolor # Rosdep has an issue detecting that qt5 is correctly installed, so preinstall it. This is a keg-only formula, # so add its location to the prefix path in order for workspace packages to be able to find it. @@ -227,6 +227,7 @@ do_install() --install-space ${ROS_INSTALL_DIR} \ --cmake-args \ -DCMAKE_CXX_STANDARD=14 \ + -DCATKIN_ENABLE_TESTING=0 \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_FIND_FRAMEWORK=LAST \ -DPYTHON_EXECUTABLE=$(which python2) \ From 4ecfa0d632c3ed6de1b7123d7edacc0e3e312b51 Mon Sep 17 00:00:00 2001 From: Steve Nogar Date: Mon, 31 Dec 2018 14:36:49 -0500 Subject: [PATCH 33/60] updates for mojave support --- README.md | 20 +++++++++++++------- install | 5 +++++ 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 18dc818..6af31ab 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,25 @@ ros-install-osx [![Build Status](https://travis-ci.org/mikepurvis/ros-install-osx.svg?branch=master)](https://travis-ci.org/mikepurvis/ros-install-osx) =============== -**Note: This should work as of 7/11/18** - * This commonly breaks depending on what gets pushed over brew and whether the corresponding packages update deprecated code. -This repo aims to maintain a usable, scripted, up-to-date installation procedure for -[ROS](http://ros.org), currently Lunar. The intent is that the `install` script may -be executed on a El Capitan or newer machine and produce a working desktop_full -installation, including RQT, rviz, and Gazebo. +This repo aims to maintain a usable, scripted, up-to-date installation procedure for [ROS](http://ros.org), currently melodic. The intent is that the `install` script may be executed on a El Capitan or newer machine and produce a working desktop_full installation, including RQT, rviz, and Gazebo. -This is the successor to my [popular gist on the same topic][1]. +This is the successor to the [popular gist on the same topic][1]. [1]: https://gist.github.com/mikepurvis/9837958 +For troubleshooting tips, see the bottom of this readme. + +## Current Status + +**Note: This should work as of 12/31/18** + +Package notes: + +- As of 12/31/18 pcl_ros is broken. This may be due to some combination of pcl 1.9 or vtk 0.8 from brew. You may have to blacklist these packages when building ROS. +- I have only tested Gazebo 9.6.0 and verified that it works. Previous versions of 9.X will not work. I am not sure about versions < 9. +- Rviz probably requires the most up to date version of QT but is currently working. Usage ----- diff --git a/install b/install index c348df3..f3a3817 100755 --- a/install +++ b/install @@ -30,6 +30,11 @@ ROS_INSTALL_DIR=${ROS_INSTALL_DIR:-/opt/ros/${ROS_DISTRO}} do_install() { set -e + + + echo "WARNING: Mojave is missing some extensions. To fix:" + echo "1. Run `open /Library/Developer/CommandLineTools/Packages/`" + echo "2. Install package macOS_SDK_headers_for_macOS_10.14.pkg" # Homebrew if ! hash brew 2>/dev/null; then From 17fb0153e33dc000ba8e74f2ca8567ef051b3231 Mon Sep 17 00:00:00 2001 From: steve_test Date: Sun, 6 Oct 2019 22:33:57 -0400 Subject: [PATCH 34/60] changes to work in catalina Still needs testing to see if works from scratch. --- README.md | 78 ++++++++------ install | 138 +++++++++++------------- patches/camera_calibration_parsers.diff | 15 +++ patches/cv_bridge.diff | 15 +++ patches/image_view.diff | 71 ++++++++++++ patches/message_filters.diff | 11 ++ patches/pcl_ros_cmakelists.diff | 10 ++ patches/pcl_ros_package.diff | 11 ++ patches/rosbag_storage.diff | 35 ++++++ patches/roscpp.diff | 11 ++ patches/tf.diff | 11 ++ patches/tf2.diff | 11 ++ rosdeps.yaml | 6 +- 13 files changed, 313 insertions(+), 110 deletions(-) create mode 100644 patches/camera_calibration_parsers.diff create mode 100644 patches/cv_bridge.diff create mode 100644 patches/image_view.diff create mode 100644 patches/message_filters.diff create mode 100644 patches/pcl_ros_cmakelists.diff create mode 100644 patches/pcl_ros_package.diff create mode 100644 patches/rosbag_storage.diff create mode 100644 patches/roscpp.diff create mode 100644 patches/tf.diff create mode 100644 patches/tf2.diff diff --git a/README.md b/README.md index 6af31ab..42f341f 100644 --- a/README.md +++ b/README.md @@ -1,34 +1,59 @@ -ros-install-osx [![Build Status](https://travis-ci.org/mikepurvis/ros-install-osx.svg?branch=master)](https://travis-ci.org/mikepurvis/ros-install-osx) +ros-install-osx =============== -* This commonly breaks depending on what gets pushed over brew and whether the corresponding packages update deprecated code. +* This commonly breaks depending on what gets pushed over brew and whether the corresponding packages update deprecated code. Efforts have been made to pick out working versions of specific packages, but nothing is guaranteed. -This repo aims to maintain a usable, scripted, up-to-date installation procedure for [ROS](http://ros.org), currently melodic. The intent is that the `install` script may be executed on a El Capitan or newer machine and produce a working desktop_full installation, including RQT, rviz, and Gazebo. +This repo aims to maintain a usable, scripted, up-to-date installation procedure for [ROS](http://ros.org), currently melodic. The intent is that the `install` script may be executed on a Catalina or newer machine and produce a working desktop_full installation, including RQT, rviz, and Gazebo. -This is the successor to the [popular gist on the same topic][1]. +This is the successor to the [popular gist on the same topic][1]. Also thanks to [Boris Gromov](https://gist.github.com/bgromov) for [his helpful gist](https://gist.github.com/bgromov/23a74bbe846d965964b150080cb2d574). -[1]: https://gist.github.com/mikepurvis/9837958 +## Current Status -For troubleshooting tips, see the bottom of this readme. +**Note: This should work as of Oct 6, 2019 on Catalina GM** -## Current Status +Required software versions (installed via script): -**Note: This should work as of 12/31/18** +* **python2** +* **gazebo9: ** 9.8.0 - Newer bottled versions didn't work with the corresponding bottled ignition and protobuf +* **protobuf**: 3.7.1 - Compatible with gazebo +* **protobuf-c: ** - Compatible with gazebo +* **ignition-msgs1**: 1.0.0_3 - Compatible with gazebo +* **sip**: 4.19.8_12 - Required for python2 support -Package notes: +Non standard ROS packages added: -- As of 12/31/18 pcl_ros is broken. This may be due to some combination of pcl 1.9 or vtk 0.8 from brew. You may have to blacklist these packages when building ROS. -- I have only tested Gazebo 9.6.0 and verified that it works. Previous versions of 9.X will not work. I am not sure about versions < 9. -- Rviz probably requires the most up to date version of QT but is currently working. +* **pcl_catkin** and **catkin_simple** - I couldn't get bottled pcl to compile right. Kept giving errors about not finding FLANN. This builds pcl straight into catkin, and unfortunately it adds 15 min build time on my quad core desktop. Usage ----- -```shell -git clone https://github.com/mikepurvis/ros-install-osx.git -cd ros-install-osx -./install -``` +The `install` script should just work for most users, although you may need to run it multiple times. Run these steps first to have a better chance of success: + +1. Disable system integrity protection. + +2. Attempting to clone this repo onto your machine should trigger the xcode command line tools to download. + + ```zsh + git clone https://github.com/smnogar/ros-install-osx.git + cd ros-install-osx + ``` + +3. Install brew + + ```zsh + ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" + echo export PATH='/usr/local/bin:$PATH' >> ~/.bash_profile + source ~/.bash_profile + brew doctor + ``` + +4. Install xquartz + + ```zsh + brew cask install xquartz + ``` + +5. Run: `./install` Note that if you do not yet have XQuartz installed, you will be forced to log out and in after that installation, and re-run this script. @@ -46,23 +71,6 @@ installed, rosdep is already installed and initialized, and you set the `ROS_INS environment variable to a path which already exists and you have write access to. -Step by Step ------------- - -The `install` script should just work for most users. However, if you run into trouble, -it's a pretty big pain to rebuild everything. Note that in this scenario, it may make -sense to treat the script as a list of instructions, and execute them one by one, -manually. - -If you have a build fail, for example with rviz, note that you can modify the `catkin build` -line to start at a particular package. Inside your `indigo_desktop_full_ws` dir, run: - - catkin build --start-with rviz - -If you've resolved whatever issue stopped the build previously, this will pick up where -it left off. - - ## Troubleshooting ### Python and pip packages @@ -99,7 +107,7 @@ If you are getting permission errors when you `sudo uninstall` pip packages, see [Issue #11](https://github.com/mikepurvis/ros-install-osx/issues/11) and [this StackOverflow Q&A](http://stackoverflow.com/a/35051066/2653356). -### El Capitan support +### El Capitan (and newer) support The `install` script may not work as smoothly in OS X El Capitan. Here are some pointers, tips, and hacks to help you complete the installation. diff --git a/install b/install index f3a3817..7dde194 100755 --- a/install +++ b/install @@ -30,11 +30,6 @@ ROS_INSTALL_DIR=${ROS_INSTALL_DIR:-/opt/ros/${ROS_DISTRO}} do_install() { set -e - - - echo "WARNING: Mojave is missing some extensions. To fix:" - echo "1. Run `open /Library/Developer/CommandLineTools/Packages/`" - echo "2. Install package macOS_SDK_headers_for_macOS_10.14.pkg" # Homebrew if ! hash brew 2>/dev/null; then @@ -47,7 +42,6 @@ do_install() # XQuartz if ! hash xquartz 2>/dev/null; then - brew install caskroom/cask/brew-cask brew cask install xquartz echo "Log out and in to finalize XQuartz setup." exit 0 @@ -88,14 +82,36 @@ do_install() echo "$(brew --prefix)/lib/python2.7/site-packages" >> ~/Library/Python/2.7/lib/python/site-packages/homebrew.pth fi - # Gives us console_bridge, urdfdom, and gtest. - brew tap ros/deps - # This tap gives us formulae for Gazebo and its dependencies, including SDF. brew tap osrf/simulation # ROS infrastructure tools brew install libyaml || true + + # install specific versions of certain brew packages + + # sip 4.19.8_12 - still supports python2 + brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/6d2b011fa8f28ef5a0b52f24eb687276823a22fa/Formula/sip.rb + + # pyqt 5.10.1_1 - still supports python2 + brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/1f389d65e21ad067be6811900f5361301b44839f/Formula/pyqt.rb + + # specific working bottled version of gazebo9. A better method would be to + # build the latest version of these from source so the protobuf headers + # don't break. However building gazebo9 from source fails for me. + + # ignition-msgs1 1.0.0_3 + brew install https://raw.githubusercontent.com/osrf/homebrew-simulation/9195cde6460367d5e7b9859e4b9bfb88b2d3766c/Formula/ignition-msgs1.rb + + # gazebo9 9.8.0 + brew install https://raw.githubusercontent.com/osrf/homebrew-simulation/9195cde6460367d5e7b9859e4b9bfb88b2d3766c/Formula/gazebo9.rb + + # protobuf 3.7.1 + brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/4da4f1a6f274eeee8cc0ff4eea155c7e2a29aa20/Formula/protobuf.rb + + # protobuf-c 1.3.1_2 + brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/4da4f1a6f274eeee8cc0ff4eea155c7e2a29aa20/Formula/protobuf-c.rb + pip install -U setuptools rosdep rosinstall_generator wstool rosinstall catkin_tools bloom empy sphinx pycurl osrf_pycommon termcolor # Rosdep has an issue detecting that qt5 is correctly installed, so preinstall it. This is a keg-only formula, @@ -104,6 +120,7 @@ do_install() export CMAKE_PREFIX_PATH=$(brew --prefix qt5) # This hack is required to make qt_gui_cpp compile correctly. See https://github.com/mikepurvis/ros-install-osx/pull/84#issuecomment-338209466 + export PATH="/usr/local/opt/qt5/bin:$PATH" pushd /usr/local/share/sip if [ ! -e PyQt5 ]; then ln -s Qt5 PyQt5 @@ -111,7 +128,12 @@ do_install() popd # Get homebrew's opencv3 from a bottle so that we don't have to build it. - brew install opencv3 + brew install opencv@3 + brew link opencv@3 --force + + # get openssl and gpgme working for rosbag_storage + brew install openssl + export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/openssl/lib/pkgconfig" # Mock out python and pip so that we get the brewed versions when rosdep and other programs call them. # Mock out pip so that we get the brewed pip2 when rosdep calls it to make an installation. @@ -143,80 +165,47 @@ do_install() # Avoid downloading opencv3; we already installed it from homebrew. wstool merge file://$(pwd)/../${WS}.rosinstall - # fix for old boost version errors - if [ "${ROS_DISTRO}" = "kinetic" ]; then - wstool rm rospack - wstool set rospack --git https://github.com/ros/rospack.git -y - - # wstool rm ros_comm/xmlrpcpp ros_comm/topic_tools ros_comm/roswtf ros_comm/rostopic ros_comm/rostest ros_comm/rosservice ros_comm/rospy ros_comm/rosparam ros_comm/rosout ros_comm/rosnode ros_comm/rosmsg ros_comm/rosmaster ros_comm/roslz4 ros_comm/roslaunch ros_comm/rosgraph ros_comm/roscpp ros_comm/rosconsole ros_comm/rosbag_storage ros_comm/rosbag ros_comm/ros_comm ros_comm/message_filters - # wstool set ros_comm --git https://github.com/ros/ros_comm.git -y - - wstool rm roscpp_core/rostime roscpp_core/roscpp_traits roscpp_core/roscpp_serialization roscpp_core/roscpp_core roscpp_core/cpp_common - wstool set roscpp_core --git https://github.com/ros/roscpp_core.git -y - - wstool rm geometric_shapes - wstool set geometric_shapes --git https://github.com/ros-planning/geometric_shapes.git -y - - # patch in latest python_qt_binding - wstool remove python_qt_binding - wstool set python_qt_binding --git https://github.com/ros-visualization/python_qt_binding.git -y - - wstool remove opencv3 - - wstool update -j8 - - # fix C++11 strings (https://github.com/rtv/Stage/pull/62) - curl https://raw.githubusercontent.com/rtv/Stage/c223a1af47e3dc1d66cc281e894c351e26d63328/libstage/stage.hh > stage/libstage/stage.hh - - # patch rostime for boost 1.67, obsolete once https://github.com/ros/roscpp_core/pull/79 is integrated in main branch - curl https://raw.githubusercontent.com/lsolanka/roscpp_core/e5de3c20eb178683c78e225d00bf0f47c48895a5/rostime/include/ros/impl/duration.h > roscpp_core/rostime/include/ros/impl/duration.h - curl https://raw.githubusercontent.com/lsolanka/roscpp_core/e5de3c20eb178683c78e225d00bf0f47c48895a5/rostime/include/ros/impl/time.h > roscpp_core/rostime/include/ros/impl/time.h - - # patch tf2 (rosconsole errors are only fixed for melotic geometry 2 release) - curl https://raw.githubusercontent.com/ros/geometry2/0173a538f89c66e2783dc67ee3609660625e16b4/tf2/src/buffer_core.cpp > geometry2/tf2/src/buffer_core.cpp - - # See: https://github.com/ros/catkin/pull/784 - if [ -d catkin ]; then - curl https://raw.githubusercontent.com/ros/catkin/8a47f4eceb4954beb4a5b38b50793d0bbe2c96cf/cmake/catkinConfig.cmake.in > catkin/cmake/catkinConfig.cmake.in - fi - - if [ -d image_pipeline ]; then - # Pending merge and release: https://github.com/ros-perception/image_pipeline/pull/304 - curl https://raw.githubusercontent.com/mbreyer/image_pipeline/4bf67d3c861cb157e8174f67250680263b18d2b7/image_publisher/CMakeLists.txt > image_pipeline/image_publisher/CMakeLists.txt - fi - - fi + # manually add pcl_catkin to get pcl_ros to work. Brew compiled pcl seems + # to have issues finding flann + # (https://stackoverflow.com/questions/53776238/building-point-cloud-library-pcl-on-macos-x-mojave-error-ld-library-not-foun). + # This takes forever to build. + wstool set pcl_catkin --git https://github.com/ethz-asl/pcl_catkin.git -y + wstool set catkin_simple --git https://github.com/catkin/catkin_simple.git -y wstool update -j8 - # add custom install for image_common/camera_calibration_parsers - curl https://raw.githubusercontent.com/smnogar/image_common/51969339f1fd7034952fa8c3d18b88fb015153c5/camera_calibration_parsers/CMakeLists.txt > image_common/camera_calibration_parsers/CMakeLists.txt + # Package dependencies. + rosdep install --from-paths . --ignore-src --rosdistro ${ROS_DISTRO} -y --as-root pip:no + popd - # fix boncpp (Fixed in commit 1240bce but not released yet) - curl https://raw.githubusercontent.com/ros/bond_core/1240bce50ca1538cdad07dc472d31797257e0851/bondcpp/src/bond.cpp > bond_core/bondcpp/src/bond.cpp + # patches - # add custom install for actionlib - curl https://raw.githubusercontent.com/ros/actionlib/677e952fcbfe49e6e4c5b835357f88740f49c6ff/include/actionlib/client/simple_action_client.h > actionlib/include/actionlib/client/simple_action_client.h - curl https://raw.githubusercontent.com/ros/actionlib/677e952fcbfe49e6e4c5b835357f88740f49c6ff/include/actionlib/destruction_guard.h > actionlib/include/actionlib/destruction_guard.h - curl https://raw.githubusercontent.com/ros/actionlib/677e952fcbfe49e6e4c5b835357f88740f49c6ff/include/actionlib/server/simple_action_server_imp.h > actionlib/include/actionlib/server/simple_action_server_imp.h - curl https://raw.githubusercontent.com/ros/actionlib/677e952fcbfe49e6e4c5b835357f88740f49c6ff/src/connection_monitor.cpp > actionlib/src/connection_monitor.cpp + # fix roscpp trying to link against unused? boost component + patch -d src/ros_comm/roscpp/ < ../patches/roscpp.diff + patch -d src/ros_comm/message_filters/ < ../patches/message_filters.diff - # fix boost errors in laser_assembler - curl https://raw.githubusercontent.com/ros-perception/laser_assembler/5c504c05078a684746860efb9db433f73c896d32/test/test_assembler.cpp > laser_assembler/test/test_assembler.cpp + # fix tf and tf2 trying to link against unused? boost component + patch -d src/geometry/tf/ < ../patches/tf.diff + patch -d src/geometry2/tf2/ < ../patches/tf2.diff - # make symnbolic link to correct header locaiton for rosbag_storage errors - if [ ! -d /usr/local/include/openssl ]; then - ln -s /usr/local/opt/openssl/include/* /usr/local/include/ - fi + # rosbag_strorage encryption + patch -d src/ros_comm/rosbag_storage/ < ../patches/rosbag_storage.diff + if [ ! -d /usr/local/include/openssl ]; then + ln -s /usr/local/opt/openssl/include/* /usr/local/include/ + fi - # fix boost_python errors for cv_bridge - curl https://raw.githubusercontent.com/berkaydeniz/vision_opencv/9a7be3e4aabd69cdb5d1dc79e0bbe13f421ccba3/cv_bridge/CMakeLists.txt > vision_opencv/cv_bridge/CMakeLists.txt + # fix boost components in camera_calibration_parsers + patch -d src/image_common/camera_calibration_parsers/ < ../patches/camera_calibration_parsers.diff - # Package dependencies. - rosdep install --from-paths . --ignore-src --rosdistro ${ROS_DISTRO} -y --as-root pip:no - popd + # fix boost components in camera_calibration_parsers + patch -d src/vision_opencv/cv_bridge/ < ../patches/cv_bridge.diff + # add pango to image_view + patch -d src/image_pipeline/image_view/ < ../patches/image_view.diff + # patch so pcl_perception uses catkin built pcl + patch -d src/perception_pcl/pcl_ros/ < ../patches/pcl_ros_cmakelists.diff + patch -d src/perception_pcl/pcl_ros/ < ../patches/pcl_ros_package.diff # Clean out or create the install directory. if [ -d ${ROS_INSTALL_DIR} ]; then @@ -225,13 +214,14 @@ do_install() echo "This sudo prompt is to create and chown ${ROS_INSTALL_DIR}." sudo mkdir -p ${ROS_INSTALL_DIR} sudo chown $USER ${ROS_INSTALL_DIR} + sudo chown $USER ${ROS_INSTALL_DIR}/../ fi # Parallel build. catkin config --install \ --install-space ${ROS_INSTALL_DIR} \ --cmake-args \ - -DCMAKE_CXX_STANDARD=14 \ + -DCMAKE_CXX_STANDARD=11 \ -DCATKIN_ENABLE_TESTING=0 \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_FIND_FRAMEWORK=LAST \ diff --git a/patches/camera_calibration_parsers.diff b/patches/camera_calibration_parsers.diff new file mode 100644 index 0000000..5a51c4e --- /dev/null +++ b/patches/camera_calibration_parsers.diff @@ -0,0 +1,15 @@ +--- CMakeLists.txt 2019-10-06 15:41:55.000000000 -0400 ++++ CMakeLists.txt 2019-10-06 15:41:50.000000000 -0400 +@@ -5,7 +5,11 @@ + + find_package(PythonLibs REQUIRED) + if(PYTHONLIBS_VERSION_STRING VERSION_LESS 3) +- find_package(Boost REQUIRED COMPONENTS filesystem python) ++ if(APPLE) ++ find_package(Boost REQUIRED COMPONENTS filesystem python27) ++ else() ++ find_package(Boost REQUIRED COMPONENTS filesystem python) ++ endif() + else() + find_package(Boost REQUIRED COMPONENTS filesystem python3) + endif() diff --git a/patches/cv_bridge.diff b/patches/cv_bridge.diff new file mode 100644 index 0000000..cdb9f52 --- /dev/null +++ b/patches/cv_bridge.diff @@ -0,0 +1,15 @@ +--- CMakeLists.txt 2019-10-06 15:50:24.000000000 -0400 ++++ CMakeLists.txt 2019-10-06 15:50:51.000000000 -0400 +@@ -6,7 +6,11 @@ + if(NOT ANDROID) + find_package(PythonLibs) + if(PYTHONLIBS_VERSION_STRING VERSION_LESS 3) +- find_package(Boost REQUIRED python) ++ if(APPLE) ++ find_package(Boost REQUIRED COMPONENTS filesystem python27) ++ else() ++ find_package(Boost REQUIRED COMPONENTS filesystem python) ++ endif() + else() + find_package(Boost REQUIRED python3) + endif() diff --git a/patches/image_view.diff b/patches/image_view.diff new file mode 100644 index 0000000..6d227b5 --- /dev/null +++ b/patches/image_view.diff @@ -0,0 +1,71 @@ +--- CMakeLists.txt 2019-10-06 15:59:03.000000000 -0400 ++++ CMakeLists.txt 2019-10-06 15:58:20.000000000 -0400 +@@ -1,6 +1,11 @@ + cmake_minimum_required(VERSION 2.8) + project(image_view) + ++find_package(PkgConfig REQUIRED) ++pkg_check_modules(Pango REQUIRED pango) ++ ++link_directories(${Pango_LIBRARY_DIRS}) ++ + find_package(catkin REQUIRED COMPONENTS camera_calibration_parsers cv_bridge dynamic_reconfigure image_transport message_filters message_generation nodelet rosconsole roscpp std_srvs stereo_msgs) + generate_dynamic_reconfigure_options(cfg/ImageView.cfg) + +@@ -11,22 +16,26 @@ + include_directories(${Boost_INCLUDE_DIRS} + ${catkin_INCLUDE_DIRS} + ${OpenCV_INCLUDE_DIRS} ++ ${Pango_INCLUDE_DIRS} + ) + + # Extra tools + add_executable(extract_images src/nodes/extract_images.cpp) + target_link_libraries(extract_images ${catkin_LIBRARIES} + ${OpenCV_LIBRARIES} ++ ${Pango_LIBRARIES} + ) + + add_executable(image_saver src/nodes/image_saver.cpp) + target_link_libraries(image_saver ${catkin_LIBRARIES} + ${OpenCV_LIBRARIES} ++ ${Pango_LIBRARIES} + ) + + add_executable(video_recorder src/nodes/video_recorder.cpp) + target_link_libraries(video_recorder ${catkin_LIBRARIES} + ${OpenCV_LIBRARIES} ++ ${Pango_LIBRARIES} + ) + + install(TARGETS extract_images image_saver video_recorder +@@ -49,6 +58,7 @@ + ${GTK2_LIBRARIES} + ${OpenCV_LIBRARIES} + ${Boost_LIBRARIES} ++ ${Pango_LIBRARIES} + ) + install(TARGETS image_view + DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} +@@ -61,11 +71,13 @@ + target_link_libraries(image_view_exe ${catkin_LIBRARIES} + ${OpenCV_LIBRARIES} + ${Boost_LIBRARIES} ++ ${Pango_LIBRARIES} + ) + + add_executable(disparity_view src/nodes/disparity_view.cpp) + target_link_libraries(disparity_view ${catkin_LIBRARIES} + ${OpenCV_LIBRARIES} ++ ${Pango_LIBRARIES} + ) + + add_executable(stereo_view src/nodes/stereo_view.cpp) +@@ -74,6 +86,7 @@ + ${GTK_LIBRARIES} + ${GTK2_LIBRARIES} + ${OpenCV_LIBRARIES} ++ ${Pango_LIBRARIES} + ) + + install(TARGETS disparity_view image_view_exe stereo_view diff --git a/patches/message_filters.diff b/patches/message_filters.diff new file mode 100644 index 0000000..acd45d7 --- /dev/null +++ b/patches/message_filters.diff @@ -0,0 +1,11 @@ +--- CMakeLists.txt 2018-08-06 13:38:23.000000000 -0400 ++++ CMakeLists.txt 2019-10-06 14:43:20.000000000 -0400 +@@ -13,7 +13,7 @@ + ) + catkin_python_setup() + +-find_package(Boost REQUIRED COMPONENTS signals thread) ++find_package(Boost REQUIRED COMPONENTS thread) + + include_directories(include ${catkin_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS}) + link_directories(${catkin_LIBRARY_DIRS}) diff --git a/patches/pcl_ros_cmakelists.diff b/patches/pcl_ros_cmakelists.diff new file mode 100644 index 0000000..cdfdc08 --- /dev/null +++ b/patches/pcl_ros_cmakelists.diff @@ -0,0 +1,10 @@ +--- CMakeLists.txt 2019-10-06 22:24:22.000000000 -0400 ++++ CMakeLists_fixed.txt 2019-10-06 22:24:03.000000000 -0400 +@@ -35,6 +35,7 @@ + + ## Find catkin packages + find_package(catkin REQUIRED COMPONENTS ++ pcl_catkin + dynamic_reconfigure + message_filters + nodelet diff --git a/patches/pcl_ros_package.diff b/patches/pcl_ros_package.diff new file mode 100644 index 0000000..36a1a60 --- /dev/null +++ b/patches/pcl_ros_package.diff @@ -0,0 +1,11 @@ +--- package.xml 2019-10-06 22:22:30.000000000 -0400 ++++ package.xml 2019-10-06 22:21:39.000000000 -0400 +@@ -45,6 +45,8 @@ + tf2_eigen + + rostest ++ ++ pcl_catkin + + + diff --git a/patches/rosbag_storage.diff b/patches/rosbag_storage.diff new file mode 100644 index 0000000..b916a97 --- /dev/null +++ b/patches/rosbag_storage.diff @@ -0,0 +1,35 @@ +--- CMakeLists.txt 2019-10-06 15:22:37.000000000 -0400 ++++ CMakeLists.txt 2019-10-06 15:22:29.000000000 -0400 +@@ -11,6 +11,13 @@ + find_package(Boost REQUIRED COMPONENTS date_time filesystem program_options regex) + find_package(BZip2 REQUIRED) + ++find_package(PkgConfig REQUIRED) ++pkg_check_modules(OpenSSL REQUIRED openssl) ++pkg_check_modules(LibCrypto REQUIRED libcrypto) ++find_package(Gpgmepp CONFIG REQUIRED) ++ ++link_directories(${LibCrypto_LIBRARY_DIRS}) ++ + catkin_package( + CFG_EXTRAS rosbag_storage-extras.cmake + INCLUDE_DIRS include +@@ -22,15 +29,15 @@ + # Support large bags (>2GB) on 32-bit systems + add_definitions(-D_FILE_OFFSET_BITS=64) + +-include_directories(include ${catkin_INCLUDE_DIRS} ${console_bridge_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${BZIP2_INCLUDE_DIR}) ++include_directories(include ${catkin_INCLUDE_DIRS} ${console_bridge_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${BZIP2_INCLUDE_DIR} ${OpenSSL_INCLUDE_DIRS}) + add_definitions(${BZIP2_DEFINITIONS}) + + set(AES_ENCRYPT_SOURCE "") + set(AES_ENCRYPT_LIBRARIES "") + if(NOT WIN32) + set(AES_ENCRYPT_SOURCE "src/aes_encryptor.cpp") +- set(AES_ENCRYPT_LIBRARIES "crypto" "gpgme") +-endif() ++ set(AES_ENCRYPT_LIBRARIES "crypto" "Gpgmepp") ++endif() + + add_library(rosbag_storage + ${AES_ENCRYPT_SOURCE} diff --git a/patches/roscpp.diff b/patches/roscpp.diff new file mode 100644 index 0000000..46a1fb2 --- /dev/null +++ b/patches/roscpp.diff @@ -0,0 +1,11 @@ +--- CMakeLists.txt 2019-10-06 13:48:37.000000000 -0400 ++++ CMakeLists.txt 2019-10-06 14:02:18.000000000 -0400 +@@ -22,7 +22,7 @@ + + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/include/ros/common.h.in ${CATKIN_DEVEL_PREFIX}/${CATKIN_GLOBAL_INCLUDE_DESTINATION}/ros/common.h) + +-find_package(Boost REQUIRED COMPONENTS chrono filesystem signals system) ++find_package(Boost REQUIRED COMPONENTS chrono filesystem system) + + include_directories(include ${CATKIN_DEVEL_PREFIX}/${CATKIN_GLOBAL_INCLUDE_DESTINATION}/ros ${catkin_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS}) + diff --git a/patches/tf.diff b/patches/tf.diff new file mode 100644 index 0000000..5eff8af --- /dev/null +++ b/patches/tf.diff @@ -0,0 +1,11 @@ +--- CMakeLists.txt 2019-10-06 16:19:38.000000000 -0400 ++++ CMakeLists.txt 2019-10-06 16:19:33.000000000 -0400 +@@ -15,7 +15,7 @@ + std_msgs + tf2_ros + ) +-find_package(Boost REQUIRED COMPONENTS thread signals system) ++find_package(Boost REQUIRED COMPONENTS thread system) + + catkin_python_setup() + diff --git a/patches/tf2.diff b/patches/tf2.diff new file mode 100644 index 0000000..49a2aee --- /dev/null +++ b/patches/tf2.diff @@ -0,0 +1,11 @@ +--- CMakeLists.txt 2018-11-16 18:47:39.000000000 -0500 ++++ CMakeLists.txt 2019-10-06 14:35:37.000000000 -0400 +@@ -3,7 +3,7 @@ + + find_package(console_bridge REQUIRED) + find_package(catkin REQUIRED COMPONENTS geometry_msgs rostime tf2_msgs) +-find_package(Boost REQUIRED COMPONENTS signals system thread) ++find_package(Boost REQUIRED COMPONENTS system thread) + + catkin_package( + INCLUDE_DIRS include diff --git a/rosdeps.yaml b/rosdeps.yaml index abc1b35..2bd6bc4 100644 --- a/rosdeps.yaml +++ b/rosdeps.yaml @@ -138,4 +138,8 @@ python-gnupg: libgpgme-dev: osx: homebrew: - packages: [gpgme] \ No newline at end of file + packages: [gpgme] +tango-icon-theme: + osx: + homebrew: + packages: [] \ No newline at end of file From 67a26e82f7a557ae916256729ebbd4eb1d4842c4 Mon Sep 17 00:00:00 2001 From: Steve Nogar Date: Sun, 6 Oct 2019 22:37:03 -0400 Subject: [PATCH 35/60] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 42f341f..7f52622 100644 --- a/README.md +++ b/README.md @@ -14,9 +14,9 @@ This is the successor to the [popular gist on the same topic][1]. Also thanks to Required software versions (installed via script): * **python2** -* **gazebo9: ** 9.8.0 - Newer bottled versions didn't work with the corresponding bottled ignition and protobuf +* **gazebo9:** 9.8.0 - Newer bottled versions didn't work with the corresponding bottled ignition and protobuf * **protobuf**: 3.7.1 - Compatible with gazebo -* **protobuf-c: ** - Compatible with gazebo +* **protobuf-c:** - Compatible with gazebo * **ignition-msgs1**: 1.0.0_3 - Compatible with gazebo * **sip**: 4.19.8_12 - Required for python2 support From dc2bd3baa0230f6775108c8409b8f82be0465aaa Mon Sep 17 00:00:00 2001 From: Steve Nogar Date: Mon, 7 Oct 2019 23:22:41 -0400 Subject: [PATCH 36/60] fixes to improve chances it builds on first run --- install | 103 ++++++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 74 insertions(+), 29 deletions(-) diff --git a/install b/install index 7dde194..f4a0dda 100755 --- a/install +++ b/install @@ -88,30 +88,6 @@ do_install() # ROS infrastructure tools brew install libyaml || true - # install specific versions of certain brew packages - - # sip 4.19.8_12 - still supports python2 - brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/6d2b011fa8f28ef5a0b52f24eb687276823a22fa/Formula/sip.rb - - # pyqt 5.10.1_1 - still supports python2 - brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/1f389d65e21ad067be6811900f5361301b44839f/Formula/pyqt.rb - - # specific working bottled version of gazebo9. A better method would be to - # build the latest version of these from source so the protobuf headers - # don't break. However building gazebo9 from source fails for me. - - # ignition-msgs1 1.0.0_3 - brew install https://raw.githubusercontent.com/osrf/homebrew-simulation/9195cde6460367d5e7b9859e4b9bfb88b2d3766c/Formula/ignition-msgs1.rb - - # gazebo9 9.8.0 - brew install https://raw.githubusercontent.com/osrf/homebrew-simulation/9195cde6460367d5e7b9859e4b9bfb88b2d3766c/Formula/gazebo9.rb - - # protobuf 3.7.1 - brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/4da4f1a6f274eeee8cc0ff4eea155c7e2a29aa20/Formula/protobuf.rb - - # protobuf-c 1.3.1_2 - brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/4da4f1a6f274eeee8cc0ff4eea155c7e2a29aa20/Formula/protobuf-c.rb - pip install -U setuptools rosdep rosinstall_generator wstool rosinstall catkin_tools bloom empy sphinx pycurl osrf_pycommon termcolor # Rosdep has an issue detecting that qt5 is correctly installed, so preinstall it. This is a keg-only formula, @@ -127,10 +103,6 @@ do_install() fi popd - # Get homebrew's opencv3 from a bottle so that we don't have to build it. - brew install opencv@3 - brew link opencv@3 --force - # get openssl and gpgme working for rosbag_storage brew install openssl export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/openssl/lib/pkgconfig" @@ -174,10 +146,83 @@ do_install() wstool update -j8 + # remove unnecessary packages from pcl_catkin + rm -rf pcl_catkin/geometry2 + rm -rf pcl_catkin/perception_pcl + + # conflicts with normal numpy + if [ -d /usr/local/bin/f2py ]; then + rm '/usr/local/bin/f2py' + fi + if brew ls --versions numpy > /dev/null; then + brew link numpy + fi + + # make sure rosdep doesn't stop on opencv + if brew ls --versions opencv@3 > /dev/null; then + brew unlink opencv@3 + brew install opencv + brew link opencv + fi + # Package dependencies. rosdep install --from-paths . --ignore-src --rosdistro ${ROS_DISTRO} -y --as-root pip:no popd + # install specific versions of certain brew packages + + # boost 1.70.0 + brew unlink boost + brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/80745d7975635f4895ab9a04efce2b23bbe46f31/Formula/boost.rb + brew link boost + brew unlink boost-python + brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/80745d7975635f4895ab9a04efce2b23bbe46f31/Formula/boost-python.rb + brew link boost-python + + # sip 4.19.8_12 - still supports python2 + brew unlink sip + brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/6d2b011fa8f28ef5a0b52f24eb687276823a22fa/Formula/sip.rb + brew link sip + + # pyqt 5.10.1_1 - still supports python2 + brew unlink pyqt + brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/1f389d65e21ad067be6811900f5361301b44839f/Formula/pyqt.rb + brew link pyqt + + # specific working bottled version of gazebo9. A better method would be to + # build the latest version of these from source so the protobuf headers + # don't break. However building gazebo9 from source fails for me. + + # ignition-msgs1 1.0.0_3 + brew unlink ignition-msgs1 + brew install https://raw.githubusercontent.com/osrf/homebrew-simulation/9195cde6460367d5e7b9859e4b9bfb88b2d3766c/Formula/ignition-msgs1.rb + brew link ignition-msgs1 + + # gazebo9 9.8.0 + brew unlink gazebo9 + brew install https://raw.githubusercontent.com/osrf/homebrew-simulation/9195cde6460367d5e7b9859e4b9bfb88b2d3766c/Formula/gazebo9.rb + brew link gazebo9 + + # protobuf 3.7.1 + brew unlink protobuf + brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/4da4f1a6f274eeee8cc0ff4eea155c7e2a29aa20/Formula/protobuf.rb + brew link protobuf + + # protobuf-c 1.3.1_2 + brew unlink protobuf-c + brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/4da4f1a6f274eeee8cc0ff4eea155c7e2a29aa20/Formula/protobuf-c.rb + brew link protobuf-c + + # Get homebrew's opencv3 from a bottle so that we don't have to build it. + brew unlink opencv + brew install opencv@3 + brew link opencv@3 --force + + # old version of numpy + brew unlink numpy + brew install numpy@1.16 + brew link numpy@1.16 --force + # patches # fix roscpp trying to link against unused? boost component @@ -221,7 +266,7 @@ do_install() catkin config --install \ --install-space ${ROS_INSTALL_DIR} \ --cmake-args \ - -DCMAKE_CXX_STANDARD=11 \ + -DCMAKE_CXX_STANDARD=14 \ -DCATKIN_ENABLE_TESTING=0 \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_FIND_FRAMEWORK=LAST \ From 450a711340e6ea181f787a2d384fbbf82b657255 Mon Sep 17 00:00:00 2001 From: Steve Nogar Date: Tue, 8 Oct 2019 12:27:18 -0400 Subject: [PATCH 37/60] reduce chance that brew causes script failure --- install | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/install b/install index f4a0dda..9199fab 100755 --- a/install +++ b/install @@ -92,7 +92,7 @@ do_install() # Rosdep has an issue detecting that qt5 is correctly installed, so preinstall it. This is a keg-only formula, # so add its location to the prefix path in order for workspace packages to be able to find it. - brew install qt5 pyqt5 sip + brew install qt5 pyqt5 sip || true export CMAKE_PREFIX_PATH=$(brew --prefix qt5) # This hack is required to make qt_gui_cpp compile correctly. See https://github.com/mikepurvis/ros-install-osx/pull/84#issuecomment-338209466 @@ -172,12 +172,12 @@ do_install() # install specific versions of certain brew packages # boost 1.70.0 - brew unlink boost - brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/80745d7975635f4895ab9a04efce2b23bbe46f31/Formula/boost.rb - brew link boost brew unlink boost-python brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/80745d7975635f4895ab9a04efce2b23bbe46f31/Formula/boost-python.rb brew link boost-python + brew unlink boost + brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/80745d7975635f4895ab9a04efce2b23bbe46f31/Formula/boost.rb + brew link boost # sip 4.19.8_12 - still supports python2 brew unlink sip From 2bccf24d13e6c4826c33125a27d53458eeccb721 Mon Sep 17 00:00:00 2001 From: Steve Nogar Date: Tue, 8 Oct 2019 14:54:31 -0400 Subject: [PATCH 38/60] fallback to boost 1.69 to support mavros --- install | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/install b/install index 9199fab..e32282a 100755 --- a/install +++ b/install @@ -171,12 +171,12 @@ do_install() # install specific versions of certain brew packages - # boost 1.70.0 + # boost 1.69.0 brew unlink boost-python - brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/80745d7975635f4895ab9a04efce2b23bbe46f31/Formula/boost-python.rb + brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/16274ef9d6acdb629139b331a0c37d0964e61a14/Formula/boost-python.rb brew link boost-python brew unlink boost - brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/80745d7975635f4895ab9a04efce2b23bbe46f31/Formula/boost.rb + brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/16274ef9d6acdb629139b331a0c37d0964e61a14/Formula/boost.rb brew link boost # sip 4.19.8_12 - still supports python2 From 2e0fddc82ae3eb50ab01ed65d223ef44083def26 Mon Sep 17 00:00:00 2001 From: Steve Nogar Date: Tue, 8 Oct 2019 14:56:02 -0400 Subject: [PATCH 39/60] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 7f52622..5b72eab 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,8 @@ This is the successor to the [popular gist on the same topic][1]. Also thanks to Required software versions (installed via script): +* **boost**: 1.69 +* **opencv3** * **python2** * **gazebo9:** 9.8.0 - Newer bottled versions didn't work with the corresponding bottled ignition and protobuf * **protobuf**: 3.7.1 - Compatible with gazebo From 24e74b4e19e149c9c3b3ccfefe14da3ed672013b Mon Sep 17 00:00:00 2001 From: Steve Nogar Date: Mon, 14 Oct 2019 13:19:57 -0400 Subject: [PATCH 40/60] Use newest gazebo9 --- README.md | 8 +++----- install | 26 +++++++++++++------------- 2 files changed, 16 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 5b72eab..6c92723 100644 --- a/README.md +++ b/README.md @@ -16,15 +16,12 @@ Required software versions (installed via script): * **boost**: 1.69 * **opencv3** * **python2** -* **gazebo9:** 9.8.0 - Newer bottled versions didn't work with the corresponding bottled ignition and protobuf -* **protobuf**: 3.7.1 - Compatible with gazebo -* **protobuf-c:** - Compatible with gazebo -* **ignition-msgs1**: 1.0.0_3 - Compatible with gazebo * **sip**: 4.19.8_12 - Required for python2 support +* **pyqt: ** 5.10.1_1 - Required for python 2 support Non standard ROS packages added: -* **pcl_catkin** and **catkin_simple** - I couldn't get bottled pcl to compile right. Kept giving errors about not finding FLANN. This builds pcl straight into catkin, and unfortunately it adds 15 min build time on my quad core desktop. +* **pcl_catkin** and **catkin_simple** - I couldn't get bottled pcl to work right with pcl_ros. Kept giving errors about not finding FLANN. It also appears pcl does not build from source correctly on Catalina using Brew. These packages builds pcl straight into catkin, and unfortunately it adds 15 min build time on my quad core desktop. Usage ----- @@ -36,6 +33,7 @@ The `install` script should just work for most users, although you may need to r 2. Attempting to clone this repo onto your machine should trigger the xcode command line tools to download. ```zsh + xcode-select --install git clone https://github.com/smnogar/ros-install-osx.git cd ros-install-osx ``` diff --git a/install b/install index e32282a..5459828 100755 --- a/install +++ b/install @@ -166,7 +166,7 @@ do_install() fi # Package dependencies. - rosdep install --from-paths . --ignore-src --rosdistro ${ROS_DISTRO} -y --as-root pip:no + rosdep install --from-paths . --ignore-src --rosdistro ${ROS_DISTRO} -y -r --as-root pip:no popd # install specific versions of certain brew packages @@ -194,24 +194,24 @@ do_install() # don't break. However building gazebo9 from source fails for me. # ignition-msgs1 1.0.0_3 - brew unlink ignition-msgs1 - brew install https://raw.githubusercontent.com/osrf/homebrew-simulation/9195cde6460367d5e7b9859e4b9bfb88b2d3766c/Formula/ignition-msgs1.rb - brew link ignition-msgs1 + # brew unlink ignition-msgs1 + # brew install https://raw.githubusercontent.com/osrf/homebrew-simulation/9195cde6460367d5e7b9859e4b9bfb88b2d3766c/Formula/ignition-msgs1.rb + # brew link ignition-msgs1 # gazebo9 9.8.0 - brew unlink gazebo9 - brew install https://raw.githubusercontent.com/osrf/homebrew-simulation/9195cde6460367d5e7b9859e4b9bfb88b2d3766c/Formula/gazebo9.rb - brew link gazebo9 + # brew unlink gazebo9 + # brew install https://raw.githubusercontent.com/osrf/homebrew-simulation/9195cde6460367d5e7b9859e4b9bfb88b2d3766c/Formula/gazebo9.rb + # brew link gazebo9 # protobuf 3.7.1 - brew unlink protobuf - brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/4da4f1a6f274eeee8cc0ff4eea155c7e2a29aa20/Formula/protobuf.rb - brew link protobuf + # brew unlink protobuf + # brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/4da4f1a6f274eeee8cc0ff4eea155c7e2a29aa20/Formula/protobuf.rb + # brew link protobuf # protobuf-c 1.3.1_2 - brew unlink protobuf-c - brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/4da4f1a6f274eeee8cc0ff4eea155c7e2a29aa20/Formula/protobuf-c.rb - brew link protobuf-c + # brew unlink protobuf-c + # brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/4da4f1a6f274eeee8cc0ff4eea155c7e2a29aa20/Formula/protobuf-c.rb + # brew link protobuf-c # Get homebrew's opencv3 from a bottle so that we don't have to build it. brew unlink opencv From 25053f08beb684a1c4ab2e773924493b2b7264c7 Mon Sep 17 00:00:00 2001 From: Steve Nogar Date: Mon, 14 Oct 2019 14:24:41 -0400 Subject: [PATCH 41/60] clean up comments --- install | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/install b/install index 5459828..cc9adda 100755 --- a/install +++ b/install @@ -189,30 +189,6 @@ do_install() brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/1f389d65e21ad067be6811900f5361301b44839f/Formula/pyqt.rb brew link pyqt - # specific working bottled version of gazebo9. A better method would be to - # build the latest version of these from source so the protobuf headers - # don't break. However building gazebo9 from source fails for me. - - # ignition-msgs1 1.0.0_3 - # brew unlink ignition-msgs1 - # brew install https://raw.githubusercontent.com/osrf/homebrew-simulation/9195cde6460367d5e7b9859e4b9bfb88b2d3766c/Formula/ignition-msgs1.rb - # brew link ignition-msgs1 - - # gazebo9 9.8.0 - # brew unlink gazebo9 - # brew install https://raw.githubusercontent.com/osrf/homebrew-simulation/9195cde6460367d5e7b9859e4b9bfb88b2d3766c/Formula/gazebo9.rb - # brew link gazebo9 - - # protobuf 3.7.1 - # brew unlink protobuf - # brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/4da4f1a6f274eeee8cc0ff4eea155c7e2a29aa20/Formula/protobuf.rb - # brew link protobuf - - # protobuf-c 1.3.1_2 - # brew unlink protobuf-c - # brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/4da4f1a6f274eeee8cc0ff4eea155c7e2a29aa20/Formula/protobuf-c.rb - # brew link protobuf-c - # Get homebrew's opencv3 from a bottle so that we don't have to build it. brew unlink opencv brew install opencv@3 From 5b9ea97efd48057bb071f899b8163885336c857f Mon Sep 17 00:00:00 2001 From: Steve Nogar Date: Mon, 14 Oct 2019 15:29:14 -0400 Subject: [PATCH 42/60] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6c92723..4879ad2 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ Required software versions (installed via script): * **opencv3** * **python2** * **sip**: 4.19.8_12 - Required for python2 support -* **pyqt: ** 5.10.1_1 - Required for python 2 support +* **pyqt**: 5.10.1_1 - Required for python 2 support Non standard ROS packages added: From 8f029fcee03a3d06ea89527c579f254ad611871e Mon Sep 17 00:00:00 2001 From: Steve Nogar Date: Sun, 20 Oct 2019 20:59:44 -0400 Subject: [PATCH 43/60] pcl and rospy fix. Use newest gazebo9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Added a simple patch so that FindFLANN can find the flann library when building pcl_ros. * Remove pcl_catkin * Add patch for rospy to get rid of “concurrent poll() invocation" errors * Build gazebo9 from scratch to help eliminate compatibility issues with protobuf --- README.md | 28 +++++++++++++++------------- install | 23 +++++++++-------------- patches/FindFLANN.diff | 13 +++++++++++++ patches/pcl_ros_cmakelists.diff | 10 ---------- patches/pcl_ros_package.diff | 11 ----------- patches/rospy_patch.rosinstall | 5 +++++ 6 files changed, 42 insertions(+), 48 deletions(-) create mode 100644 patches/FindFLANN.diff delete mode 100644 patches/pcl_ros_cmakelists.diff delete mode 100644 patches/pcl_ros_package.diff create mode 100644 patches/rospy_patch.rosinstall diff --git a/README.md b/README.md index 6c92723..4e29bf3 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ This is the successor to the [popular gist on the same topic][1]. Also thanks to ## Current Status -**Note: This should work as of Oct 6, 2019 on Catalina GM** +**Note: This should work as of Oct 20, 2019 on Catalina 10.15.0** Required software versions (installed via script): @@ -19,41 +19,43 @@ Required software versions (installed via script): * **sip**: 4.19.8_12 - Required for python2 support * **pyqt: ** 5.10.1_1 - Required for python 2 support -Non standard ROS packages added: - -* **pcl_catkin** and **catkin_simple** - I couldn't get bottled pcl to work right with pcl_ros. Kept giving errors about not finding FLANN. It also appears pcl does not build from source correctly on Catalina using Brew. These packages builds pcl straight into catkin, and unfortunately it adds 15 min build time on my quad core desktop. - Usage ----- The `install` script should just work for most users, although you may need to run it multiple times. Run these steps first to have a better chance of success: -1. Disable system integrity protection. +1. [Disable system integrity protection](https://www.imore.com/how-turn-system-integrity-protection-macos). + +2. If on Catalina, set your terminal back to bash. This is very helpful for building software via brew, and roslaunch will not autocomplete using zsh. + + ```bash + chsh -s /bin/bash + ``` -2. Attempting to clone this repo onto your machine should trigger the xcode command line tools to download. +3. Attempting to clone this repo onto your machine should trigger the xcode command line tools to download. - ```zsh + ```bash xcode-select --install git clone https://github.com/smnogar/ros-install-osx.git cd ros-install-osx ``` -3. Install brew +4. Install brew - ```zsh + ```bash ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" echo export PATH='/usr/local/bin:$PATH' >> ~/.bash_profile source ~/.bash_profile brew doctor ``` -4. Install xquartz +5. Install xquartz - ```zsh + ```bash brew cask install xquartz ``` -5. Run: `./install` +6. Run: `./install` Note that if you do not yet have XQuartz installed, you will be forced to log out and in after that installation, and re-run this script. diff --git a/install b/install index cc9adda..645b80d 100755 --- a/install +++ b/install @@ -137,19 +137,11 @@ do_install() # Avoid downloading opencv3; we already installed it from homebrew. wstool merge file://$(pwd)/../${WS}.rosinstall - # manually add pcl_catkin to get pcl_ros to work. Brew compiled pcl seems - # to have issues finding flann - # (https://stackoverflow.com/questions/53776238/building-point-cloud-library-pcl-on-macos-x-mojave-error-ld-library-not-foun). - # This takes forever to build. - wstool set pcl_catkin --git https://github.com/ethz-asl/pcl_catkin.git -y - wstool set catkin_simple --git https://github.com/catkin/catkin_simple.git -y - + # swap out rospy for kinetic version 1.12.6. This fixes "RuntimeError: + # concurrent poll() invocation" errors. + wstool merge -r ../../patches/rospy_patch.rosinstall -y wstool update -j8 - # remove unnecessary packages from pcl_catkin - rm -rf pcl_catkin/geometry2 - rm -rf pcl_catkin/perception_pcl - # conflicts with normal numpy if [ -d /usr/local/bin/f2py ]; then rm '/usr/local/bin/f2py' @@ -189,6 +181,9 @@ do_install() brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/1f389d65e21ad067be6811900f5361301b44839f/Formula/pyqt.rb brew link pyqt + # install gazebo9 from source. Fixes a lot of problems with protobuf compatibility + brew reinstall -s gazebo9 + # Get homebrew's opencv3 from a bottle so that we don't have to build it. brew unlink opencv brew install opencv@3 @@ -224,9 +219,9 @@ do_install() # add pango to image_view patch -d src/image_pipeline/image_view/ < ../patches/image_view.diff - # patch so pcl_perception uses catkin built pcl - patch -d src/perception_pcl/pcl_ros/ < ../patches/pcl_ros_cmakelists.diff - patch -d src/perception_pcl/pcl_ros/ < ../patches/pcl_ros_package.diff + # fix find flann library in pcl so pcl_ros can build + # (https://stackoverflow.com/questions/53776238/building-point-cloud-library-pcl-on-macos-x-mojave-error-ld-library-not-foun) + patch -d /usr/local/share/pcl-1.9/Modules/FindFLANN.cmake < ../patches/FindFLANN.diff # Clean out or create the install directory. if [ -d ${ROS_INSTALL_DIR} ]; then diff --git a/patches/FindFLANN.diff b/patches/FindFLANN.diff new file mode 100644 index 0000000..f9e82ae --- /dev/null +++ b/patches/FindFLANN.diff @@ -0,0 +1,13 @@ +--- FindFLANN.cmake 2019-10-20 20:48:33.000000000 -0400 ++++ FindFLANN.cmake 2019-10-20 20:45:53.000000000 -0400 +@@ -9,6 +9,10 @@ + # If FLANN_USE_STATIC is specified and then look for static libraries ONLY else + # look for shared ones + ++# find flann libraries ++set(FLANN_LIBRARIES /usr/local/lib/libflann.dylib /usr/local/lib/libflann_cpp.dylib) ++set(FLANN_FOUND TRUE) ++ + if(FLANN_USE_STATIC) + set(FLANN_RELEASE_NAME flann_cpp_s) + set(FLANN_DEBUG_NAME flann_cpp_s-gd) diff --git a/patches/pcl_ros_cmakelists.diff b/patches/pcl_ros_cmakelists.diff deleted file mode 100644 index cdfdc08..0000000 --- a/patches/pcl_ros_cmakelists.diff +++ /dev/null @@ -1,10 +0,0 @@ ---- CMakeLists.txt 2019-10-06 22:24:22.000000000 -0400 -+++ CMakeLists_fixed.txt 2019-10-06 22:24:03.000000000 -0400 -@@ -35,6 +35,7 @@ - - ## Find catkin packages - find_package(catkin REQUIRED COMPONENTS -+ pcl_catkin - dynamic_reconfigure - message_filters - nodelet diff --git a/patches/pcl_ros_package.diff b/patches/pcl_ros_package.diff deleted file mode 100644 index 36a1a60..0000000 --- a/patches/pcl_ros_package.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- package.xml 2019-10-06 22:22:30.000000000 -0400 -+++ package.xml 2019-10-06 22:21:39.000000000 -0400 -@@ -45,6 +45,8 @@ - tf2_eigen - - rostest -+ -+ pcl_catkin - - - diff --git a/patches/rospy_patch.rosinstall b/patches/rospy_patch.rosinstall new file mode 100644 index 0000000..10150d2 --- /dev/null +++ b/patches/rospy_patch.rosinstall @@ -0,0 +1,5 @@ +- git: + local-name: ros_comm/rospy + uri: https://github.com/ros-gbp/ros_comm-release.git + version: release/kinetic/rospy/1.12.6-0 + From 3c5f99a55a80e8cbad69fefbe82ec05d4ce6e9c1 Mon Sep 17 00:00:00 2001 From: Steve Nogar Date: Sun, 20 Oct 2019 22:37:22 -0400 Subject: [PATCH 44/60] fix patch command --- install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install b/install index 645b80d..b3ae0b4 100755 --- a/install +++ b/install @@ -221,7 +221,7 @@ do_install() # fix find flann library in pcl so pcl_ros can build # (https://stackoverflow.com/questions/53776238/building-point-cloud-library-pcl-on-macos-x-mojave-error-ld-library-not-foun) - patch -d /usr/local/share/pcl-1.9/Modules/FindFLANN.cmake < ../patches/FindFLANN.diff + patch -d /usr/local/share/pcl-1.9/Modules/ < ../patches/FindFLANN.diff # Clean out or create the install directory. if [ -d ${ROS_INSTALL_DIR} ]; then From a355545c36f7c6c70cd275fc389e5891cf358fc8 Mon Sep 17 00:00:00 2001 From: Antoine Hoarau <703240+ahoarau@users.noreply.github.com> Date: Fri, 15 Nov 2019 14:41:32 +0100 Subject: [PATCH 45/60] force link and verbose if the link already exists it stops --- install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install b/install index b3ae0b4..41adea5 100755 --- a/install +++ b/install @@ -99,7 +99,7 @@ do_install() export PATH="/usr/local/opt/qt5/bin:$PATH" pushd /usr/local/share/sip if [ ! -e PyQt5 ]; then - ln -s Qt5 PyQt5 + ln -fvs Qt5 PyQt5 fi popd From 4c9f1bdd25b44020d20a7a34650c1e43d4230c83 Mon Sep 17 00:00:00 2001 From: Steve Nogar Date: Tue, 24 Dec 2019 23:16:05 -0500 Subject: [PATCH 46/60] add specific version of qt --- install | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/install b/install index 41adea5..16872b9 100755 --- a/install +++ b/install @@ -176,6 +176,11 @@ do_install() brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/6d2b011fa8f28ef5a0b52f24eb687276823a22fa/Formula/sip.rb brew link sip + # qt 5.13.1 - 5.14 had problems with rqt_image_view + brew unlink qt + brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/b2f67e742630b1b2353a9870e6ef18d8eaa19638/Formula/qt.rb + brew link qt + # pyqt 5.10.1_1 - still supports python2 brew unlink pyqt brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/1f389d65e21ad067be6811900f5361301b44839f/Formula/pyqt.rb From a2617bfe21a32aa94cd6335d746d3bcfb9bd9b6c Mon Sep 17 00:00:00 2001 From: Steve Nogar Date: Mon, 24 Feb 2020 13:06:47 -0500 Subject: [PATCH 47/60] a couple of patches for ros_controllers --- install | 4 ++++ patches/diff_drive_controller.diff | 12 ++++++++++++ patches/position_controllers.diff | 12 ++++++++++++ 3 files changed, 28 insertions(+) create mode 100644 patches/diff_drive_controller.diff create mode 100644 patches/position_controllers.diff diff --git a/install b/install index 16872b9..d8e5314 100755 --- a/install +++ b/install @@ -228,6 +228,10 @@ do_install() # (https://stackoverflow.com/questions/53776238/building-point-cloud-library-pcl-on-macos-x-mojave-error-ld-library-not-foun) patch -d /usr/local/share/pcl-1.9/Modules/ < ../patches/FindFLANN.diff + # fix ros_controllers not finding class_loader and console_bridge + patch -d src/ros_controllers/position_controllers/ < ../patches/position_controllers.diff + patch -d src/ros_controllers/diff_drive_controller/ < ../patches/diff_drive_controller.diff + # Clean out or create the install directory. if [ -d ${ROS_INSTALL_DIR} ]; then rm -rf ${ROS_INSTALL_DIR}/* diff --git a/patches/diff_drive_controller.diff b/patches/diff_drive_controller.diff new file mode 100644 index 0000000..cbf5f61 --- /dev/null +++ b/patches/diff_drive_controller.diff @@ -0,0 +1,12 @@ +--- CMakeLists.txt 2020-02-24 10:07:30.000000000 -0500 ++++ CMakeLists.txt 2020-02-24 10:07:25.000000000 -0500 +@@ -14,7 +14,9 @@ + realtime_tools + tf + urdf ++ class_loader + ) ++find_package(console_bridge REQUIRED) + + generate_dynamic_reconfigure_options(cfg/DiffDriveController.cfg) + diff --git a/patches/position_controllers.diff b/patches/position_controllers.diff new file mode 100644 index 0000000..229142f --- /dev/null +++ b/patches/position_controllers.diff @@ -0,0 +1,12 @@ +--- CMakeLists.txt 2020-02-24 09:47:12.000000000 -0500 ++++ CMakeLists.txt 2020-02-24 09:47:09.000000000 -0500 +@@ -2,7 +2,8 @@ + project(position_controllers) + + # Load catkin and all dependencies required for this package +-find_package(catkin REQUIRED COMPONENTS controller_interface forward_command_controller) ++find_package(catkin REQUIRED COMPONENTS controller_interface forward_command_controller class_loader) ++find_package(console_bridge REQUIRED) + + # Declare catkin project + catkin_package( From f3bba72ae4997889082989b022bb3af3cff6713f Mon Sep 17 00:00:00 2001 From: Steve Nogar Date: Sun, 1 Mar 2020 14:05:11 -0500 Subject: [PATCH 48/60] update to python3, add tango icons upgrade to use python3, cleans out the manual installation of old dependencies that still had python2 support. Manually builds tango icons so that rqt has icons again. --- .gitignore | 2 + README.md | 16 +++- bash_profile_recommendations.sh | 6 ++ install | 116 +++++++++--------------- patches/camera_calibration_parsers.diff | 22 ++++- patches/cv_bridge.diff | 22 ++++- patches/image_view.diff | 71 --------------- patches/rospy_exception.patch | 26 ++++++ patches/rospy_kqueue.patch | 45 +++++++++ patches/rospy_patch.rosinstall | 5 - patches/rqt_reconfigure.diff | 11 +++ patches/smach_ros.patch | 39 ++++++++ 12 files changed, 217 insertions(+), 164 deletions(-) create mode 100644 bash_profile_recommendations.sh delete mode 100644 patches/image_view.diff create mode 100644 patches/rospy_exception.patch create mode 100644 patches/rospy_kqueue.patch delete mode 100644 patches/rospy_patch.rosinstall create mode 100644 patches/rqt_reconfigure.diff create mode 100644 patches/smach_ros.patch diff --git a/.gitignore b/.gitignore index abbd5a0..4ae898f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ *_ws .DS_Store +/tango-icon-theme-0.8.90 +/tango-icon-theme-0.8.90.tar.gz diff --git a/README.md b/README.md index 9a822cc..f6baadd 100644 --- a/README.md +++ b/README.md @@ -9,15 +9,13 @@ This is the successor to the [popular gist on the same topic][1]. Also thanks to ## Current Status -**Note: This should work as of Oct 20, 2019 on Catalina 10.15.0** +**Note: This should work as of March 1, 2020 on Catalina 10.15.3** Required software versions (installed via script): -* **boost**: 1.69 +* **boost**: 1.72 * **opencv3** -* **python2** -* **sip**: 4.19.8_12 - Required for python2 support -* **pyqt**: 5.10.1_1 - Required for python 2 support +* **python3** Usage ----- @@ -57,6 +55,14 @@ The `install` script should just work for most users, although you may need to r 6. Run: `./install` +7. After it completes successfully, add the following to your bash_profile: + + ```bash + cat bash_profile_recommendations.sh >> ~/.bash_profile + ``` + + + Note that if you do not yet have XQuartz installed, you will be forced to log out and in after that installation, and re-run this script. diff --git a/bash_profile_recommendations.sh b/bash_profile_recommendations.sh new file mode 100644 index 0000000..adfbb78 --- /dev/null +++ b/bash_profile_recommendations.sh @@ -0,0 +1,6 @@ + +# recommended bash_profile lines for ROS +export PYTHONPATH=/usr/local/lib/python3.7/site-packages +export PYTHONWARNINGS=ignore::yaml.YAMLLoadWarning +export ROS_PYTHON_VERSION=3 +export PATH="/usr/local/opt/python/libexec/bin:$PATH" diff --git a/install b/install index d8e5314..3ed114f 100755 --- a/install +++ b/install @@ -75,20 +75,34 @@ do_install() echo " sudo chown -R $USER:admin /usr/local/*" fi - # Brewed Python - if [ ! "$(which python2)" = "/usr/local/bin/python2" ]; then - brew install python@2 - mkdir -p ~/Library/Python/2.7/lib/python/site-packages - echo "$(brew --prefix)/lib/python2.7/site-packages" >> ~/Library/Python/2.7/lib/python/site-packages/homebrew.pth + # # Brewed Python + if [ ! "$(which python3)" = "/usr/local/bin/python3" ]; then + brew install python + mkdir -p ~/Library/Python/3.7/lib/python/site-packages + echo "$(brew --prefix)/lib/python3.7/site-packages" >> ~/Library/Python/3.7/lib/python/site-packages/homebrew.pth fi # This tap gives us formulae for Gazebo and its dependencies, including SDF. brew tap osrf/simulation # ROS infrastructure tools - brew install libyaml || true + brew install libyaml python git || true - pip install -U setuptools rosdep rosinstall_generator wstool rosinstall catkin_tools bloom empy sphinx pycurl osrf_pycommon termcolor + # install catkin_tools from source (fixes https://github.com/catkin/catkin_tools/issues/558) + git clone https://github.com/catkin/catkin_tools.git + pip install catkin_tools/ + + # install tango-icon-theme so icons show up correctly in rqt + brew install wget intltool gettext icon-naming-utils imagemacgick + brew link --force gettext + wget http://pkgs.fedoraproject.org/repo/pkgs/tango-icon-theme/tango-icon-theme-0.8.90.tar.gz/0795895d2f20eddcbd2bffe94ed431a6/tango-icon-theme-0.8.90.tar.gz + tar -xvf tango-icon-theme-0.8.90.tar.gz + cd tango-icon-theme-0.8.90 + ./configure + make install + cd .. + + pip install -U setuptools rosdep rosinstall_generator wstool rosinstall bloom empy sphinx pycurl osrf_pycommon termcolor # Rosdep has an issue detecting that qt5 is correctly installed, so preinstall it. This is a keg-only formula, # so add its location to the prefix path in order for workspace packages to be able to find it. @@ -109,7 +123,12 @@ do_install() # Mock out python and pip so that we get the brewed versions when rosdep and other programs call them. # Mock out pip so that we get the brewed pip2 when rosdep calls it to make an installation. - export PATH=$(pwd)/shim:$PATH + # export PATH=$(pwd)/shim:$PATH + export ROS_PYTHON_VERSION=3 + + # missing depdendencies that rosdep doesn't seem to catch + brew install fltk poco lz4 gpgme yaml-cpp opencv@3 pcl + brew link --force opencv@3 # Initialize and update rosdep if [ ! -d /etc/ros/rosdep/ ]; then @@ -134,82 +153,24 @@ do_install() rosinstall_generator ${ROS_CONFIGURATION} ${ROS_EXTRA_PACKAGES} --rosdistro ${ROS_DISTRO} --deps --tar > ${WS}.rosinstall wstool init src pushd src - # Avoid downloading opencv3; we already installed it from homebrew. wstool merge file://$(pwd)/../${WS}.rosinstall - - # swap out rospy for kinetic version 1.12.6. This fixes "RuntimeError: - # concurrent poll() invocation" errors. - wstool merge -r ../../patches/rospy_patch.rosinstall -y wstool update -j8 - # conflicts with normal numpy - if [ -d /usr/local/bin/f2py ]; then - rm '/usr/local/bin/f2py' - fi - if brew ls --versions numpy > /dev/null; then - brew link numpy - fi - - # make sure rosdep doesn't stop on opencv - if brew ls --versions opencv@3 > /dev/null; then - brew unlink opencv@3 - brew install opencv - brew link opencv - fi - # Package dependencies. rosdep install --from-paths . --ignore-src --rosdistro ${ROS_DISTRO} -y -r --as-root pip:no popd - # install specific versions of certain brew packages - - # boost 1.69.0 - brew unlink boost-python - brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/16274ef9d6acdb629139b331a0c37d0964e61a14/Formula/boost-python.rb - brew link boost-python - brew unlink boost - brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/16274ef9d6acdb629139b331a0c37d0964e61a14/Formula/boost.rb - brew link boost - - # sip 4.19.8_12 - still supports python2 - brew unlink sip - brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/6d2b011fa8f28ef5a0b52f24eb687276823a22fa/Formula/sip.rb - brew link sip - - # qt 5.13.1 - 5.14 had problems with rqt_image_view - brew unlink qt - brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/b2f67e742630b1b2353a9870e6ef18d8eaa19638/Formula/qt.rb - brew link qt - - # pyqt 5.10.1_1 - still supports python2 - brew unlink pyqt - brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/1f389d65e21ad067be6811900f5361301b44839f/Formula/pyqt.rb - brew link pyqt - - # install gazebo9 from source. Fixes a lot of problems with protobuf compatibility - brew reinstall -s gazebo9 - - # Get homebrew's opencv3 from a bottle so that we don't have to build it. - brew unlink opencv - brew install opencv@3 - brew link opencv@3 --force - - # old version of numpy - brew unlink numpy - brew install numpy@1.16 - brew link numpy@1.16 --force - # patches - # fix roscpp trying to link against unused? boost component + # # fix roscpp trying to link against unused? boost component patch -d src/ros_comm/roscpp/ < ../patches/roscpp.diff patch -d src/ros_comm/message_filters/ < ../patches/message_filters.diff - # fix tf and tf2 trying to link against unused? boost component + # # fix tf and tf2 trying to link against unused? boost component patch -d src/geometry/tf/ < ../patches/tf.diff patch -d src/geometry2/tf2/ < ../patches/tf2.diff - # rosbag_strorage encryption + # # rosbag_strorage encryption patch -d src/ros_comm/rosbag_storage/ < ../patches/rosbag_storage.diff if [ ! -d /usr/local/include/openssl ]; then ln -s /usr/local/opt/openssl/include/* /usr/local/include/ @@ -221,9 +182,6 @@ do_install() # fix boost components in camera_calibration_parsers patch -d src/vision_opencv/cv_bridge/ < ../patches/cv_bridge.diff - # add pango to image_view - patch -d src/image_pipeline/image_view/ < ../patches/image_view.diff - # fix find flann library in pcl so pcl_ros can build # (https://stackoverflow.com/questions/53776238/building-point-cloud-library-pcl-on-macos-x-mojave-error-ld-library-not-foun) patch -d /usr/local/share/pcl-1.9/Modules/ < ../patches/FindFLANN.diff @@ -232,6 +190,16 @@ do_install() patch -d src/ros_controllers/position_controllers/ < ../patches/position_controllers.diff patch -d src/ros_controllers/diff_drive_controller/ < ../patches/diff_drive_controller.diff + # patch rospy to fix mac specific errors (https://github.com/ros/ros_comm/pull/1904) + patch -p1 -d src/ros_comm < ../patches/rospy_kqueue.patch + patch -p1 -d src/ros_comm < ../patches/rospy_exception.patch + + # fix rqt_reconfigure not showing up in rqt_gui + patch -d src/rqt_reconfigure/ < ../patches/rqt_reconfigure.diff + + # fix python 3 errors in smach_ros (https://github.com/ros/executive_smach/pull/62) + patch -p1 -d src/executive_smach/smach_ros < ../patches/smach_ros.patch + # Clean out or create the install directory. if [ -d ${ROS_INSTALL_DIR} ]; then rm -rf ${ROS_INSTALL_DIR}/* @@ -250,9 +218,7 @@ do_install() -DCATKIN_ENABLE_TESTING=0 \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_FIND_FRAMEWORK=LAST \ - -DPYTHON_EXECUTABLE=$(which python2) \ - -DPYTHON_LIBRARY=$(python2 -c "import sys; print sys.prefix")/lib/libpython2.7.dylib \ - -DPYTHON_INCLUDE_DIR=$(python2 -c "import sys; print sys.prefix")/include/python2.7 + -DPYTHON_EXECUTABLE=$(which python3) catkin build echo "Installation successful, please source the ROS workspace:" diff --git a/patches/camera_calibration_parsers.diff b/patches/camera_calibration_parsers.diff index 5a51c4e..57f7215 100644 --- a/patches/camera_calibration_parsers.diff +++ b/patches/camera_calibration_parsers.diff @@ -1,6 +1,6 @@ ---- CMakeLists.txt 2019-10-06 15:41:55.000000000 -0400 -+++ CMakeLists.txt 2019-10-06 15:41:50.000000000 -0400 -@@ -5,7 +5,11 @@ +--- CMakeLists.txt 2020-02-29 15:56:45.000000000 -0500 ++++ CMakeLists.txt 2020-02-29 15:55:41.000000000 -0500 +@@ -5,9 +5,17 @@ find_package(PythonLibs REQUIRED) if(PYTHONLIBS_VERSION_STRING VERSION_LESS 3) @@ -11,5 +11,19 @@ + find_package(Boost REQUIRED COMPONENTS filesystem python) + endif() else() - find_package(Boost REQUIRED COMPONENTS filesystem python3) +- find_package(Boost REQUIRED COMPONENTS filesystem python3) ++ if(APPLE) ++ find_package(Boost REQUIRED COMPONENTS filesystem python) ++ else() ++ find_package(Boost REQUIRED COMPONENTS filesystem python3) ++ endif() endif() + include_directories(include ${catkin_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${PYTHON_INCLUDE_DIRS}) + +@@ -80,4 +88,4 @@ + + if(CATKIN_ENABLE_TESTING) + add_subdirectory(test) +-endif() +\ No newline at end of file ++endif() diff --git a/patches/cv_bridge.diff b/patches/cv_bridge.diff index cdb9f52..2321844 100644 --- a/patches/cv_bridge.diff +++ b/patches/cv_bridge.diff @@ -1,6 +1,6 @@ ---- CMakeLists.txt 2019-10-06 15:50:24.000000000 -0400 -+++ CMakeLists.txt 2019-10-06 15:50:51.000000000 -0400 -@@ -6,7 +6,11 @@ +--- CMakeLists.txt 2020-02-29 16:04:16.000000000 -0500 ++++ CMakeLists.txt 2020-02-29 16:03:36.000000000 -0500 +@@ -6,9 +6,17 @@ if(NOT ANDROID) find_package(PythonLibs) if(PYTHONLIBS_VERSION_STRING VERSION_LESS 3) @@ -11,5 +11,19 @@ + find_package(Boost REQUIRED COMPONENTS filesystem python) + endif() else() - find_package(Boost REQUIRED python3) +- find_package(Boost REQUIRED python3) ++ if(APPLE) ++ find_package(Boost REQUIRED COMPONENTS filesystem python) ++ else() ++ find_package(Boost REQUIRED COMPONENTS filesystem python3) ++ endif() endif() + else() + find_package(Boost REQUIRED) +@@ -45,4 +53,4 @@ + install( + DIRECTORY include/${PROJECT_NAME}/ + DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION} +-) +\ No newline at end of file ++) diff --git a/patches/image_view.diff b/patches/image_view.diff deleted file mode 100644 index 6d227b5..0000000 --- a/patches/image_view.diff +++ /dev/null @@ -1,71 +0,0 @@ ---- CMakeLists.txt 2019-10-06 15:59:03.000000000 -0400 -+++ CMakeLists.txt 2019-10-06 15:58:20.000000000 -0400 -@@ -1,6 +1,11 @@ - cmake_minimum_required(VERSION 2.8) - project(image_view) - -+find_package(PkgConfig REQUIRED) -+pkg_check_modules(Pango REQUIRED pango) -+ -+link_directories(${Pango_LIBRARY_DIRS}) -+ - find_package(catkin REQUIRED COMPONENTS camera_calibration_parsers cv_bridge dynamic_reconfigure image_transport message_filters message_generation nodelet rosconsole roscpp std_srvs stereo_msgs) - generate_dynamic_reconfigure_options(cfg/ImageView.cfg) - -@@ -11,22 +16,26 @@ - include_directories(${Boost_INCLUDE_DIRS} - ${catkin_INCLUDE_DIRS} - ${OpenCV_INCLUDE_DIRS} -+ ${Pango_INCLUDE_DIRS} - ) - - # Extra tools - add_executable(extract_images src/nodes/extract_images.cpp) - target_link_libraries(extract_images ${catkin_LIBRARIES} - ${OpenCV_LIBRARIES} -+ ${Pango_LIBRARIES} - ) - - add_executable(image_saver src/nodes/image_saver.cpp) - target_link_libraries(image_saver ${catkin_LIBRARIES} - ${OpenCV_LIBRARIES} -+ ${Pango_LIBRARIES} - ) - - add_executable(video_recorder src/nodes/video_recorder.cpp) - target_link_libraries(video_recorder ${catkin_LIBRARIES} - ${OpenCV_LIBRARIES} -+ ${Pango_LIBRARIES} - ) - - install(TARGETS extract_images image_saver video_recorder -@@ -49,6 +58,7 @@ - ${GTK2_LIBRARIES} - ${OpenCV_LIBRARIES} - ${Boost_LIBRARIES} -+ ${Pango_LIBRARIES} - ) - install(TARGETS image_view - DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} -@@ -61,11 +71,13 @@ - target_link_libraries(image_view_exe ${catkin_LIBRARIES} - ${OpenCV_LIBRARIES} - ${Boost_LIBRARIES} -+ ${Pango_LIBRARIES} - ) - - add_executable(disparity_view src/nodes/disparity_view.cpp) - target_link_libraries(disparity_view ${catkin_LIBRARIES} - ${OpenCV_LIBRARIES} -+ ${Pango_LIBRARIES} - ) - - add_executable(stereo_view src/nodes/stereo_view.cpp) -@@ -74,6 +86,7 @@ - ${GTK_LIBRARIES} - ${GTK2_LIBRARIES} - ${OpenCV_LIBRARIES} -+ ${Pango_LIBRARIES} - ) - - install(TARGETS disparity_view image_view_exe stereo_view diff --git a/patches/rospy_exception.patch b/patches/rospy_exception.patch new file mode 100644 index 0000000..7070259 --- /dev/null +++ b/patches/rospy_exception.patch @@ -0,0 +1,26 @@ +From e7eeac4b16d8a5ce85d7d755c0cee3976df24845 Mon Sep 17 00:00:00 2001 +From: Steve Nogar +Date: Sun, 1 Mar 2020 13:02:37 -0500 +Subject: [PATCH] add exception for ConnectionAbortedError + +Prevent python nodes from spamming the terminal on every close. Noted in Python 3 running on macOS. +--- + clients/rospy/src/rospy/impl/tcpros_base.py | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git clients/rospy/src/rospy/impl/tcpros_base.py clients/rospy/src/rospy/impl/tcpros_base.py +index beb11aaf1..2f896731e 100644 +--- clients/rospy/src/rospy/impl/tcpros_base.py ++++ clients/rospy/src/rospy/impl/tcpros_base.py +@@ -154,6 +154,8 @@ class TCPServer(object): + (client_sock, client_addr) = self.server_sock.accept() + except socket.timeout: + continue ++ except ConnectionAbortedError: ++ continue + except IOError as e: + (e_errno, msg) = e.args + if e_errno == errno.EINTR: #interrupted system call +-- +2.25.0 + diff --git a/patches/rospy_kqueue.patch b/patches/rospy_kqueue.patch new file mode 100644 index 0000000..4d5d992 --- /dev/null +++ b/patches/rospy_kqueue.patch @@ -0,0 +1,45 @@ +From 53b5286b50afbdce92f42397517e01937c8f875d Mon Sep 17 00:00:00 2001 +From: Steve Nogar +Date: Sun, 1 Mar 2020 13:01:34 -0500 +Subject: [PATCH] fix mac trying to use epoll instead of kqueue + +macOS was incorrectly attempting to use epoll/poll instead of kqueue, occassionally generating errors such as RuntimeError: concurrent poll() invocation and breaking python nodes. +--- + clients/rospy/src/rospy/topics.py | 14 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) + +diff --git clients/rospy/src/rospy/topics.py clients/rospy/src/rospy/topics.py +index 124864cfa..3ef4412ae 100644 +--- clients/rospy/src/rospy/topics.py ++++ clients/rospy/src/rospy/topics.py +@@ -192,7 +192,13 @@ class Poller(object): + on multiple platforms. NOT thread-safe. + """ + def __init__(self): +- if hasattr(select, 'epoll'): ++ if hasattr(select, 'kqueue'): ++ self.poller = select.kqueue() ++ self.add_fd = self.add_kqueue ++ self.remove_fd = self.remove_kqueue ++ self.error_iter = self.error_kqueue_iter ++ self.kevents = [] ++ elif hasattr(select, 'epoll'): + self.poller = select.epoll() + self.add_fd = self.add_epoll + self.remove_fd = self.remove_epoll +@@ -202,12 +208,6 @@ class Poller(object): + self.add_fd = self.add_poll + self.remove_fd = self.remove_poll + self.error_iter = self.error_poll_iter +- elif hasattr(select, 'kqueue'): +- self.poller = select.kqueue() +- self.add_fd = self.add_kqueue +- self.remove_fd = self.remove_kqueue +- self.error_iter = self.error_kqueue_iter +- self.kevents = [] + else: + #TODO: non-Noop impl for Windows + self.poller = self.noop +-- +2.25.0 + diff --git a/patches/rospy_patch.rosinstall b/patches/rospy_patch.rosinstall deleted file mode 100644 index 10150d2..0000000 --- a/patches/rospy_patch.rosinstall +++ /dev/null @@ -1,5 +0,0 @@ -- git: - local-name: ros_comm/rospy - uri: https://github.com/ros-gbp/ros_comm-release.git - version: release/kinetic/rospy/1.12.6-0 - diff --git a/patches/rqt_reconfigure.diff b/patches/rqt_reconfigure.diff new file mode 100644 index 0000000..3b435e7 --- /dev/null +++ b/patches/rqt_reconfigure.diff @@ -0,0 +1,11 @@ +--- plugin.xml 2020-02-29 16:52:44.000000000 -0500 ++++ plugin.xml 2020-02-29 16:52:42.000000000 -0500 +@@ -6,7 +6,7 @@ + + + +- ++ + folder + Plugins related to configuration. + diff --git a/patches/smach_ros.patch b/patches/smach_ros.patch new file mode 100644 index 0000000..90bb308 --- /dev/null +++ b/patches/smach_ros.patch @@ -0,0 +1,39 @@ +From cc7eaf7a145430b8293cb66680cb9d45206dd6e7 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Marcus=20Mee=C3=9Fen?= +Date: Fri, 15 Mar 2019 14:11:37 +0100 +Subject: [PATCH] missing module name in smach_ros/__init__.py import + statements + +--- + smach_ros/src/smach_ros/__init__.py | 14 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) + +diff --git smach_ros/src/smach_ros/__init__.py smach_ros/src/smach_ros/__init__.py +index af249b2..688e9f0 100644 +--- smach_ros/src/smach_ros/__init__.py ++++ smach_ros/src/smach_ros/__init__.py +@@ -49,14 +49,14 @@ smach.set_loggers( + smach.set_shutdown_check(rospy.is_shutdown) + + ### Core classes +-from util import set_preempt_handler ++from smach_ros.util import set_preempt_handler + + ### Top-level Containers / Wrappers +-from action_server_wrapper import ActionServerWrapper +-from introspection import IntrospectionClient, IntrospectionServer ++from smach_ros.action_server_wrapper import ActionServerWrapper ++from smach_ros.introspection import IntrospectionClient, IntrospectionServer + + ### State Classes +-from simple_action_state import SimpleActionState +-from service_state import ServiceState +-from monitor_state import MonitorState +-from condition_state import ConditionState ++from smach_ros.simple_action_state import SimpleActionState ++from smach_ros.service_state import ServiceState ++from smach_ros.monitor_state import MonitorState ++from smach_ros.condition_state import ConditionState +-- +2.25.0 + From c58e748be6791ec050189db81c0435a78c630718 Mon Sep 17 00:00:00 2001 From: Steve Nogar Date: Fri, 6 Mar 2020 23:14:53 -0500 Subject: [PATCH 49/60] fix typo --- install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install b/install index 3ed114f..3c4bd1a 100755 --- a/install +++ b/install @@ -93,7 +93,7 @@ do_install() pip install catkin_tools/ # install tango-icon-theme so icons show up correctly in rqt - brew install wget intltool gettext icon-naming-utils imagemacgick + brew install wget intltool gettext icon-naming-utils imagemagick brew link --force gettext wget http://pkgs.fedoraproject.org/repo/pkgs/tango-icon-theme/tango-icon-theme-0.8.90.tar.gz/0795895d2f20eddcbd2bffe94ed431a6/tango-icon-theme-0.8.90.tar.gz tar -xvf tango-icon-theme-0.8.90.tar.gz From 4a206c426a959e2f6db5c2dac23ec78275f95b07 Mon Sep 17 00:00:00 2001 From: Steve Nogar Date: Mon, 9 Mar 2020 19:33:53 -0400 Subject: [PATCH 50/60] fix rqt launch path --- install | 3 +++ 1 file changed, 3 insertions(+) diff --git a/install b/install index 3c4bd1a..58793ec 100755 --- a/install +++ b/install @@ -197,6 +197,9 @@ do_install() # fix rqt_reconfigure not showing up in rqt_gui patch -d src/rqt_reconfigure/ < ../patches/rqt_reconfigure.diff + # fix rqt_launch not showing up in rqt_gui + patch -d src/rqt_launch/ < ../patches/rqt_launch.diff + # fix python 3 errors in smach_ros (https://github.com/ros/executive_smach/pull/62) patch -p1 -d src/executive_smach/smach_ros < ../patches/smach_ros.patch From 9d94f6f76f59b4f8ed567c4b37e644fc24cbcc75 Mon Sep 17 00:00:00 2001 From: Steve Nogar Date: Mon, 9 Mar 2020 19:34:17 -0400 Subject: [PATCH 51/60] add rqt launch path --- patches/rqt_launch.diff | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 patches/rqt_launch.diff diff --git a/patches/rqt_launch.diff b/patches/rqt_launch.diff new file mode 100644 index 0000000..05a58dd --- /dev/null +++ b/patches/rqt_launch.diff @@ -0,0 +1,11 @@ +--- plugin.xml 2020-03-07 18:17:42.000000000 -0500 ++++ plugin.xml 2020-03-07 18:17:41.000000000 -0500 +@@ -6,7 +6,7 @@ + + + +- ++ + folder + Plugins related to configuration. + From 69c79517a74ea2cf0931ce1f391cc721ec6c7710 Mon Sep 17 00:00:00 2001 From: Steve Nogar Date: Wed, 11 Mar 2020 21:31:31 -0400 Subject: [PATCH 52/60] back to python2 splitting these branches up for the time being --- install | 73 +++++++++++++++++++++++++------------ patches/rosbag_storage.diff | 34 +++++------------ 2 files changed, 58 insertions(+), 49 deletions(-) diff --git a/install b/install index 58793ec..01905e7 100755 --- a/install +++ b/install @@ -75,34 +75,35 @@ do_install() echo " sudo chown -R $USER:admin /usr/local/*" fi - # # Brewed Python - if [ ! "$(which python3)" = "/usr/local/bin/python3" ]; then + # Brewed Python + if [ ! "$(which python2)" = "/usr/local/bin/python2" ]; then brew install python - mkdir -p ~/Library/Python/3.7/lib/python/site-packages - echo "$(brew --prefix)/lib/python3.7/site-packages" >> ~/Library/Python/3.7/lib/python/site-packages/homebrew.pth + brew unlink python + brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/f1f4a0a60e801ff92faf8d0ac81ad9ce5910c295/Formula/python@2.rb + brew link python@2 + + mkdir -p ~/Library/Python/2.7/lib/python/site-packages + echo "$(brew --prefix)/lib/python2.7/site-packages" >> ~/Library/Python/2.7/lib/python/site-packages/homebrew.pth fi # This tap gives us formulae for Gazebo and its dependencies, including SDF. brew tap osrf/simulation # ROS infrastructure tools - brew install libyaml python git || true - - # install catkin_tools from source (fixes https://github.com/catkin/catkin_tools/issues/558) - git clone https://github.com/catkin/catkin_tools.git - pip install catkin_tools/ + brew install libyaml git || true # install tango-icon-theme so icons show up correctly in rqt - brew install wget intltool gettext icon-naming-utils imagemagick + brew install wget intltool gettext icon-naming-utils imagemagick automake brew link --force gettext wget http://pkgs.fedoraproject.org/repo/pkgs/tango-icon-theme/tango-icon-theme-0.8.90.tar.gz/0795895d2f20eddcbd2bffe94ed431a6/tango-icon-theme-0.8.90.tar.gz + rm -rf tango-icon-theme-0.8.90 tar -xvf tango-icon-theme-0.8.90.tar.gz cd tango-icon-theme-0.8.90 ./configure make install cd .. - pip install -U setuptools rosdep rosinstall_generator wstool rosinstall bloom empy sphinx pycurl osrf_pycommon termcolor + pip install -U setuptools rosdep rosinstall_generator wstool rosinstall catkin_tools bloom empy sphinx pycurl osrf_pycommon termcolor # Rosdep has an issue detecting that qt5 is correctly installed, so preinstall it. This is a keg-only formula, # so add its location to the prefix path in order for workspace packages to be able to find it. @@ -121,15 +122,14 @@ do_install() brew install openssl export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/openssl/lib/pkgconfig" - # Mock out python and pip so that we get the brewed versions when rosdep and other programs call them. - # Mock out pip so that we get the brewed pip2 when rosdep calls it to make an installation. - # export PATH=$(pwd)/shim:$PATH - export ROS_PYTHON_VERSION=3 - - # missing depdendencies that rosdep doesn't seem to catch + # missing depdendencies that rosdep doesn't seem to catch brew install fltk poco lz4 gpgme yaml-cpp opencv@3 pcl brew link --force opencv@3 + # Mock out python and pip so that we get the brewed versions when rosdep and other programs call them. + # Mock out pip so that we get the brewed pip2 when rosdep calls it to make an installation. + export PATH=$(pwd)/shim:$PATH + # Initialize and update rosdep if [ ! -d /etc/ros/rosdep/ ]; then echo "This sudo prompt is to initialize rosdep (creates the /etc/ros/rosdep path)." @@ -153,24 +153,46 @@ do_install() rosinstall_generator ${ROS_CONFIGURATION} ${ROS_EXTRA_PACKAGES} --rosdistro ${ROS_DISTRO} --deps --tar > ${WS}.rosinstall wstool init src pushd src + # Avoid downloading opencv3; we already installed it from homebrew. wstool merge file://$(pwd)/../${WS}.rosinstall + + # swap out rospy for kinetic version 1.12.6. This fixes "RuntimeError: + # concurrent poll() invocation" errors. + # wstool merge -r ../../patches/rospy_patch.rosinstall -y wstool update -j8 # Package dependencies. rosdep install --from-paths . --ignore-src --rosdistro ${ROS_DISTRO} -y -r --as-root pip:no popd + # install specific versions of certain brew packages + + # sip 4.19.8_12 - still supports python2 + brew unlink sip + brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/6d2b011fa8f28ef5a0b52f24eb687276823a22fa/Formula/sip.rb + brew link sip + + # pyqt 5.10.1_1 - still supports python2 + brew unlink pyqt + brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/1f389d65e21ad067be6811900f5361301b44839f/Formula/pyqt.rb + brew link pyqt + + # old version of numpy + brew unlink numpy + brew install numpy@1.16 + brew link numpy@1.16 --force + # patches - # # fix roscpp trying to link against unused? boost component + # fix roscpp trying to link against unused? boost component patch -d src/ros_comm/roscpp/ < ../patches/roscpp.diff patch -d src/ros_comm/message_filters/ < ../patches/message_filters.diff - # # fix tf and tf2 trying to link against unused? boost component + # fix tf and tf2 trying to link against unused? boost component patch -d src/geometry/tf/ < ../patches/tf.diff patch -d src/geometry2/tf2/ < ../patches/tf2.diff - # # rosbag_strorage encryption + # rosbag_strorage encryption patch -d src/ros_comm/rosbag_storage/ < ../patches/rosbag_storage.diff if [ ! -d /usr/local/include/openssl ]; then ln -s /usr/local/opt/openssl/include/* /usr/local/include/ @@ -182,6 +204,9 @@ do_install() # fix boost components in camera_calibration_parsers patch -d src/vision_opencv/cv_bridge/ < ../patches/cv_bridge.diff + # add pango to image_view + patch -d src/image_pipeline/image_view/ < ../patches/image_view.diff + # fix find flann library in pcl so pcl_ros can build # (https://stackoverflow.com/questions/53776238/building-point-cloud-library-pcl-on-macos-x-mojave-error-ld-library-not-foun) patch -d /usr/local/share/pcl-1.9/Modules/ < ../patches/FindFLANN.diff @@ -200,9 +225,6 @@ do_install() # fix rqt_launch not showing up in rqt_gui patch -d src/rqt_launch/ < ../patches/rqt_launch.diff - # fix python 3 errors in smach_ros (https://github.com/ros/executive_smach/pull/62) - patch -p1 -d src/executive_smach/smach_ros < ../patches/smach_ros.patch - # Clean out or create the install directory. if [ -d ${ROS_INSTALL_DIR} ]; then rm -rf ${ROS_INSTALL_DIR}/* @@ -221,7 +243,10 @@ do_install() -DCATKIN_ENABLE_TESTING=0 \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_FIND_FRAMEWORK=LAST \ - -DPYTHON_EXECUTABLE=$(which python3) + -DPYTHON_EXECUTABLE=$(which python2) \ + -DPYTHON_LIBRARY=$(python2 -c "import sys; print sys.prefix")/lib/libpython2.7.dylib \ + -DPYTHON_INCLUDE_DIR=$(python2 -c "import sys; print sys.prefix")/include/python2.7 + -DBoost_NO_BOOST_CMAKE=ON catkin build echo "Installation successful, please source the ROS workspace:" diff --git a/patches/rosbag_storage.diff b/patches/rosbag_storage.diff index b916a97..cbaa17f 100644 --- a/patches/rosbag_storage.diff +++ b/patches/rosbag_storage.diff @@ -1,20 +1,6 @@ ---- CMakeLists.txt 2019-10-06 15:22:37.000000000 -0400 -+++ CMakeLists.txt 2019-10-06 15:22:29.000000000 -0400 -@@ -11,6 +11,13 @@ - find_package(Boost REQUIRED COMPONENTS date_time filesystem program_options regex) - find_package(BZip2 REQUIRED) - -+find_package(PkgConfig REQUIRED) -+pkg_check_modules(OpenSSL REQUIRED openssl) -+pkg_check_modules(LibCrypto REQUIRED libcrypto) -+find_package(Gpgmepp CONFIG REQUIRED) -+ -+link_directories(${LibCrypto_LIBRARY_DIRS}) -+ - catkin_package( - CFG_EXTRAS rosbag_storage-extras.cmake - INCLUDE_DIRS include -@@ -22,15 +29,15 @@ +--- CMakeLists.txt 2020-03-11 20:56:18.000000000 -0400 ++++ CMakeLists.new.txt 2020-03-11 20:53:18.000000000 -0400 +@@ -29,12 +29,14 @@ # Support large bags (>2GB) on 32-bit systems add_definitions(-D_FILE_OFFSET_BITS=64) @@ -24,12 +10,10 @@ set(AES_ENCRYPT_SOURCE "") set(AES_ENCRYPT_LIBRARIES "") - if(NOT WIN32) - set(AES_ENCRYPT_SOURCE "src/aes_encryptor.cpp") -- set(AES_ENCRYPT_LIBRARIES "crypto" "gpgme") --endif() +-if(NOT WIN32) ++if(APPLE) + set(AES_ENCRYPT_LIBRARIES "crypto" "Gpgmepp") -+endif() - - add_library(rosbag_storage - ${AES_ENCRYPT_SOURCE} ++elseif(NOT WIN32) + set(AES_ENCRYPT_SOURCE "src/aes_encryptor.cpp" "src/gpgme_utils.cpp") + find_library(GPGME_LIBRARY + NAMES "gpgme" From b4082e1d9b479349a2adbc10c7693e0ccb923179 Mon Sep 17 00:00:00 2001 From: Steve Nogar Date: Thu, 12 Mar 2020 09:17:00 -0400 Subject: [PATCH 53/60] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f6baadd..5e16838 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ Required software versions (installed via script): * **boost**: 1.72 * **opencv3** -* **python3** +* **python2** Usage ----- From 8b42312ff083fabf1e05310ae2007d867d8d3d98 Mon Sep 17 00:00:00 2001 From: Steve Nogar Date: Fri, 27 Mar 2020 22:56:53 -0400 Subject: [PATCH 54/60] =?UTF-8?q?more=20fixes=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- install | 38 +++++++++++--------- patches/image_view.diff | 71 +++++++++++++++++++++++++++++++++++++ patches/rosbag_storage.diff | 7 ++-- 3 files changed, 95 insertions(+), 21 deletions(-) create mode 100644 patches/image_view.diff diff --git a/install b/install index 01905e7..cbc7070 100755 --- a/install +++ b/install @@ -123,8 +123,7 @@ do_install() export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/openssl/lib/pkgconfig" # missing depdendencies that rosdep doesn't seem to catch - brew install fltk poco lz4 gpgme yaml-cpp opencv@3 pcl - brew link --force opencv@3 + brew install fltk poco lz4 gpgme yaml-cpp opencv pcl # Mock out python and pip so that we get the brewed versions when rosdep and other programs call them. # Mock out pip so that we get the brewed pip2 when rosdep calls it to make an installation. @@ -177,53 +176,58 @@ do_install() brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/1f389d65e21ad067be6811900f5361301b44839f/Formula/pyqt.rb brew link pyqt - # old version of numpy + # # old version of numpy brew unlink numpy brew install numpy@1.16 brew link numpy@1.16 --force + brew unlink opencv + brew install opencv@3 + brew link --force opencv@3 + + # patches # fix roscpp trying to link against unused? boost component - patch -d src/ros_comm/roscpp/ < ../patches/roscpp.diff - patch -d src/ros_comm/message_filters/ < ../patches/message_filters.diff + patch -N -d src/ros_comm/roscpp/ < ../patches/roscpp.diff + patch -N -d src/ros_comm/message_filters/ < ../patches/message_filters.diff # fix tf and tf2 trying to link against unused? boost component - patch -d src/geometry/tf/ < ../patches/tf.diff - patch -d src/geometry2/tf2/ < ../patches/tf2.diff + patch -N -d src/geometry/tf/ < ../patches/tf.diff + patch -N -d src/geometry2/tf2/ < ../patches/tf2.diff # rosbag_strorage encryption - patch -d src/ros_comm/rosbag_storage/ < ../patches/rosbag_storage.diff + patch -N -d src/ros_comm/rosbag_storage/ < ../patches/rosbag_storage.diff if [ ! -d /usr/local/include/openssl ]; then ln -s /usr/local/opt/openssl/include/* /usr/local/include/ fi # fix boost components in camera_calibration_parsers - patch -d src/image_common/camera_calibration_parsers/ < ../patches/camera_calibration_parsers.diff + patch -N -d src/image_common/camera_calibration_parsers/ < ../patches/camera_calibration_parsers.diff # fix boost components in camera_calibration_parsers - patch -d src/vision_opencv/cv_bridge/ < ../patches/cv_bridge.diff + patch -N -d src/vision_opencv/cv_bridge/ < ../patches/cv_bridge.diff # add pango to image_view - patch -d src/image_pipeline/image_view/ < ../patches/image_view.diff + patch -N -d src/image_pipeline/image_view/ < ../patches/image_view.diff # fix find flann library in pcl so pcl_ros can build # (https://stackoverflow.com/questions/53776238/building-point-cloud-library-pcl-on-macos-x-mojave-error-ld-library-not-foun) - patch -d /usr/local/share/pcl-1.9/Modules/ < ../patches/FindFLANN.diff + patch -N -d /usr/local/share/pcl-1.9/Modules/ < ../patches/FindFLANN.diff # fix ros_controllers not finding class_loader and console_bridge - patch -d src/ros_controllers/position_controllers/ < ../patches/position_controllers.diff - patch -d src/ros_controllers/diff_drive_controller/ < ../patches/diff_drive_controller.diff + patch -N -d src/ros_controllers/position_controllers/ < ../patches/position_controllers.diff + patch -N -d src/ros_controllers/diff_drive_controller/ < ../patches/diff_drive_controller.diff # patch rospy to fix mac specific errors (https://github.com/ros/ros_comm/pull/1904) patch -p1 -d src/ros_comm < ../patches/rospy_kqueue.patch patch -p1 -d src/ros_comm < ../patches/rospy_exception.patch # fix rqt_reconfigure not showing up in rqt_gui - patch -d src/rqt_reconfigure/ < ../patches/rqt_reconfigure.diff + patch -N -d src/rqt_reconfigure/ < ../patches/rqt_reconfigure.diff # fix rqt_launch not showing up in rqt_gui - patch -d src/rqt_launch/ < ../patches/rqt_launch.diff + patch -N -d src/rqt_launch/ < ../patches/rqt_launch.diff # Clean out or create the install directory. if [ -d ${ROS_INSTALL_DIR} ]; then @@ -245,7 +249,7 @@ do_install() -DCMAKE_FIND_FRAMEWORK=LAST \ -DPYTHON_EXECUTABLE=$(which python2) \ -DPYTHON_LIBRARY=$(python2 -c "import sys; print sys.prefix")/lib/libpython2.7.dylib \ - -DPYTHON_INCLUDE_DIR=$(python2 -c "import sys; print sys.prefix")/include/python2.7 + -DPYTHON_INCLUDE_DIR=$(python2 -c "import sys; print sys.prefix")/include/python2.7 \ -DBoost_NO_BOOST_CMAKE=ON catkin build diff --git a/patches/image_view.diff b/patches/image_view.diff new file mode 100644 index 0000000..6d227b5 --- /dev/null +++ b/patches/image_view.diff @@ -0,0 +1,71 @@ +--- CMakeLists.txt 2019-10-06 15:59:03.000000000 -0400 ++++ CMakeLists.txt 2019-10-06 15:58:20.000000000 -0400 +@@ -1,6 +1,11 @@ + cmake_minimum_required(VERSION 2.8) + project(image_view) + ++find_package(PkgConfig REQUIRED) ++pkg_check_modules(Pango REQUIRED pango) ++ ++link_directories(${Pango_LIBRARY_DIRS}) ++ + find_package(catkin REQUIRED COMPONENTS camera_calibration_parsers cv_bridge dynamic_reconfigure image_transport message_filters message_generation nodelet rosconsole roscpp std_srvs stereo_msgs) + generate_dynamic_reconfigure_options(cfg/ImageView.cfg) + +@@ -11,22 +16,26 @@ + include_directories(${Boost_INCLUDE_DIRS} + ${catkin_INCLUDE_DIRS} + ${OpenCV_INCLUDE_DIRS} ++ ${Pango_INCLUDE_DIRS} + ) + + # Extra tools + add_executable(extract_images src/nodes/extract_images.cpp) + target_link_libraries(extract_images ${catkin_LIBRARIES} + ${OpenCV_LIBRARIES} ++ ${Pango_LIBRARIES} + ) + + add_executable(image_saver src/nodes/image_saver.cpp) + target_link_libraries(image_saver ${catkin_LIBRARIES} + ${OpenCV_LIBRARIES} ++ ${Pango_LIBRARIES} + ) + + add_executable(video_recorder src/nodes/video_recorder.cpp) + target_link_libraries(video_recorder ${catkin_LIBRARIES} + ${OpenCV_LIBRARIES} ++ ${Pango_LIBRARIES} + ) + + install(TARGETS extract_images image_saver video_recorder +@@ -49,6 +58,7 @@ + ${GTK2_LIBRARIES} + ${OpenCV_LIBRARIES} + ${Boost_LIBRARIES} ++ ${Pango_LIBRARIES} + ) + install(TARGETS image_view + DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} +@@ -61,11 +71,13 @@ + target_link_libraries(image_view_exe ${catkin_LIBRARIES} + ${OpenCV_LIBRARIES} + ${Boost_LIBRARIES} ++ ${Pango_LIBRARIES} + ) + + add_executable(disparity_view src/nodes/disparity_view.cpp) + target_link_libraries(disparity_view ${catkin_LIBRARIES} + ${OpenCV_LIBRARIES} ++ ${Pango_LIBRARIES} + ) + + add_executable(stereo_view src/nodes/stereo_view.cpp) +@@ -74,6 +86,7 @@ + ${GTK_LIBRARIES} + ${GTK2_LIBRARIES} + ${OpenCV_LIBRARIES} ++ ${Pango_LIBRARIES} + ) + + install(TARGETS disparity_view image_view_exe stereo_view diff --git a/patches/rosbag_storage.diff b/patches/rosbag_storage.diff index cbaa17f..afce435 100644 --- a/patches/rosbag_storage.diff +++ b/patches/rosbag_storage.diff @@ -1,6 +1,6 @@ ---- CMakeLists.txt 2020-03-11 20:56:18.000000000 -0400 -+++ CMakeLists.new.txt 2020-03-11 20:53:18.000000000 -0400 -@@ -29,12 +29,14 @@ +--- CMakeLists.txt 2020-03-27 22:19:28.000000000 -0400 ++++ CMakeLists.txt 2020-03-27 22:21:34.000000000 -0400 +@@ -22,12 +22,13 @@ # Support large bags (>2GB) on 32-bit systems add_definitions(-D_FILE_OFFSET_BITS=64) @@ -12,7 +12,6 @@ set(AES_ENCRYPT_LIBRARIES "") -if(NOT WIN32) +if(APPLE) -+ set(AES_ENCRYPT_LIBRARIES "crypto" "Gpgmepp") +elseif(NOT WIN32) set(AES_ENCRYPT_SOURCE "src/aes_encryptor.cpp" "src/gpgme_utils.cpp") find_library(GPGME_LIBRARY From 5f83dc188a2bb3cc582ff19e2c0f0ad5c81eed42 Mon Sep 17 00:00:00 2001 From: Steve Nogar Date: Thu, 30 Apr 2020 16:36:07 -0400 Subject: [PATCH 55/60] latest changes --- install | 38 ++++++++++++------------- patches/cv_bridge.diff | 7 ----- patches/diff_drive_controller.diff | 12 -------- patches/message_filters.diff | 11 -------- patches/position_controllers.diff | 12 -------- patches/roscpp.diff | 11 -------- patches/rospy_exception.patch | 26 ----------------- patches/rospy_kqueue.patch | 45 ------------------------------ patches/tf.diff | 11 -------- 9 files changed, 18 insertions(+), 155 deletions(-) delete mode 100644 patches/diff_drive_controller.diff delete mode 100644 patches/message_filters.diff delete mode 100644 patches/position_controllers.diff delete mode 100644 patches/roscpp.diff delete mode 100644 patches/rospy_exception.patch delete mode 100644 patches/rospy_kqueue.patch delete mode 100644 patches/tf.diff diff --git a/install b/install index cbc7070..4c763b4 100755 --- a/install +++ b/install @@ -148,6 +148,13 @@ do_install() mkdir $WS cd $WS + if brew ls --versions numpy@1.16 > /dev/null; then + brew uninstall numpy@1.16 + brew install numpy + brew link numpy + fi + + # Standard source install rosinstall_generator ${ROS_CONFIGURATION} ${ROS_EXTRA_PACKAGES} --rosdistro ${ROS_DISTRO} --deps --tar > ${WS}.rosinstall wstool init src @@ -176,24 +183,26 @@ do_install() brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/1f389d65e21ad067be6811900f5361301b44839f/Formula/pyqt.rb brew link pyqt - # # old version of numpy - brew unlink numpy - brew install numpy@1.16 - brew link numpy@1.16 --force + # cmake 3.17 seems to break things, this is 3.16.15 + brew unlink cmake + brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/ce67f01dd2586e36b84eba1c0a7d13fb0cde0302/Formula/cmake.rb + brew link cmake + # opencv3 brew unlink opencv brew install opencv@3 brew link --force opencv@3 + # # old version of numpy + if ! brew ls --versions numpy@1.16 > /dev/null; then + brew unlink numpy + brew install numpy@1.16 + brew link numpy@1.16 --force + fi # patches - # fix roscpp trying to link against unused? boost component - patch -N -d src/ros_comm/roscpp/ < ../patches/roscpp.diff - patch -N -d src/ros_comm/message_filters/ < ../patches/message_filters.diff - # fix tf and tf2 trying to link against unused? boost component - patch -N -d src/geometry/tf/ < ../patches/tf.diff patch -N -d src/geometry2/tf2/ < ../patches/tf2.diff # rosbag_strorage encryption @@ -215,17 +224,6 @@ do_install() # (https://stackoverflow.com/questions/53776238/building-point-cloud-library-pcl-on-macos-x-mojave-error-ld-library-not-foun) patch -N -d /usr/local/share/pcl-1.9/Modules/ < ../patches/FindFLANN.diff - # fix ros_controllers not finding class_loader and console_bridge - patch -N -d src/ros_controllers/position_controllers/ < ../patches/position_controllers.diff - patch -N -d src/ros_controllers/diff_drive_controller/ < ../patches/diff_drive_controller.diff - - # patch rospy to fix mac specific errors (https://github.com/ros/ros_comm/pull/1904) - patch -p1 -d src/ros_comm < ../patches/rospy_kqueue.patch - patch -p1 -d src/ros_comm < ../patches/rospy_exception.patch - - # fix rqt_reconfigure not showing up in rqt_gui - patch -N -d src/rqt_reconfigure/ < ../patches/rqt_reconfigure.diff - # fix rqt_launch not showing up in rqt_gui patch -N -d src/rqt_launch/ < ../patches/rqt_launch.diff diff --git a/patches/cv_bridge.diff b/patches/cv_bridge.diff index 2321844..7680645 100644 --- a/patches/cv_bridge.diff +++ b/patches/cv_bridge.diff @@ -20,10 +20,3 @@ endif() else() find_package(Boost REQUIRED) -@@ -45,4 +53,4 @@ - install( - DIRECTORY include/${PROJECT_NAME}/ - DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION} --) -\ No newline at end of file -+) diff --git a/patches/diff_drive_controller.diff b/patches/diff_drive_controller.diff deleted file mode 100644 index cbf5f61..0000000 --- a/patches/diff_drive_controller.diff +++ /dev/null @@ -1,12 +0,0 @@ ---- CMakeLists.txt 2020-02-24 10:07:30.000000000 -0500 -+++ CMakeLists.txt 2020-02-24 10:07:25.000000000 -0500 -@@ -14,7 +14,9 @@ - realtime_tools - tf - urdf -+ class_loader - ) -+find_package(console_bridge REQUIRED) - - generate_dynamic_reconfigure_options(cfg/DiffDriveController.cfg) - diff --git a/patches/message_filters.diff b/patches/message_filters.diff deleted file mode 100644 index acd45d7..0000000 --- a/patches/message_filters.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- CMakeLists.txt 2018-08-06 13:38:23.000000000 -0400 -+++ CMakeLists.txt 2019-10-06 14:43:20.000000000 -0400 -@@ -13,7 +13,7 @@ - ) - catkin_python_setup() - --find_package(Boost REQUIRED COMPONENTS signals thread) -+find_package(Boost REQUIRED COMPONENTS thread) - - include_directories(include ${catkin_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS}) - link_directories(${catkin_LIBRARY_DIRS}) diff --git a/patches/position_controllers.diff b/patches/position_controllers.diff deleted file mode 100644 index 229142f..0000000 --- a/patches/position_controllers.diff +++ /dev/null @@ -1,12 +0,0 @@ ---- CMakeLists.txt 2020-02-24 09:47:12.000000000 -0500 -+++ CMakeLists.txt 2020-02-24 09:47:09.000000000 -0500 -@@ -2,7 +2,8 @@ - project(position_controllers) - - # Load catkin and all dependencies required for this package --find_package(catkin REQUIRED COMPONENTS controller_interface forward_command_controller) -+find_package(catkin REQUIRED COMPONENTS controller_interface forward_command_controller class_loader) -+find_package(console_bridge REQUIRED) - - # Declare catkin project - catkin_package( diff --git a/patches/roscpp.diff b/patches/roscpp.diff deleted file mode 100644 index 46a1fb2..0000000 --- a/patches/roscpp.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- CMakeLists.txt 2019-10-06 13:48:37.000000000 -0400 -+++ CMakeLists.txt 2019-10-06 14:02:18.000000000 -0400 -@@ -22,7 +22,7 @@ - - configure_file(${CMAKE_CURRENT_SOURCE_DIR}/include/ros/common.h.in ${CATKIN_DEVEL_PREFIX}/${CATKIN_GLOBAL_INCLUDE_DESTINATION}/ros/common.h) - --find_package(Boost REQUIRED COMPONENTS chrono filesystem signals system) -+find_package(Boost REQUIRED COMPONENTS chrono filesystem system) - - include_directories(include ${CATKIN_DEVEL_PREFIX}/${CATKIN_GLOBAL_INCLUDE_DESTINATION}/ros ${catkin_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS}) - diff --git a/patches/rospy_exception.patch b/patches/rospy_exception.patch deleted file mode 100644 index 7070259..0000000 --- a/patches/rospy_exception.patch +++ /dev/null @@ -1,26 +0,0 @@ -From e7eeac4b16d8a5ce85d7d755c0cee3976df24845 Mon Sep 17 00:00:00 2001 -From: Steve Nogar -Date: Sun, 1 Mar 2020 13:02:37 -0500 -Subject: [PATCH] add exception for ConnectionAbortedError - -Prevent python nodes from spamming the terminal on every close. Noted in Python 3 running on macOS. ---- - clients/rospy/src/rospy/impl/tcpros_base.py | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git clients/rospy/src/rospy/impl/tcpros_base.py clients/rospy/src/rospy/impl/tcpros_base.py -index beb11aaf1..2f896731e 100644 ---- clients/rospy/src/rospy/impl/tcpros_base.py -+++ clients/rospy/src/rospy/impl/tcpros_base.py -@@ -154,6 +154,8 @@ class TCPServer(object): - (client_sock, client_addr) = self.server_sock.accept() - except socket.timeout: - continue -+ except ConnectionAbortedError: -+ continue - except IOError as e: - (e_errno, msg) = e.args - if e_errno == errno.EINTR: #interrupted system call --- -2.25.0 - diff --git a/patches/rospy_kqueue.patch b/patches/rospy_kqueue.patch deleted file mode 100644 index 4d5d992..0000000 --- a/patches/rospy_kqueue.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 53b5286b50afbdce92f42397517e01937c8f875d Mon Sep 17 00:00:00 2001 -From: Steve Nogar -Date: Sun, 1 Mar 2020 13:01:34 -0500 -Subject: [PATCH] fix mac trying to use epoll instead of kqueue - -macOS was incorrectly attempting to use epoll/poll instead of kqueue, occassionally generating errors such as RuntimeError: concurrent poll() invocation and breaking python nodes. ---- - clients/rospy/src/rospy/topics.py | 14 +++++++------- - 1 file changed, 7 insertions(+), 7 deletions(-) - -diff --git clients/rospy/src/rospy/topics.py clients/rospy/src/rospy/topics.py -index 124864cfa..3ef4412ae 100644 ---- clients/rospy/src/rospy/topics.py -+++ clients/rospy/src/rospy/topics.py -@@ -192,7 +192,13 @@ class Poller(object): - on multiple platforms. NOT thread-safe. - """ - def __init__(self): -- if hasattr(select, 'epoll'): -+ if hasattr(select, 'kqueue'): -+ self.poller = select.kqueue() -+ self.add_fd = self.add_kqueue -+ self.remove_fd = self.remove_kqueue -+ self.error_iter = self.error_kqueue_iter -+ self.kevents = [] -+ elif hasattr(select, 'epoll'): - self.poller = select.epoll() - self.add_fd = self.add_epoll - self.remove_fd = self.remove_epoll -@@ -202,12 +208,6 @@ class Poller(object): - self.add_fd = self.add_poll - self.remove_fd = self.remove_poll - self.error_iter = self.error_poll_iter -- elif hasattr(select, 'kqueue'): -- self.poller = select.kqueue() -- self.add_fd = self.add_kqueue -- self.remove_fd = self.remove_kqueue -- self.error_iter = self.error_kqueue_iter -- self.kevents = [] - else: - #TODO: non-Noop impl for Windows - self.poller = self.noop --- -2.25.0 - diff --git a/patches/tf.diff b/patches/tf.diff deleted file mode 100644 index 5eff8af..0000000 --- a/patches/tf.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- CMakeLists.txt 2019-10-06 16:19:38.000000000 -0400 -+++ CMakeLists.txt 2019-10-06 16:19:33.000000000 -0400 -@@ -15,7 +15,7 @@ - std_msgs - tf2_ros - ) --find_package(Boost REQUIRED COMPONENTS thread signals system) -+find_package(Boost REQUIRED COMPONENTS thread system) - - catkin_python_setup() - From 2bf4f168399d219be5f0571abd800e6491139a85 Mon Sep 17 00:00:00 2001 From: Steve Nogar Date: Thu, 4 Jun 2020 09:49:44 -0400 Subject: [PATCH 56/60] small fix for numpy install and diagnostic_aggregator --- README.md | 19 +++++++++++++++++-- install | 7 +++++-- patches/diagnostic_aggregator.diff | 21 +++++++++++++++++++++ 3 files changed, 43 insertions(+), 4 deletions(-) create mode 100644 patches/diagnostic_aggregator.diff diff --git a/README.md b/README.md index 5e16838..5b4b051 100644 --- a/README.md +++ b/README.md @@ -165,8 +165,6 @@ Below are assorted tips that I have compiled for fixing any issues that can crop * This has to do with home-brew dropping qt4 support: https://github.com/mikepurvis/ros-install-osx/issues/63 -* Could also install indigo on snapdragon, but would take a VERY long time to install - * rosdep —skip-keys command is useful for resolving dependencies * rosdep check --from-paths src --ignore-src --rosdistro kinetic --skip-keys geographiclib --skip-keys geographiclib-tools @@ -268,4 +266,21 @@ Below are assorted tips that I have compiled for fixing any issues that can crop sudo pip install --upgrade catkin_pkg_modules ``` +* If the standard library is missing: such as + + ```bash + error: no member named 'isfinite' in namespace 'std'; did you mean 'finite'? + ``` + + Run the following command (from [here](https://github.com/PointCloudLibrary/pcl/issues/2601)) + + ```bash + #Check the current sdk + xcrun --show-sdk-path + + #Change sdk + sudo xcode-select -s /Library/Developer/CommandLineTools #Using CommandLineTools SDK + sudo xcode-select -s /Applications/Xcode.app/Contents/Developer #Using XCode.app SDK + ``` + \ No newline at end of file diff --git a/install b/install index 4c763b4..b988aeb 100755 --- a/install +++ b/install @@ -149,9 +149,9 @@ do_install() cd $WS if brew ls --versions numpy@1.16 > /dev/null; then - brew uninstall numpy@1.16 + brew uninstall --ignore-dependencies numpy@1.16 brew install numpy - brew link numpy + brew link --overwrite numpy fi @@ -214,6 +214,9 @@ do_install() # fix boost components in camera_calibration_parsers patch -N -d src/image_common/camera_calibration_parsers/ < ../patches/camera_calibration_parsers.diff + # remove testing from diagnostic aggregator + patch -N -d src/diagnostics/diagnostic_aggregator/ < ../patches/diagnostic_aggregator.diff + # fix boost components in camera_calibration_parsers patch -N -d src/vision_opencv/cv_bridge/ < ../patches/cv_bridge.diff diff --git a/patches/diagnostic_aggregator.diff b/patches/diagnostic_aggregator.diff new file mode 100644 index 0000000..b16b673 --- /dev/null +++ b/patches/diagnostic_aggregator.diff @@ -0,0 +1,21 @@ +--- CMakeLists.txt 2020-06-02 13:56:00.000000000 -0400 ++++ CMakeLists.txt 2020-06-02 13:56:53.000000000 -0400 +@@ -40,11 +40,6 @@ + ${PROJECT_NAME} + ) + +-# Analyzer loader allows other users to test that Analyzers load +-add_executable(analyzer_loader test/analyzer_loader.cpp +- gtest-1.7.0/gtest-all.cc) +-target_link_libraries(analyzer_loader diagnostic_aggregator) +- + if(CATKIN_ENABLE_TESTING) + find_package(rostest REQUIRED) + add_rostest(test/launch/test_agg.launch) +@@ -69,6 +64,3 @@ + install(TARGETS ${PROJECT_NAME} + DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} + ) +-install(TARGETS aggregator_node analyzer_loader +- DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} +-) From 29bd39c4b947f39cac715c98ad7a2a5703c4f3c2 Mon Sep 17 00:00:00 2001 From: Stephen Nogar Date: Fri, 22 Jan 2021 10:54:31 -0500 Subject: [PATCH 57/60] updates for noetic and macos big sur --- README.md | 8 +- bash_profile_recommendations.sh | 4 +- install | 212 +++++++++++------------ patches/FindFLANN.diff | 13 -- patches/camera_calibration_parsers.diff | 29 ---- patches/camera_calibration_parsers.patch | 26 +++ patches/cv_bridge.diff | 22 --- patches/cv_bridge.patch | 33 ++++ patches/diagnostic_aggregator.diff | 21 --- patches/image_view.diff | 71 -------- patches/image_view.patch | 40 +++++ patches/rosbag_storage.diff | 18 -- patches/rosbag_storage.patch | 53 ++++++ patches/rosdep.patch | 29 ++++ patches/rospkg.patch | 62 +++++++ patches/rqt_launch.diff | 11 -- patches/rqt_reconfigure.diff | 11 -- patches/rviz.patch | 63 +++++++ patches/smach_ros.patch | 39 ----- patches/tf2.diff | 11 -- rosdeps.yaml | 151 +++++++++++++--- shim/pip | 6 - 22 files changed, 539 insertions(+), 394 deletions(-) delete mode 100644 patches/FindFLANN.diff delete mode 100644 patches/camera_calibration_parsers.diff create mode 100644 patches/camera_calibration_parsers.patch delete mode 100644 patches/cv_bridge.diff create mode 100644 patches/cv_bridge.patch delete mode 100644 patches/diagnostic_aggregator.diff delete mode 100644 patches/image_view.diff create mode 100644 patches/image_view.patch delete mode 100644 patches/rosbag_storage.diff create mode 100644 patches/rosbag_storage.patch create mode 100644 patches/rosdep.patch create mode 100644 patches/rospkg.patch delete mode 100644 patches/rqt_launch.diff delete mode 100644 patches/rqt_reconfigure.diff create mode 100644 patches/rviz.patch delete mode 100644 patches/smach_ros.patch delete mode 100644 patches/tf2.diff delete mode 100755 shim/pip diff --git a/README.md b/README.md index 5b4b051..c663948 100644 --- a/README.md +++ b/README.md @@ -9,13 +9,13 @@ This is the successor to the [popular gist on the same topic][1]. Also thanks to ## Current Status -**Note: This should work as of March 1, 2020 on Catalina 10.15.3** +**Note: This should work as of Jan 22, 2021 on macOS Big Sur 11.1**. **Only ROS Noetic is supported.** Required software versions (installed via script): -* **boost**: 1.72 -* **opencv3** -* **python2** +* **Boost**: 1.73 +* **Opencv**: 4.5 +* **Python**: 3.8 Usage ----- diff --git a/bash_profile_recommendations.sh b/bash_profile_recommendations.sh index adfbb78..dc375b2 100644 --- a/bash_profile_recommendations.sh +++ b/bash_profile_recommendations.sh @@ -1,6 +1,6 @@ # recommended bash_profile lines for ROS -export PYTHONPATH=/usr/local/lib/python3.7/site-packages +export PYTHONPATH=/usr/local/lib/python3.8/site-packages export PYTHONWARNINGS=ignore::yaml.YAMLLoadWarning export ROS_PYTHON_VERSION=3 -export PATH="/usr/local/opt/python/libexec/bin:$PATH" +export PATH="/usr/local/opt/python3.8/libexec/bin:$PATH" diff --git a/install b/install index b988aeb..4943a29 100755 --- a/install +++ b/install @@ -22,7 +22,7 @@ # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. -ROS_DISTRO=${ROS_DISTRO:-melodic} +ROS_DISTRO=${ROS_DISTRO:-noetic} ROS_CONFIGURATION=${ROS_CONFIGURATION:-desktop_full} ROS_EXTRA_PACKAGES=${ROS_EXTRA_PACKAGES:-} ROS_INSTALL_DIR=${ROS_INSTALL_DIR:-/opt/ros/${ROS_DISTRO}} @@ -33,7 +33,7 @@ do_install() # Homebrew if ! hash brew 2>/dev/null; then - ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" + /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" echo export PATH='/usr/local/bin:$PATH' >> ~/.bash_profile source ~/.bash_profile brew doctor @@ -52,11 +52,11 @@ do_install() echo "These instructions are about to install Python from Homebrew. However, there are already" echo "pip packages installed against the system python, in the following path:" echo - echo " /Library/Python/2.7/site-packages/" + echo " /Library/Python/3.8/site-packages/" echo echo "If you have problems, please uninstall these packages:" echo - echo " for i in \$( pip freeze ); do sudo -H pip uninstall -y \$i; done" + echo " for i in \$( pip3 freeze ); do sudo -H pip3 uninstall -y \$i; done" echo echo "Then delete the build directory and start over again from scratch." fi @@ -72,43 +72,76 @@ do_install() echo echo "Alternatively, you could try chowning the contents of /usr/local to yourself:" echo - echo " sudo chown -R $USER:admin /usr/local/*" - fi - - # Brewed Python - if [ ! "$(which python2)" = "/usr/local/bin/python2" ]; then - brew install python - brew unlink python - brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/f1f4a0a60e801ff92faf8d0ac81ad9ce5910c295/Formula/python@2.rb - brew link python@2 - - mkdir -p ~/Library/Python/2.7/lib/python/site-packages - echo "$(brew --prefix)/lib/python2.7/site-packages" >> ~/Library/Python/2.7/lib/python/site-packages/homebrew.pth + echo " sudo chown -R ${USER}:staff /usr/local" fi # This tap gives us formulae for Gazebo and its dependencies, including SDF. brew tap osrf/simulation - # ROS infrastructure tools - brew install libyaml git || true + # build ignition messages from source to fix any out of date links for gazebo + # brew install -s ignition-msgs5 ignition-common3 ignition-math6 ignition-fuel-tools4 ignition-transport8 protobuf protobuf-c sdformat9 - # install tango-icon-theme so icons show up correctly in rqt - brew install wget intltool gettext icon-naming-utils imagemagick automake + # I'm not sure why gazebo is looking for the wrong sdk folder. This creates + # a symlink to fix it. Hopefully this gets fixed. More info at + # https://github.com/osrf/homebrew-simulation/issues/1248 + if [ ! -e /Library/Developer/CommandLineTools/SDKs/MacOSX11.0.sdk ]; then + sudo ln -s /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/ /Library/Developer/CommandLineTools/SDKs/MacOSX11.0.sdk + fi + + # ROS infrastructure tools + brew install \ + gazebo11 \ + libyaml \ + git \ + git-lfs \ + wget \ + intltool \ + gettext \ + icon-naming-utils \ + imagemagick \ + automake \ + qt5 \ + pyqt5 \ + sip \ + openssl \ + fltk \ + poco \ + lz4 \ + gpgme \ + yaml-cpp \ + opencv \ + pcl \ + orocos-kdl \ + log4cxx \ + boost-python3 + git lfs install brew link --force gettext - wget http://pkgs.fedoraproject.org/repo/pkgs/tango-icon-theme/tango-icon-theme-0.8.90.tar.gz/0795895d2f20eddcbd2bffe94ed431a6/tango-icon-theme-0.8.90.tar.gz - rm -rf tango-icon-theme-0.8.90 - tar -xvf tango-icon-theme-0.8.90.tar.gz - cd tango-icon-theme-0.8.90 - ./configure - make install - cd .. - pip install -U setuptools rosdep rosinstall_generator wstool rosinstall catkin_tools bloom empy sphinx pycurl osrf_pycommon termcolor + # Brewed Python + if [ ! "$(which python3.8)" = "/usr/local/bin/python3.8" ]; then + brew unlink python@3.9 + brew install python@3.8 + brew link python@3.8 + + mkdir -p ~/Library/Python/2.8/lib/python/site-packages + echo "$(brew --prefix)/lib/python3.8/site-packages" >> ~/Library/Python/3.8/lib/python/site-packages/homebrew.pth + fi + # export PATH="/usr/local/opt/python@3.8/bin:$PATH" + + + pip3 install -U setuptools rosdep rosinstall_generator wstool rosinstall bloom empy sphinx pycurl osrf_pycommon termcolor vcstool pycryptodomex + + # install catkin_tools from git (necessary until 0.7.0 release https://github.com/catkin/catkin_tools/issues/594) + pip3 install -U git+https://github.com/catkin/catkin_tools.git + + # patch rospkg to recognize macOS big sur (see PR https://github.com/ros-infrastructure/rospkg/pull/216) + set +e + patch -N -p3 -d /usr/local/lib/python3.8/site-packages/rospkg < patches/rospkg.patch + set -e # Rosdep has an issue detecting that qt5 is correctly installed, so preinstall it. This is a keg-only formula, # so add its location to the prefix path in order for workspace packages to be able to find it. - brew install qt5 pyqt5 sip || true - export CMAKE_PREFIX_PATH=$(brew --prefix qt5) + export CMAKE_PREFIX_PATH="$(brew --prefix qt5)" # This hack is required to make qt_gui_cpp compile correctly. See https://github.com/mikepurvis/ros-install-osx/pull/84#issuecomment-338209466 export PATH="/usr/local/opt/qt5/bin:$PATH" @@ -119,15 +152,11 @@ do_install() popd # get openssl and gpgme working for rosbag_storage - brew install openssl export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/openssl/lib/pkgconfig" - # missing depdendencies that rosdep doesn't seem to catch - brew install fltk poco lz4 gpgme yaml-cpp opencv pcl - # Mock out python and pip so that we get the brewed versions when rosdep and other programs call them. # Mock out pip so that we get the brewed pip2 when rosdep calls it to make an installation. - export PATH=$(pwd)/shim:$PATH + # export PATH=$(pwd)/shim:$PATH # Initialize and update rosdep if [ ! -d /etc/ros/rosdep/ ]; then @@ -145,90 +174,51 @@ do_install() if [ -d "$WS" ]; then rm -rf "$WS" fi - mkdir $WS + mkdir -p $WS/src cd $WS - if brew ls --versions numpy@1.16 > /dev/null; then - brew uninstall --ignore-dependencies numpy@1.16 - brew install numpy - brew link --overwrite numpy - fi - + # patch rosdep to fix brew list function (see PR https://github.com/ros-infrastructure/rosdep/pull/792) + set +e + patch -N -p3 -d /usr/local/lib/python3.8/site-packages/rosdep2 < ../patches/rosdep.patch + set -e # Standard source install rosinstall_generator ${ROS_CONFIGURATION} ${ROS_EXTRA_PACKAGES} --rosdistro ${ROS_DISTRO} --deps --tar > ${WS}.rosinstall - wstool init src - pushd src - # Avoid downloading opencv3; we already installed it from homebrew. - wstool merge file://$(pwd)/../${WS}.rosinstall - - # swap out rospy for kinetic version 1.12.6. This fixes "RuntimeError: - # concurrent poll() invocation" errors. - # wstool merge -r ../../patches/rospy_patch.rosinstall -y - wstool update -j8 - - # Package dependencies. - rosdep install --from-paths . --ignore-src --rosdistro ${ROS_DISTRO} -y -r --as-root pip:no - popd - - # install specific versions of certain brew packages - - # sip 4.19.8_12 - still supports python2 - brew unlink sip - brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/6d2b011fa8f28ef5a0b52f24eb687276823a22fa/Formula/sip.rb - brew link sip - - # pyqt 5.10.1_1 - still supports python2 - brew unlink pyqt - brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/1f389d65e21ad067be6811900f5361301b44839f/Formula/pyqt.rb - brew link pyqt - - # cmake 3.17 seems to break things, this is 3.16.15 - brew unlink cmake - brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/ce67f01dd2586e36b84eba1c0a7d13fb0cde0302/Formula/cmake.rb - brew link cmake - - # opencv3 - brew unlink opencv - brew install opencv@3 - brew link --force opencv@3 - - # # old version of numpy - if ! brew ls --versions numpy@1.16 > /dev/null; then - brew unlink numpy - brew install numpy@1.16 - brew link numpy@1.16 --force - fi + vcs import src < ../${WS}.rosinstall + rosdep install --from-paths src --ignore-src --rosdistro ${ROS_DISTRO} --as-root pip:false -y - # patches + # custom built dependencies + brew tap smnogar/ros-noetic + brew install \ + smnogar/ros-noetic/boost@1.73 \ + smnogar/ros-noetic/boost-python3@1.73 \ + smnogar/ros-noetic/sip@4.19.24 \ + smnogar/ros-noetic/pyqt@5.15.0 \ + smnogar/ros-noetic/tango-icon-theme + brew unlink boost && brew link boost@1.73 + brew unlink boost-python3 && brew link boost-python3@1.73 + brew unlink opencv && brew link opencv@4.2 + brew unlink sip && brew link sip@4.19.24 + brew unlink pyqt && brew link pyqt@5.15.0 - # fix tf and tf2 trying to link against unused? boost component - patch -N -d src/geometry2/tf2/ < ../patches/tf2.diff + set +e - # rosbag_strorage encryption - patch -N -d src/ros_comm/rosbag_storage/ < ../patches/rosbag_storage.diff - if [ ! -d /usr/local/include/openssl ]; then - ln -s /usr/local/opt/openssl/include/* /usr/local/include/ - fi - - # fix boost components in camera_calibration_parsers - patch -N -d src/image_common/camera_calibration_parsers/ < ../patches/camera_calibration_parsers.diff + # # rosbag_strorage encryption (PR https://github.com/ros/ros_comm/pull/2114) + patch -N -p3 -d src/ros_comm/rosbag_storage/ < ../patches/rosbag_storage.patch - # remove testing from diagnostic aggregator - patch -N -d src/diagnostics/diagnostic_aggregator/ < ../patches/diagnostic_aggregator.diff + # # fix boost components in camera_calibration_parsers (related PR https://github.com/ros-perception/image_common/pull/143/files) + patch -N -d src/image_common/camera_calibration_parsers/ < ../patches/camera_calibration_parsers.patch - # fix boost components in camera_calibration_parsers - patch -N -d src/vision_opencv/cv_bridge/ < ../patches/cv_bridge.diff + # # fix boost components (see PR https://github.com/ros-perception/vision_opencv/pull/274) + patch -N -d src/vision_opencv/cv_bridge/ < ../patches/cv_bridge.patch - # add pango to image_view - patch -N -d src/image_pipeline/image_view/ < ../patches/image_view.diff + # # make harfbuzz and gtk optional (related PR https://github.com/ros-perception/image_pipeline/pull/601) + patch -N -d src/image_pipeline/image_view/ < ../patches/image_view.patch - # fix find flann library in pcl so pcl_ros can build - # (https://stackoverflow.com/questions/53776238/building-point-cloud-library-pcl-on-macos-x-mojave-error-ld-library-not-foun) - patch -N -d /usr/local/share/pcl-1.9/Modules/ < ../patches/FindFLANN.diff + # fix assimp and remove twist plugin + patch -N -p1 -d src/rviz/ < ../patches/rviz.patch - # fix rqt_launch not showing up in rqt_gui - patch -N -d src/rqt_launch/ < ../patches/rqt_launch.diff + set -e # Clean out or create the install directory. if [ -d ${ROS_INSTALL_DIR} ]; then @@ -248,21 +238,21 @@ do_install() -DCATKIN_ENABLE_TESTING=0 \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_FIND_FRAMEWORK=LAST \ - -DPYTHON_EXECUTABLE=$(which python2) \ - -DPYTHON_LIBRARY=$(python2 -c "import sys; print sys.prefix")/lib/libpython2.7.dylib \ - -DPYTHON_INCLUDE_DIR=$(python2 -c "import sys; print sys.prefix")/include/python2.7 \ + -DPYTHON_EXECUTABLE=$(which python3) \ + -DPYTHON_LIBRARY=$(python3 -c "import sys; print(sys.prefix)")/lib/libpython3.8.dylib \ + -DPYTHON_INCLUDE_DIR=$(python3 -c "import sys; print(sys.prefix)")/include/python3.8 \ -DBoost_NO_BOOST_CMAKE=ON catkin build echo "Installation successful, please source the ROS workspace:" echo - echo " source ${ROS_INSTALL_DIR}/setup.bash" + echo " source ${ROS_INSTALL_DIR}/setup.zsh" echo # Check for SIP if on OSX/macOS 10.11 (El Capitan) or later if [[ `sw_vers -productVersion` > "10.10" ]] then - if `csrutil status | grep -q enabled` + if `csrutil status | grep -q 'Filesystem Protections: enabled'` then echo "You have System Integrity Protection enabled." echo diff --git a/patches/FindFLANN.diff b/patches/FindFLANN.diff deleted file mode 100644 index f9e82ae..0000000 --- a/patches/FindFLANN.diff +++ /dev/null @@ -1,13 +0,0 @@ ---- FindFLANN.cmake 2019-10-20 20:48:33.000000000 -0400 -+++ FindFLANN.cmake 2019-10-20 20:45:53.000000000 -0400 -@@ -9,6 +9,10 @@ - # If FLANN_USE_STATIC is specified and then look for static libraries ONLY else - # look for shared ones - -+# find flann libraries -+set(FLANN_LIBRARIES /usr/local/lib/libflann.dylib /usr/local/lib/libflann_cpp.dylib) -+set(FLANN_FOUND TRUE) -+ - if(FLANN_USE_STATIC) - set(FLANN_RELEASE_NAME flann_cpp_s) - set(FLANN_DEBUG_NAME flann_cpp_s-gd) diff --git a/patches/camera_calibration_parsers.diff b/patches/camera_calibration_parsers.diff deleted file mode 100644 index 57f7215..0000000 --- a/patches/camera_calibration_parsers.diff +++ /dev/null @@ -1,29 +0,0 @@ ---- CMakeLists.txt 2020-02-29 15:56:45.000000000 -0500 -+++ CMakeLists.txt 2020-02-29 15:55:41.000000000 -0500 -@@ -5,9 +5,17 @@ - - find_package(PythonLibs REQUIRED) - if(PYTHONLIBS_VERSION_STRING VERSION_LESS 3) -- find_package(Boost REQUIRED COMPONENTS filesystem python) -+ if(APPLE) -+ find_package(Boost REQUIRED COMPONENTS filesystem python27) -+ else() -+ find_package(Boost REQUIRED COMPONENTS filesystem python) -+ endif() - else() -- find_package(Boost REQUIRED COMPONENTS filesystem python3) -+ if(APPLE) -+ find_package(Boost REQUIRED COMPONENTS filesystem python) -+ else() -+ find_package(Boost REQUIRED COMPONENTS filesystem python3) -+ endif() - endif() - include_directories(include ${catkin_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${PYTHON_INCLUDE_DIRS}) - -@@ -80,4 +88,4 @@ - - if(CATKIN_ENABLE_TESTING) - add_subdirectory(test) --endif() -\ No newline at end of file -+endif() diff --git a/patches/camera_calibration_parsers.patch b/patches/camera_calibration_parsers.patch new file mode 100644 index 0000000..8b33452 --- /dev/null +++ b/patches/camera_calibration_parsers.patch @@ -0,0 +1,26 @@ +From 1302dbf942e2693f6029985afdb4675f32fe5e88 Mon Sep 17 00:00:00 2001 +From: Stephen Nogar +Date: Wed, 6 Jan 2021 14:44:54 -0500 +Subject: [PATCH] fix boost python + +--- + camera_calibration_parsers/CMakeLists.txt | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/camera_calibration_parsers/CMakeLists.txt b/camera_calibration_parsers/CMakeLists.txt +index 4f08187..981c0c9 100644 +--- a/camera_calibration_parsers/CMakeLists.txt ++++ b/camera_calibration_parsers/CMakeLists.txt +@@ -4,7 +4,8 @@ project(camera_calibration_parsers) + find_package(catkin REQUIRED sensor_msgs rosconsole roscpp roscpp_serialization) + + find_package(PythonLibs REQUIRED) +-find_package(Boost REQUIRED COMPONENTS filesystem python) ++find_package(PythonInterp REQUIRED) ++find_package(Boost REQUIRED COMPONENTS filesystem python${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}) + include_directories(include ${catkin_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${PYTHON_INCLUDE_DIRS}) + + catkin_python_setup() +-- +2.24.3 (Apple Git-128) + diff --git a/patches/cv_bridge.diff b/patches/cv_bridge.diff deleted file mode 100644 index 7680645..0000000 --- a/patches/cv_bridge.diff +++ /dev/null @@ -1,22 +0,0 @@ ---- CMakeLists.txt 2020-02-29 16:04:16.000000000 -0500 -+++ CMakeLists.txt 2020-02-29 16:03:36.000000000 -0500 -@@ -6,9 +6,17 @@ - if(NOT ANDROID) - find_package(PythonLibs) - if(PYTHONLIBS_VERSION_STRING VERSION_LESS 3) -- find_package(Boost REQUIRED python) -+ if(APPLE) -+ find_package(Boost REQUIRED COMPONENTS filesystem python27) -+ else() -+ find_package(Boost REQUIRED COMPONENTS filesystem python) -+ endif() - else() -- find_package(Boost REQUIRED python3) -+ if(APPLE) -+ find_package(Boost REQUIRED COMPONENTS filesystem python) -+ else() -+ find_package(Boost REQUIRED COMPONENTS filesystem python3) -+ endif() - endif() - else() - find_package(Boost REQUIRED) diff --git a/patches/cv_bridge.patch b/patches/cv_bridge.patch new file mode 100644 index 0000000..37a6588 --- /dev/null +++ b/patches/cv_bridge.patch @@ -0,0 +1,33 @@ +From 5dcaf516e272ccee80ec39bff6942804d3535086 Mon Sep 17 00:00:00 2001 +From: Stephen Nogar +Date: Wed, 6 Jan 2021 15:18:10 -0500 +Subject: [PATCH] fixes for loading correct version of boost python + +--- + cv_bridge/CMakeLists.txt | 10 ++-------- + 1 file changed, 2 insertions(+), 8 deletions(-) + +diff --git a/cv_bridge/CMakeLists.txt b/cv_bridge/CMakeLists.txt +index ef804b9..3ac0a19 100644 +--- a/cv_bridge/CMakeLists.txt ++++ b/cv_bridge/CMakeLists.txt +@@ -5,14 +5,8 @@ find_package(catkin REQUIRED COMPONENTS rosconsole sensor_msgs) + + if(NOT ANDROID) + find_package(PythonLibs) +- +- if(PYTHONLIBS_VERSION_STRING VERSION_LESS "3.8") +- # Debian Buster +- find_package(Boost REQUIRED python37) +- else() +- # Ubuntu Focal +- find_package(Boost REQUIRED python) +- endif() ++ find_package(PythonInterp REQUIRED) ++ find_package(Boost REQUIRED python${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}) + else() + find_package(Boost REQUIRED) + endif() +-- +2.24.3 (Apple Git-128) + diff --git a/patches/diagnostic_aggregator.diff b/patches/diagnostic_aggregator.diff deleted file mode 100644 index b16b673..0000000 --- a/patches/diagnostic_aggregator.diff +++ /dev/null @@ -1,21 +0,0 @@ ---- CMakeLists.txt 2020-06-02 13:56:00.000000000 -0400 -+++ CMakeLists.txt 2020-06-02 13:56:53.000000000 -0400 -@@ -40,11 +40,6 @@ - ${PROJECT_NAME} - ) - --# Analyzer loader allows other users to test that Analyzers load --add_executable(analyzer_loader test/analyzer_loader.cpp -- gtest-1.7.0/gtest-all.cc) --target_link_libraries(analyzer_loader diagnostic_aggregator) -- - if(CATKIN_ENABLE_TESTING) - find_package(rostest REQUIRED) - add_rostest(test/launch/test_agg.launch) -@@ -69,6 +64,3 @@ - install(TARGETS ${PROJECT_NAME} - DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} - ) --install(TARGETS aggregator_node analyzer_loader -- DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} --) diff --git a/patches/image_view.diff b/patches/image_view.diff deleted file mode 100644 index 6d227b5..0000000 --- a/patches/image_view.diff +++ /dev/null @@ -1,71 +0,0 @@ ---- CMakeLists.txt 2019-10-06 15:59:03.000000000 -0400 -+++ CMakeLists.txt 2019-10-06 15:58:20.000000000 -0400 -@@ -1,6 +1,11 @@ - cmake_minimum_required(VERSION 2.8) - project(image_view) - -+find_package(PkgConfig REQUIRED) -+pkg_check_modules(Pango REQUIRED pango) -+ -+link_directories(${Pango_LIBRARY_DIRS}) -+ - find_package(catkin REQUIRED COMPONENTS camera_calibration_parsers cv_bridge dynamic_reconfigure image_transport message_filters message_generation nodelet rosconsole roscpp std_srvs stereo_msgs) - generate_dynamic_reconfigure_options(cfg/ImageView.cfg) - -@@ -11,22 +16,26 @@ - include_directories(${Boost_INCLUDE_DIRS} - ${catkin_INCLUDE_DIRS} - ${OpenCV_INCLUDE_DIRS} -+ ${Pango_INCLUDE_DIRS} - ) - - # Extra tools - add_executable(extract_images src/nodes/extract_images.cpp) - target_link_libraries(extract_images ${catkin_LIBRARIES} - ${OpenCV_LIBRARIES} -+ ${Pango_LIBRARIES} - ) - - add_executable(image_saver src/nodes/image_saver.cpp) - target_link_libraries(image_saver ${catkin_LIBRARIES} - ${OpenCV_LIBRARIES} -+ ${Pango_LIBRARIES} - ) - - add_executable(video_recorder src/nodes/video_recorder.cpp) - target_link_libraries(video_recorder ${catkin_LIBRARIES} - ${OpenCV_LIBRARIES} -+ ${Pango_LIBRARIES} - ) - - install(TARGETS extract_images image_saver video_recorder -@@ -49,6 +58,7 @@ - ${GTK2_LIBRARIES} - ${OpenCV_LIBRARIES} - ${Boost_LIBRARIES} -+ ${Pango_LIBRARIES} - ) - install(TARGETS image_view - DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} -@@ -61,11 +71,13 @@ - target_link_libraries(image_view_exe ${catkin_LIBRARIES} - ${OpenCV_LIBRARIES} - ${Boost_LIBRARIES} -+ ${Pango_LIBRARIES} - ) - - add_executable(disparity_view src/nodes/disparity_view.cpp) - target_link_libraries(disparity_view ${catkin_LIBRARIES} - ${OpenCV_LIBRARIES} -+ ${Pango_LIBRARIES} - ) - - add_executable(stereo_view src/nodes/stereo_view.cpp) -@@ -74,6 +86,7 @@ - ${GTK_LIBRARIES} - ${GTK2_LIBRARIES} - ${OpenCV_LIBRARIES} -+ ${Pango_LIBRARIES} - ) - - install(TARGETS disparity_view image_view_exe stereo_view diff --git a/patches/image_view.patch b/patches/image_view.patch new file mode 100644 index 0000000..75d2f7f --- /dev/null +++ b/patches/image_view.patch @@ -0,0 +1,40 @@ +From 1de0086f610c09cb752c0ee6d382b9611b2f4e42 Mon Sep 17 00:00:00 2001 +From: Stephen Nogar +Date: Wed, 6 Jan 2021 15:40:45 -0500 +Subject: [PATCH] make harfbuzz and gtk optional + +--- + image_view/CMakeLists.txt | 16 ++++++++++++---- + 1 file changed, 12 insertions(+), 4 deletions(-) + +diff --git a/image_view/CMakeLists.txt b/image_view/CMakeLists.txt +index 747e0ab..14b4a8c 100644 +--- a/image_view/CMakeLists.txt ++++ b/image_view/CMakeLists.txt +@@ -39,11 +39,19 @@ if(ANDROID) + endif() + + find_package(PkgConfig REQUIRED) +-pkg_check_modules(GTK3 REQUIRED gtk+-3.0) +-include_directories(${GTK3_INCLUDE_DIRS}) ++pkg_check_modules(GTK3 gtk+-3.0) ++if(GTK3_FOUND) ++ include_directories(${GTK3_INCLUDE_DIRS}) ++else() ++ message(STATUS "GTK3 is not found. Some features are disabled.") ++endif() + +-pkg_check_modules(PC_HB REQUIRED harfbuzz) +-include_directories(${PC_HB_INCLUDE_DIRS}) ++pkg_check_modules(PC_HB harfbuzz) ++if(PC_HB_FOUND) ++ include_directories(${PC_HB_INCLUDE_DIRS}) ++else() ++ message(STATUS "harfbuzz is not found. Some features are disabled.") ++endif() + + # Nodelet library + add_library(image_view src/nodelets/image_nodelet.cpp src/nodelets/disparity_nodelet.cpp src/nodelets/window_thread.cpp) +-- +2.24.3 (Apple Git-128) + diff --git a/patches/rosbag_storage.diff b/patches/rosbag_storage.diff deleted file mode 100644 index afce435..0000000 --- a/patches/rosbag_storage.diff +++ /dev/null @@ -1,18 +0,0 @@ ---- CMakeLists.txt 2020-03-27 22:19:28.000000000 -0400 -+++ CMakeLists.txt 2020-03-27 22:21:34.000000000 -0400 -@@ -22,12 +22,13 @@ - # Support large bags (>2GB) on 32-bit systems - add_definitions(-D_FILE_OFFSET_BITS=64) - --include_directories(include ${catkin_INCLUDE_DIRS} ${console_bridge_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${BZIP2_INCLUDE_DIR}) -+include_directories(include ${catkin_INCLUDE_DIRS} ${console_bridge_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${BZIP2_INCLUDE_DIR} ${OpenSSL_INCLUDE_DIRS}) - add_definitions(${BZIP2_DEFINITIONS}) - - set(AES_ENCRYPT_SOURCE "") - set(AES_ENCRYPT_LIBRARIES "") --if(NOT WIN32) -+if(APPLE) -+elseif(NOT WIN32) - set(AES_ENCRYPT_SOURCE "src/aes_encryptor.cpp" "src/gpgme_utils.cpp") - find_library(GPGME_LIBRARY - NAMES "gpgme" diff --git a/patches/rosbag_storage.patch b/patches/rosbag_storage.patch new file mode 100644 index 0000000..b21c63f --- /dev/null +++ b/patches/rosbag_storage.patch @@ -0,0 +1,53 @@ +From 894a150c2e5e168d1244c3274f57829c41ace2d0 Mon Sep 17 00:00:00 2001 +From: Stephen Nogar +Date: Tue, 5 Jan 2021 17:12:31 -0500 +Subject: [PATCH] fix building encrypted bags on mac + +--- + tools/rosbag_storage/CMakeLists.txt | 20 ++++++++++++++------ + 1 file changed, 14 insertions(+), 6 deletions(-) + +diff --git a/tools/rosbag_storage/CMakeLists.txt b/tools/rosbag_storage/CMakeLists.txt +index 82532b91f..7545d8bd9 100644 +--- a/tools/rosbag_storage/CMakeLists.txt ++++ b/tools/rosbag_storage/CMakeLists.txt +@@ -22,22 +22,30 @@ catkin_package( + # Support large bags (>2GB) on 32-bit systems + add_definitions(-D_FILE_OFFSET_BITS=64) + +-include_directories(include ${catkin_INCLUDE_DIRS} ${console_bridge_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${BZIP2_INCLUDE_DIR}) +-add_definitions(${BZIP2_DEFINITIONS}) +- + set(AES_ENCRYPT_SOURCE "") + set(AES_ENCRYPT_LIBRARIES "") ++set(AES_ENCRYPT_INCLUDES "") + if(NOT WIN32) + set(AES_ENCRYPT_SOURCE "src/aes_encryptor.cpp" "src/gpgme_utils.cpp") + find_library(GPGME_LIBRARY + NAMES "gpgme" + PATHS /usr/local/lib) +- find_library(CRYPTO_LIBRARY +- NAMES "crypto" +- PATHS /usr/local/lib) ++ ++ if(APPLE) ++ find_package(OpenSSL REQUIRED) ++ set(CRYPTO_LIBRARY ${OPENSSL_CRYPTO_LIBRARY}) ++ set(AES_ENCRYPT_INCLUDES ${OPENSSL_INCLUDE_DIR}) ++ else() ++ find_library(CRYPTO_LIBRARY ++ NAMES "crypto" ++ PATHS /usr/local/lib) ++ endif() + set(AES_ENCRYPT_LIBRARIES ${GPGME_LIBRARY} ${CRYPTO_LIBRARY}) + endif() + ++include_directories(include ${catkin_INCLUDE_DIRS} ${console_bridge_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${BZIP2_INCLUDE_DIR} ${AES_ENCRYPT_INCLUDES}) ++add_definitions(${BZIP2_DEFINITIONS}) ++ + add_library(rosbag_storage + src/bag.cpp + src/bag_player.cpp +-- +2.24.3 (Apple Git-128) + diff --git a/patches/rosdep.patch b/patches/rosdep.patch new file mode 100644 index 0000000..f7cb0eb --- /dev/null +++ b/patches/rosdep.patch @@ -0,0 +1,29 @@ +From fd935ad0bc75fd0a9791033d719e01c9ac215109 Mon Sep 17 00:00:00 2001 +From: Stephen Nogar +Date: Tue, 5 Jan 2021 14:12:05 -0500 +Subject: [PATCH] fix brew list warning +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Fixes “Error: Calling `brew list` to only list formulae is disabled! Use `brew list --formula` instead.” warning +--- + src/rosdep2/platforms/osx.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/rosdep2/platforms/osx.py b/src/rosdep2/platforms/osx.py +index 13b0723..aadcb46 100644 +--- a/src/rosdep2/platforms/osx.py ++++ b/src/rosdep2/platforms/osx.py +@@ -184,7 +184,7 @@ def brew_detect(resolved, exec_fn=None): + """ + if exec_fn is None: + exec_fn = read_stdout +- std_out = exec_fn(['brew', 'list']) ++ std_out = exec_fn(['brew', 'list', '--formula']) + installed_formulae = std_out.split() + + def is_installed(r): +-- +2.24.3 (Apple Git-128) + diff --git a/patches/rospkg.patch b/patches/rospkg.patch new file mode 100644 index 0000000..bb7f4ed --- /dev/null +++ b/patches/rospkg.patch @@ -0,0 +1,62 @@ +From 24947cc053381396ae961d28412331512cb85355 Mon Sep 17 00:00:00 2001 +From: Stephen Nogar +Date: Mon, 4 Jan 2021 17:40:51 -0500 +Subject: [PATCH] fix for detecting big sur (and newer) versions of macOS + +--- + src/rospkg/os_detect.py | 35 ++++++++++++++++++++--------------- + 1 file changed, 20 insertions(+), 15 deletions(-) + +diff --git a/src/rospkg/os_detect.py b/src/rospkg/os_detect.py +index 0027baa..c6915d7 100644 +--- a/src/rospkg/os_detect.py ++++ b/src/rospkg/os_detect.py +@@ -343,25 +343,30 @@ class Rhel(Fedora): + + # Source: https://en.wikipedia.org/wiki/MacOS#Versions + _osx_codename_map = { +- 4: 'tiger', +- 5: 'leopard', +- 6: 'snow', +- 7: 'lion', +- 8: 'mountain lion', +- 9: 'mavericks', +- 10: 'yosemite', +- 11: 'el capitan', +- 12: 'sierra', +- 13: 'high sierra', +- 14: 'mojave', +- 15: 'catalina', ++ '10.4': 'tiger', ++ '10.5': 'leopard', ++ '10.6': 'snow', ++ '10.7': 'lion', ++ '10.8': 'mountain lion', ++ '10.9': 'mavericks', ++ '10.10': 'yosemite', ++ '10.11': 'el capitan', ++ '10.12': 'sierra', ++ '10.13': 'high sierra', ++ '10.14': 'mojave', ++ '10.15': 'catalina', ++ '11': 'big sur' + } + + + def _osx_codename(major, minor): +- if major != 10 or minor not in _osx_codename_map: +- raise OsNotDetected("unrecognized version: %s.%s" % (major, minor)) +- return _osx_codename_map[minor] ++ if major == 10: ++ key = '%s.%s' % (major, minor) ++ else: ++ key = '%s' % (major) ++ if key not in _osx_codename_map: ++ raise OsNotDetected("unrecognized version: %s" % key) ++ return _osx_codename_map[key] + + + class OSX(OsDetector): +-- +2.24.3 (Apple Git-128) + diff --git a/patches/rqt_launch.diff b/patches/rqt_launch.diff deleted file mode 100644 index 05a58dd..0000000 --- a/patches/rqt_launch.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- plugin.xml 2020-03-07 18:17:42.000000000 -0500 -+++ plugin.xml 2020-03-07 18:17:41.000000000 -0500 -@@ -6,7 +6,7 @@ - - - -- -+ - folder - Plugins related to configuration. - diff --git a/patches/rqt_reconfigure.diff b/patches/rqt_reconfigure.diff deleted file mode 100644 index 3b435e7..0000000 --- a/patches/rqt_reconfigure.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- plugin.xml 2020-02-29 16:52:44.000000000 -0500 -+++ plugin.xml 2020-02-29 16:52:42.000000000 -0500 -@@ -6,7 +6,7 @@ - - - -- -+ - folder - Plugins related to configuration. - diff --git a/patches/rviz.patch b/patches/rviz.patch new file mode 100644 index 0000000..fc3e385 --- /dev/null +++ b/patches/rviz.patch @@ -0,0 +1,63 @@ +From c2e255f0b477afd431cf4678b34916fdaf55690b Mon Sep 17 00:00:00 2001 +From: Stephen Nogar +Date: Wed, 6 Jan 2021 18:51:54 -0500 +Subject: [PATCH] fix build for mac + +remove screw/twist plugin, fix assimp link +--- + CMakeLists.txt | 23 +++++++++++++++++++---- + src/rviz/default_plugin/CMakeLists.txt | 4 ++-- + 2 files changed, 21 insertions(+), 6 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 674e1033..e66828f5 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -26,10 +26,25 @@ find_package(Boost REQUIRED + find_package(urdfdom_headers REQUIRED) + + set(CMAKE_POLICY_DEFAULT_CMP0012 NEW) # required due to a bug in assimp 5.0 +-find_package(ASSIMP REQUIRED) +-if(NOT DEFINED ASSIMP_LIBRARIES AND TARGET assimp::assimp) +- # ASSIMP >= 5.0 no longer defines ASSIMP_LIBRARIES +- set(ASSIMP_LIBRARIES assimp::assimp) ++find_package(ASSIMP QUIET) ++if (ASSIMP_FOUND) ++ if( NOT ${ASSIMP_VERSION} VERSION_LESS "2.0.1150" ) ++ add_definitions(-DASSIMP_UNIFIED_HEADER_NAMES) ++ message(STATUS "Assimp version has unified headers") ++ else() ++ message(STATUS "Assimp version does not have unified headers") ++ endif() ++ include_directories(${ASSIMP_INCLUDE_DIRS}) ++ #catkin_lint: ignore_once link_directory ++ link_directories(${ASSIMP_LIBRARY_DIRS}) ++else() ++ message(STATUS "could not find assimp (perhaps available thorugh ROS package?), so assimping assimp v2") ++ set(ASSIMP_LIBRARIES assimp) ++ set(ASSIMP_LIBRARY_DIRS) ++ set(ASSIMP_CXX_FLAGS) ++ set(ASSIMP_CFLAGS_OTHER) ++ set(ASSIMP_LINK_FLAGS) ++ set(ASSIMP_INCLUDE_DIRS) + endif() + + find_package(OGRE QUIET COMPONENTS Overlay) +diff --git a/src/rviz/default_plugin/CMakeLists.txt b/src/rviz/default_plugin/CMakeLists.txt +index 196c2521..41b13d0e 100644 +--- a/src/rviz/default_plugin/CMakeLists.txt ++++ b/src/rviz/default_plugin/CMakeLists.txt +@@ -47,8 +47,8 @@ set(SOURCE_FILES + range_display.cpp + relative_humidity_display.cpp + robot_model_display.cpp +- screw_display.cpp +- screw_visual.cpp ++# screw_display.cpp ++# screw_visual.cpp + temperature_display.cpp + tf_display.cpp + tools/focus_tool.cpp +-- +2.24.3 (Apple Git-128) + diff --git a/patches/smach_ros.patch b/patches/smach_ros.patch deleted file mode 100644 index 90bb308..0000000 --- a/patches/smach_ros.patch +++ /dev/null @@ -1,39 +0,0 @@ -From cc7eaf7a145430b8293cb66680cb9d45206dd6e7 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Marcus=20Mee=C3=9Fen?= -Date: Fri, 15 Mar 2019 14:11:37 +0100 -Subject: [PATCH] missing module name in smach_ros/__init__.py import - statements - ---- - smach_ros/src/smach_ros/__init__.py | 14 +++++++------- - 1 file changed, 7 insertions(+), 7 deletions(-) - -diff --git smach_ros/src/smach_ros/__init__.py smach_ros/src/smach_ros/__init__.py -index af249b2..688e9f0 100644 ---- smach_ros/src/smach_ros/__init__.py -+++ smach_ros/src/smach_ros/__init__.py -@@ -49,14 +49,14 @@ smach.set_loggers( - smach.set_shutdown_check(rospy.is_shutdown) - - ### Core classes --from util import set_preempt_handler -+from smach_ros.util import set_preempt_handler - - ### Top-level Containers / Wrappers --from action_server_wrapper import ActionServerWrapper --from introspection import IntrospectionClient, IntrospectionServer -+from smach_ros.action_server_wrapper import ActionServerWrapper -+from smach_ros.introspection import IntrospectionClient, IntrospectionServer - - ### State Classes --from simple_action_state import SimpleActionState --from service_state import ServiceState --from monitor_state import MonitorState --from condition_state import ConditionState -+from smach_ros.simple_action_state import SimpleActionState -+from smach_ros.service_state import ServiceState -+from smach_ros.monitor_state import MonitorState -+from smach_ros.condition_state import ConditionState --- -2.25.0 - diff --git a/patches/tf2.diff b/patches/tf2.diff deleted file mode 100644 index 49a2aee..0000000 --- a/patches/tf2.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- CMakeLists.txt 2018-11-16 18:47:39.000000000 -0500 -+++ CMakeLists.txt 2019-10-06 14:35:37.000000000 -0400 -@@ -3,7 +3,7 @@ - - find_package(console_bridge REQUIRED) - find_package(catkin REQUIRED COMPONENTS geometry_msgs rostime tf2_msgs) --find_package(Boost REQUIRED COMPONENTS signals system thread) -+find_package(Boost REQUIRED COMPONENTS system thread) - - catkin_package( - INCLUDE_DIRS include diff --git a/rosdeps.yaml b/rosdeps.yaml index 2bd6bc4..6dfa053 100644 --- a/rosdeps.yaml +++ b/rosdeps.yaml @@ -3,8 +3,12 @@ libogre-dev: osx: homebrew: packages: [ogre1.9] +libogre: + osx: + homebrew: + packages: [ogre1.9] -# Use Gazebo 8 instead of 7. +# Gazebo gazebo: osx: homebrew: @@ -17,7 +21,6 @@ libgazebo7-dev: osx: homebrew: packages: [gazebo8] - gazebo9: osx: homebrew: @@ -26,6 +29,14 @@ libgazebo9-dev: osx: homebrew: packages: [gazebo9] +gazebo11: + osx: + homebrew: + packages: [gazebo11] +libgazebo11-dev: + osx: + homebrew: + packages: [gazebo11] # Don't try to install opencv3 opencv3: @@ -52,28 +63,97 @@ joy: # means we get pre-built bottles and don't have to build it all # each time. -python: +python3: osx: homebrew: - packages: [python] + packages: [python3@3.8] pip: packages: [pip, setuptools, nose] -python-matplotlib: +python3-matplotlib: osx: pip: packages: [matplotlib] -python-numpy: +python3-numpy: osx: homebrew: packages: [numpy] -python-scipy: +python3-scipy: osx: homebrew: packages: [scipy] -python-wxtools: +python3-wxtools: osx: homebrew: packages: [wxmac] +python3-gnupg: + osx: + pip: + packages: [gnupg] +libgpgme-dev: + osx: + homebrew: + packages: [gpgme] +tango-icon-theme: + osx: + homebrew: + packages: [] +python3-empy: + osx: + pip: + packages: [empy] +python3-pykdl: + osx: + homebrew: + packages: [orocos-kdl] +python3-nose: + osx: + pip: + packages: [nose] +python3-paramiko: + osx: + pip: + packages: [paramiko] +python3-mock: + osx: + pip: + packages: [mock] +python3-coverage: + osx: + pip: + packages: [coverage] +python3-pydot: + osx: + pip: + packages: [pydot] +python3-defusedxml: + osx: + pip: + packages: [defusedxml] +python3-opengl: + osx: + pip: + packages: [] +python3-opencv: + osx: + homebrew: + packages: [opencv] +python3-cairo: + osx: + homebrew: + packages: [py3cairo] +python3-netifaces: + osx: + pip: + packages: [netifaces] +python3-catkin-pkg: + osx: + pip: + packages: [catkin-pkg] +python3-rosdep-modules: + osx: + pip: + packages: [] + # Zero out all the QT5 keys. We'll install it ourselves upfront. libqt5-opengl-dev: @@ -88,11 +168,11 @@ libqt5-core: osx: homebrew: packages: [] -python-qt5-bindings-gl: +python3-qt5-bindings-gl: osx: homebrew: packages: [] -python-qt5-bindings-webkit: +python3-qt5-bindings-webkit: osx: homebrew: packages: [] @@ -112,34 +192,55 @@ qt5-qmake: osx: homebrew: packages: [] -python-qt5-bindings: +python3-qt5-bindings: osx: homebrew: packages: [] -google-mock: + +# boost +libboost-thread-dev: osx: homebrew: - pacakges: [] -gtest: + packages: [boost] +libboost-regex-dev: osx: homebrew: - packages: [] - -python: + packages: [boost] +libboost-filesystem-dev: osx: homebrew: - packages: [python@2] - -python-gnupg: + packages: [boost] +libboost-system-dev: osx: - pip: - packages: [python-gnupg] + homebrew: + packages: [boost] +libboost-date-time-dev: + osx: + homebrew: + packages: [boost] +libboost-program-options-dev: + osx: + homebrew: + packages: [boost] +libboost-dev: + osx: + homebrew: + packages: [boost] +libboost-chrono-dev: + osx: + homebrew: + packages: [boost] -libgpgme-dev: +# misc +gtk3: osx: homebrew: - packages: [gpgme] -tango-icon-theme: + packages: [gtk+3] +google-mock: + osx: + homebrew: + pacakges: [] +gtest: osx: homebrew: packages: [] \ No newline at end of file diff --git a/shim/pip b/shim/pip deleted file mode 100755 index ad72626..0000000 --- a/shim/pip +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -# This wrapper allows rosdep to call pip and it actually be -# the pip2 that's part of brewed Python, rather than the missing -# system pip. -pip2 $@ -exit $? From f863adb12eb0153a954db7b38aa2068b123bb3b9 Mon Sep 17 00:00:00 2001 From: Steve Nogar Date: Thu, 28 Jan 2021 12:29:07 -0500 Subject: [PATCH 58/60] small fixes for packages and paths --- install | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/install b/install index 4943a29..0a14702 100755 --- a/install +++ b/install @@ -184,7 +184,7 @@ do_install() # Standard source install rosinstall_generator ${ROS_CONFIGURATION} ${ROS_EXTRA_PACKAGES} --rosdistro ${ROS_DISTRO} --deps --tar > ${WS}.rosinstall - vcs import src < ../${WS}.rosinstall + vcs import src < ${WS}.rosinstall rosdep install --from-paths src --ignore-src --rosdistro ${ROS_DISTRO} --as-root pip:false -y # custom built dependencies @@ -194,10 +194,11 @@ do_install() smnogar/ros-noetic/boost-python3@1.73 \ smnogar/ros-noetic/sip@4.19.24 \ smnogar/ros-noetic/pyqt@5.15.0 \ + smnogar/ros-noetic/opencv@4.5 \ smnogar/ros-noetic/tango-icon-theme brew unlink boost && brew link boost@1.73 brew unlink boost-python3 && brew link boost-python3@1.73 - brew unlink opencv && brew link opencv@4.2 + brew unlink opencv && brew link opencv@4.5 brew unlink sip && brew link sip@4.19.24 brew unlink pyqt && brew link pyqt@5.15.0 From a5e1d42603c2200a16da219e1a84dd6ce0043df4 Mon Sep 17 00:00:00 2001 From: Guilherme Schvarcz Franco Date: Fri, 26 Feb 2021 19:27:39 +0100 Subject: [PATCH 59/60] small fix: folder according the python version --- install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install b/install index 0a14702..b79803c 100755 --- a/install +++ b/install @@ -123,7 +123,7 @@ do_install() brew install python@3.8 brew link python@3.8 - mkdir -p ~/Library/Python/2.8/lib/python/site-packages + mkdir -p ~/Library/Python/3.8/lib/python/site-packages echo "$(brew --prefix)/lib/python3.8/site-packages" >> ~/Library/Python/3.8/lib/python/site-packages/homebrew.pth fi # export PATH="/usr/local/opt/python@3.8/bin:$PATH" From 35b345bb13aec9af48309fe89af6a935ef06f167 Mon Sep 17 00:00:00 2001 From: Guilherme Schvarcz Franco Date: Fri, 26 Feb 2021 19:30:10 +0100 Subject: [PATCH 60/60] update brew cask --- install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install b/install index 0a14702..844a036 100755 --- a/install +++ b/install @@ -42,7 +42,7 @@ do_install() # XQuartz if ! hash xquartz 2>/dev/null; then - brew cask install xquartz + brew install --cask xquartz echo "Log out and in to finalize XQuartz setup." exit 0 fi