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

Updates for Mojave and Catalina #141

Open
wants to merge 60 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 44 commits
Commits
Show all changes
60 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
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
*_ws
.DS_Store
193 changes: 163 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,24 +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 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 Oct 6, 2019 on Catalina GM**

Required software versions (installed via script):

* **boost**: 1.69
* **opencv3**
* **python2**
* **sip**: 4.19.8_12 - Required for python2 support
* **pyqt**: 5.10.1_1 - Required for python 2 support
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How realistic would it be to have Python 3 as the default now? We're using it for most of the base system at CPR, so I'd expect it to mostly work.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure. Isn't ROS planning on officially adopting it as of ROS "noetic" which isn't ready yet? I'll play around with it in a couple months before python 2 support officially gets dropped.


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

```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
xcode-select --install
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.
Expand All @@ -36,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
Expand Down Expand Up @@ -89,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.
Expand Down Expand Up @@ -128,3 +146,118 @@ 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

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

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


Loading