Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save Tutorgaming/cc909ec7bab6888a528f0e6f62807b11 to your computer and use it in GitHub Desktop.
Save Tutorgaming/cc909ec7bab6888a528f0e6f62807b11 to your computer and use it in GitHub Desktop.

My attempt to install ROS Melodic on macOS Mojave (10.14) with https://github.com/mikepurvis/ros-install-osx

Dependencies

rosdeps.yaml

Use the file attached.

pycurl

Install it manually:

PYCURL_SSL_LIBRARY=openssl LDFLAGS="-L/usr/local/opt/openssl/lib" CPPFLAGS="-I/usr/local/opt/openssl/include" pip install --no-cache-dir pycurl

ROS packages

C++11 / C++14

Compile everything with:

catkin build -DCMAKE_CXX_STANDARD=14

## c++11 support for class_loader

Enable c++11 for the following packages:

  • pluginlib_tutorials
  • diagnostics_aggregator
  • nodelet
  • rosbag_storage

Add c++11 flag to CMakeLists.txt:

add_definitions(-std=c++11)

Boost Python

If you are using Boost 1.67, then the python component should be changed to python27, e.g.:

find_package(Boost REQUIRED COMPONENTS filesystem python27)

in the following packages:

  • cv_bridge
  • camera_calibration_parsers

rosbag_storage

OpenSSL

In the terminal:

export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/openssl/lib/pkgconfig"

Add the following to CMakeLists.txt:

find_package(PkgConfig REQUIRED)
pkg_check_modules(OpenSSL REQUIRED openssl)
pkg_check_modules(LibCrypto REQUIRED libcrypto)
find_package(Gpgmepp CONFIG REQUIRED)

# Add OpenSSL includes, modify the line
include_directories(include ${catkin_INCLUDE_DIRS} ${console_bridge_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${BZIP2_INCLUDE_DIR} ${OpenSSL_INCLUDE_DIRS})


link_directories(${LibCrypto_LIBRARY_DIRS})

Also change the line in if-block:

  set(AES_ENCRYPT_LIBRARIES "crypto" "gpgme")

to

  set(AES_ENCRYPT_LIBRARIES "crypto" "Gpgmepp")

rosbag and pcl_ros

OpenSSL

In the terminal:

export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/openssl/lib/pkgconfig"

In the CMakeLists.txt:

# Find OpenSSL
find_package(PkgConfig REQUIRED)
pkg_check_modules(OpenSSL REQUIRED openssl)

# Add it includes
include_directories(include ${catkin_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS}
  ${BZIP2_INCLUDE_DIR}
  ${OpenSSL_INCLUDE_DIRS}
)

diagnostics_aggregator

Replace local GTest copy with the system one.

In CMakeLists.txt:

find_package(GTest REQUIRED)
# Add corresponding includes
include_directories(include ${catkin_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${GTEST_INCLUDE_DIRS})

# Remove dependency to local gtest
add_executable(analyzer_loader test/analyzer_loader.cpp)

# Link libraries
target_link_libraries(analyzer_loader diagnostic_aggregator ${GTEST_BOTH_LIBRARIES})

actionlib and laser_assembler

No matching conversion from double to boost milliseconds

Happens with Boost 1.67, similar to ros/roscpp_core#79.

To fix, change the line in actionlib/src/connection_monitor.cpp:

boost::posix_time::milliseconds(time_left.toSec() * 1000.0f));

to

boost::posix_time::milliseconds(int(time_left.toSec() * 1000.0f)));

Similarly for laser_assembler/test/test_assembler.cpp:

Change

cloud_condition_.timed_wait(lock, boost::posix_time::milliseconds(1000.0f));

to

cloud_condition_.timed_wait(lock, boost::posix_time::milliseconds(1000));

image_view

Pango

In the CMakeLists.txt:

find_package(PkgConfig REQUIRED)
pkg_check_modules(Pango REQUIRED pango)

link_directories(${Pango_LIBRARY_DIRS})

#...

include_directories(
  #...
  ${Pango_INCLUDE_DIRS}
)

target_link_libraries(
  #...
  ${Pango_LIBRARIES}
)
# Override the default key to get us Ogre 1.9 instead of 1.7.
libogre-dev:
osx:
homebrew:
packages: [ogre1.9]
# Use Gazebo 9
gazebo9:
osx:
homebrew:
packages: [gazebo9]
libgazebo9-dev:
osx:
homebrew:
packages: [gazebo9]
#
# 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-matplotlib:
osx:
pip:
packages: [matplotlib]
python-numpy:
osx:
homebrew:
packages: [numpy]
python-scipy:
osx:
homebrew:
packages: [scipy]
python-wxtools:
osx:
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: []
python-gnupg:
osx:
pip:
packages: [gpg]
libgpgme-dev:
osx:
homebrew:
packages: [gpgme]
google-mock:
osx:
homebrew:
packages: [gtest]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment