Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for macOS Big Sur and ROS Noetic #148

Open
wants to merge 66 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
d8c9637
changes to rosdep
Sep 22, 2017
79d3352
Change to rosdeps
Sep 22, 2017
cfd76f3
rosdep
Sep 22, 2017
4523980
rosdep
Sep 23, 2017
11d914b
Updated script to support gazebo8 and ogre1.9
Sep 25, 2017
aed915b
Small changes to install script, rosdeps
smnogar Sep 25, 2017
d9c987f
default matplotlib back to pip
smnogar Sep 26, 2017
768eb8d
updates for high sierra
Sep 28, 2017
d35cab3
change gazebo8 install
Sep 30, 2017
d314b8d
changed gazebo8 to default install
Oct 23, 2017
216d235
changes to gazebo8 install
Dec 2, 2017
e11df24
Updated
Dec 17, 2017
de20a7d
Merge branch 'high-sierra' of https://gitlab.sitcore.net/snogar/ros-i…
Dec 17, 2017
9872b29
More changes
Dec 17, 2017
6ac15ec
Moved to upstream geometry2
Dec 17, 2017
965650b
changed rosdeps
Dec 19, 2017
d065c79
addex wxtools to rosdeps
Dec 19, 2017
3434562
change to rosdep again
Dec 19, 2017
e1f983f
more rosdep
Dec 19, 2017
970c1e8
it finally worked
Dec 20, 2017
ada6ee9
Updated based on newest mikepurvis
Dec 20, 2017
1b79390
Merge remote-tracking branch 'origin-mikepurvis/master' into high-sierra
Dec 20, 2017
e6952b0
updated readme
Dec 20, 2017
2a5be10
more updates to readme
Dec 20, 2017
83d336c
Found fix for gazebo not working right
Dec 22, 2017
71052f9
Fixed link to correct version
Dec 22, 2017
50758e3
added custom rosdeps
Jan 3, 2018
c327cac
Added entry to ignore linux joystick drivers
Jan 4, 2018
b10f506
fixes for boost 1.67 and rosconsole
Jul 12, 2018
239c7cb
fix custom build dir
Jul 12, 2018
8d08ebe
update for melodic as default
Sep 16, 2018
fa7e6e1
fixes for kinetic and gazebo9 for melodic
Oct 8, 2018
47812d2
move some options from kinetic to melodic install
Oct 15, 2018
82f60bf
melodic updates
smnogar Oct 24, 2018
4ecfa0d
updates for mojave support
smnogar Dec 31, 2018
17fb015
changes to work in catalina
Oct 7, 2019
67a26e8
Update README.md
smnogar Oct 7, 2019
dc2bd3b
fixes to improve chances it builds on first run
Oct 8, 2019
450a711
reduce chance that brew causes script failure
smnogar Oct 8, 2019
2bccf24
fallback to boost 1.69 to support mavros
smnogar Oct 8, 2019
2e0fddc
Update README.md
smnogar Oct 8, 2019
24e74b4
Use newest gazebo9
Oct 14, 2019
25053f0
clean up comments
smnogar Oct 14, 2019
5b9ea97
Update README.md
smnogar Oct 14, 2019
8f029fc
pcl and rospy fix. Use newest gazebo9
smnogar Oct 21, 2019
0e4ae24
Merge branch 'catalina' of https://github.com/smnogar/ros-install-osx…
smnogar Oct 21, 2019
3c5f99a
fix patch command
smnogar Oct 21, 2019
a355545
force link and verbose
ahoarau Nov 15, 2019
ca988a0
Merge pull request #1 from ahoarau/patch-1
smnogar Nov 18, 2019
4c9f1bd
add specific version of qt
smnogar Dec 25, 2019
a2617bf
a couple of patches for ros_controllers
smnogar Feb 24, 2020
f3bba72
update to python3, add tango icons
Mar 1, 2020
c58e748
fix typo
smnogar Mar 7, 2020
4a206c4
fix rqt launch path
Mar 9, 2020
9d94f6f
add rqt launch path
Mar 9, 2020
69c7951
back to python2
Mar 12, 2020
b4082e1
Update README.md
smnogar Mar 12, 2020
8b42312
more fixes…
smnogar Mar 28, 2020
5f83dc1
latest changes
smnogar Apr 30, 2020
2bf4f16
small fix for numpy install and diagnostic_aggregator
smnogar Jun 4, 2020
29bd39c
updates for noetic and macos big sur
smnogar Jan 22, 2021
f863adb
small fixes for packages and paths
smnogar Jan 28, 2021
a5e1d42
small fix: folder according the python version
schvarcz Feb 26, 2021
35b345b
update brew cask
schvarcz Feb 26, 2021
f4495a3
Merge pull request #2 from schvarcz/fix-brew-cask
smnogar Feb 27, 2021
265a7d3
Merge pull request #3 from schvarcz/fix-python-version
smnogar Feb 27, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
*_ws
.DS_Store
/tango-icon-theme-0.8.90
/tango-icon-theme-0.8.90.tar.gz
216 changes: 186 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,67 @@
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), 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 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 is the successor to my [popular gist on the same topic][1].
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.

[1]: https://gist.github.com/mikepurvis/9837958
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).

## Current Status

**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.73
* **Opencv**: 4.5
* **Python**: 3.8

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](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
```

3. Attempting to clone this repo onto your machine should trigger the xcode command line tools to download.

```bash
xcode-select --install
git clone https://github.com/smnogar/ros-install-osx.git
cd ros-install-osx
```

4. Install brew

```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
```

5. Install xquartz

```bash
brew cask install xquartz
```

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.
Expand All @@ -36,23 +79,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
Expand Down Expand Up @@ -89,7 +115,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.
Expand Down Expand Up @@ -128,3 +154,133 @@ have [System Integrity Protection](https://support.apple.com/en-us/HT204899) ena
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.

* 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

* 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`

* [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

* [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" `

* Python Crypto errors

* ```
pip uninstall Crypto
pip uninstall pycrypto
pip install pycrypto
```

* If having issues with packages not finding terminal_color, you need to up catkin_pkg_modules

```bash
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
```


6 changes: 6 additions & 0 deletions bash_profile_recommendations.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

# recommended bash_profile lines for ROS
export PYTHONPATH=/usr/local/lib/python3.8/site-packages
export PYTHONWARNINGS=ignore::yaml.YAMLLoadWarning
export ROS_PYTHON_VERSION=3
export PATH="/usr/local/opt/python3.8/libexec/bin:$PATH"
Loading