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

ROS melodic updates #126

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
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
45 changes: 29 additions & 16 deletions install
Original file line number Diff line number Diff line change
Expand Up @@ -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:-lunar}
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}}
Expand Down Expand Up @@ -78,7 +78,7 @@ do_install()

# Brewed Python
if [ ! "$(which python2)" = "/usr/local/bin/python2" ]; then
brew install python
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
Expand Down Expand Up @@ -123,6 +123,11 @@ do_install()
fi
rosdep update

# set up the symlink for openssl
# based on https://stackoverflow.com/questions/45693149/openssl-aes-h-file-not-found-on-mac
cd /usr/local/include
ln -fs ../opt/openssl/include/openssl .

# Remove previous workspace if present, create and enter new one.
WS=${ROS_DISTRO}_${ROS_CONFIGURATION}_ws
if [ -d "$WS" ]; then
Expand All @@ -137,26 +142,32 @@ do_install()
pushd src
# Avoid downloading opencv3; we already installed it from homebrew.
wstool merge file://$(pwd)/../${WS}.rosinstall
wstool remove opencv3
#wstool remove opencv3
Copy link
Owner

Choose a reason for hiding this comment

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

Please remove this stuff altogether vs just commenting it out— as of Melodic, opencv is back to using the system-packaged version with not entry in the rosdistro.

wstool update -j8

# 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
if [ -d bond_core ]; then
curl curl https://raw.githubusercontent.com/ros/bond_core/1240bce50ca1538cdad07dc472d31797257e0851/bondcpp/src/bond.cpp > bond_core/bondcpp/src/bond.cpp
fi
Copy link
Owner

Choose a reason for hiding this comment

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

This double curl doesn't look quite right. Please fix that and put in a comment indicating what we're waiting on for the patch to go away (in this case, bond_core 1.8.3 to be released, since ros/bond_core#37 is already merged).

Copy link
Author

Choose a reason for hiding this comment

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

It's weird it works like that. Will fix it and add comments indicating the releases.


# 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
# https://github.com/ros-perception/vision_opencv/pull/225
if [ -d vision_opencv ]; then
curl https://raw.githubusercontent.com/meyerj/vision_opencv/9a9ad348abdfed010c70604cd964786f22220b30/cv_bridge/CMakeLists.txt > vision_opencv/cv_bridge/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
# https://github.com/ros-perception/image_common/pull/82
if [ -d image_common ]; then
curl https://raw.githubusercontent.com/meyerj/image_common/51be08ba5dc352597a2ad5baabb7e92c6baa2634/camera_calibration_parsers/CMakeLists.txt > image_common/camera_calibration_parsers/CMakeLists.txt
fi
Copy link
Owner

Choose a reason for hiding this comment

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

This change looks super-gross. Basically any ROS package which wants to link to Python is going to have to do this dance on macOS. I'm fine to go this route for now just to get things moving along, but I wonder if perhaps a more transparent way might be to prepend CMAKE_PREFIX_PATH within ros-install-osx and have a small suite of wrapper CMake modules that provide the necessary indirection.

Thoughts?

Copy link
Author

Choose a reason for hiding this comment

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

I noticed that my pull request links are wrong. @meyerj has a better idea on how to address this, which is independent of the OS.


# 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
if [ -d actionlib ]; then
curl https://raw.githubusercontent.com/ros/actionlib/e30896c84209dd9b605b91f34087aefc1de91d57/src/connection_monitor.cpp > actionlib/src/connection_monitor.cpp
curl https://raw.githubusercontent.com/ros/actionlib/e30896c84209dd9b605b91f34087aefc1de91d57/include/actionlib/destruction_guard.h > actionlib/include/actionlib/destruction_guard.h
curl https://raw.githubusercontent.com/ros/actionlib/e30896c84209dd9b605b91f34087aefc1de91d57/include/actionlib/server/simple_action_server_imp.h > actionlib/include/actionlib/server/simple_action_server_imp.h
curl https://raw.githubusercontent.com/ros/actionlib/e30896c84209dd9b605b91f34087aefc1de91d57/include/actionlib/client/simple_action_client.h > actionlib/include/actionlib/client/simple_action_client.h
fi

if [ -d laser_assembler ]; then
curl https://raw.githubusercontent.com/ros-perception/laser_assembler/5c504c05078a684746860efb9db433f73c896d32/test/test_assembler.cpp > laser_assembler/test/test_assembler.cpp
fi

# Package dependencies.
Expand All @@ -172,6 +183,7 @@ do_install()
sudo chown $USER ${ROS_INSTALL_DIR}
fi


# Parallel build.
catkin config --install \
--install-space ${ROS_INSTALL_DIR} \
Expand All @@ -181,7 +193,8 @@ 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 \
-DCMAKE_CXX_STANDARD=14
catkin build --limit-status-rate 1

echo "Installation successful, please source the ROS workspace:"
Expand Down
24 changes: 19 additions & 5 deletions rosdeps.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,32 @@ libogre-dev:
homebrew:
packages: [ogre1.9]

# Use Gazebo 8 instead of 7.
gazebo7:
# Use Gazebo 9.
gazebo9:
osx:
homebrew:
packages: [gazebo8]
libgazebo7-dev:
packages: [gazebo9]
libgazebo9-dev:
osx:
homebrew:
packages: [gazebo8]
packages: [gazebo9]

libgpgme-dev:
osx:
homebrew:
packages: [gpgme]
# Don't try to install opencv3
opencv3:
osx:
homebrew:
packages: []

# Don't try to install google-mock
google-mock:
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.
Expand All @@ -37,6 +47,10 @@ python-numpy:
osx:
homebrew:
packages: [numpy]
python-gnupg:
osx:
pip:
packages: [python-gnupg]
python-scipy:
osx:
homebrew:
Expand Down