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

Add support for orocos/ros (ROS 1) - tested melodic #1

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

spd-intermodalics
Copy link

@spd-intermodalics spd-intermodalics commented Jul 2, 2020

Description

This PR adds support for Orocos/ROS 1.
A docker image can be generated that contains ROS 1 + Orocos pre-installed.

Tested

This PR has being tested for:

  • ROS base distro: melodic
  • Orocos toolchain: toolchain-2.9

ToDo

The image still lacks support for the following packages:

  • rtt_tf
  • rtt_rosdeployment

* Not fully featured, missing packages:
- rtt_tf
- rtt_kdl_conversions
- rtt_tf2_msgs
- rtt_rosdeployment
This patch adds support for tf/tf2 excluding tf_confersions and rtt_tf
Added the package tf_conversions
This patch adds a hook to make a custom build command for
DockerHub
FROM deps AS build
ARG OROCOS_TOOLCHAIN_BRANCH
RUN git clone --recursive https://github.com/orocos-toolchain/orocos_toolchain.git -b ${OROCOS_TOOLCHAIN_BRANCH} /build/orocos_ws/src/orocos_toolchain \
&& git clone --recursive https://github.com/orocos/orocos_kinematics_dynamics.git -b v1.4.0 /build/orocos_ws/src/orocos_kinematics_dynamics
Copy link
Member

Choose a reason for hiding this comment

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

Nope. KDL is already preinstalled in /opt/ros/${ROS_DISTRO} and many packages depend on it. Installing a newer version from source on top will cause problems, although all 1.4 versions should be ABI-compatible.

For released packages, we should just install the debians. Building orocos_toolchain from source is a temporary solution only.

Copy link
Author

@spd-intermodalics spd-intermodalics Jul 23, 2020

Choose a reason for hiding this comment

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

If I am calling . /opt/ros/${ROS_DISTRO}/setup.sh and I still get geometry/eigen_conversions complaining for not finding orocos_kdl, does not that mean that KDL is not preinstalled in /opt/ros/${ROS_DISTRO} ?

CMake Error at geometry/eigen_conversions/CMakeLists.txt:4 (find_package):
  By not providing "Findorocos_kdl.cmake" in CMAKE_MODULE_PATH this project
  has asked CMake to find a package configuration file provided by
  "orocos_kdl", but CMake did not find one.

  Could not find a package configuration file provided by "orocos_kdl" with
  any of the following names:

    orocos_kdlConfig.cmake
    orocos_kdl-config.cmake

  Add the installation prefix of "orocos_kdl" to CMAKE_PREFIX_PATH or set
  "orocos_kdl_DIR" to a directory containing one of the above files.  If
  "orocos_kdl" provides a separate development package or SDK, be sure it has
  been installed.

So I opted then to add: ros-${ROS_DISTRO}-orocos-kdl to the list of apt-get install.

Comment on lines +45 to +47
&& git clone --recursive https://github.com/ros/geometry2.git -b ${ROS_DISTRO}-devel /build/orocos_underlay_ws/src/geometry2 \
&& git clone --recursive https://github.com/ros/geometry.git -b ${ROS_DISTRO}-devel /build/orocos_underlay_ws/src/geometry \
&& git clone --recursive https://github.com/ros/angles.git -b master /build/orocos_underlay_ws/src/angles
Copy link
Member

Choose a reason for hiding this comment

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

Same here: Please do not install development-versions of some packages to /opt/ros/${ROS_DISTRO} where Debians are available.

Dependencies must be be installed with apt-get and/or rosdep or there will be conflicts sooner or later.

-DCMAKE_FIND_ROOT_PATH=/stage \
-DCATKIN_DEVEL_PREFIX=/build/orocos_underlay_ws/devel \
-DCMAKE_INSTALL_PREFIX=/opt/ros/${ROS_DISTRO} \
-DCATKIN_BLACKLIST_PACKAGES="rtt_tf;rtt_rosdeployment" \
Copy link
Member

Choose a reason for hiding this comment

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

Why?

@spd-intermodalics
Copy link
Author

@meyerj we have at the moment an alternative for this, right? Because this image exist in: https://hub.docker.com/r/orocos/ros/tags (dated 24th July 2020)

I cannot remember if it was produced with this patch or something else.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants