ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Automated cross-compilation failing at rosdep install step

asked 2019-04-02 07:57:46 -0600

William Bulle gravatar image

updated 2019-04-02 10:29:01 -0600

gvdhoorn gravatar image

I am trying to cross-compile ros2 crystal core for Ubuntu 18.04 armv7, building on Ubuntu 16.04 x86_64:

See the end of my question for my custom files.

During the build of the contained docker, I have this failure while trying to do:

RUN rosdep init
RUN rosdep update
RUN rosdep install --from-paths src 
    --ignore-src \
    --rosdistro crystal -y \
    --skip-keys "console_bridge \
        fastcdr \
        fastrtps \
        libopensplice67 \
        libopensplice69 \
        rti-connext-dds-5.3.1 \
        urdfdom_headers"

as rosdep trying to download these (unwanted) dependencies:

  apt: command [apt-get install -y ros-crystal-tf2] failed
  apt: command [apt-get install -y ros-crystal-tf2-eigen] failed
  apt: command [apt-get install -y ros-crystal-tf2-geometry-msgs] failed
  apt: command [apt-get install -y ros-crystal-tf2-ros] failed
  apt: command [apt-get install -y ros-crystal-kdl-parser] failed
  apt: command [apt-get install -y ros-crystal-urdf] failed
  apt: command [apt-get install -y ros-crystal-robot-state-publisher] failed
  apt: command [apt-get install -y ros-crystal-demo-nodes-py] failed
  apt: command [apt-get install -y ros-crystal-angles] failed
  apt: command [apt-get install -y ros-crystal-depthimage-to-laserscan] failed
  apt: command [apt-get install -y ros-crystal-joy] failed
  apt: command [apt-get install -y ros-crystal-pcl-conversions] failed
  apt: command [apt-get install -y ros-crystal-rviz2] failed
  apt: command [apt-get install -y ros-crystal-rviz-default-plugins] failed
  apt: command [apt-get install -y ros-crystal-teleop-twist-joy] failed
  apt: command [apt-get install -y ros-crystal-teleop-twist-keyboard] failed
  apt: command [apt-get install -y ros-crystal-composition] failed
  apt: command [apt-get install -y ros-crystal-demo-nodes-cpp] failed
  apt: command [apt-get install -y ros-crystal-demo-nodes-cpp-native] failed
  apt: command [apt-get install -y ros-crystal-dummy-map-server] failed
  apt: command [apt-get install -y ros-crystal-dummy-robot-bringup] failed
  apt: command [apt-get install -y ros-crystal-dummy-sensors] failed
  apt: command [apt-get install -y ros-crystal-image-tools] failed
  apt: command [apt-get install -y ros-crystal-intra-process-demo] failed
  apt: command [apt-get install -y ros-crystal-lifecycle] failed
  apt: command [apt-get install -y ros-crystal-logging-demo] failed
  apt: command [apt-get install -y ros-crystal-pendulum-control] failed
  apt: command [apt-get install -y ros-crystal-topic-monitor] failed
  apt: command [apt-get install -y ros-crystal-tlsf] failed
  apt: command [apt-get install -y ros-crystal-tlsf-cpp] failed
  apt: command [apt-get install -y ros-crystal-examples-rclcpp-minimal-action-client] failed
  apt: command [apt-get install -y ros-crystal-examples-rclcpp-minimal-action-server] failed
  apt: command [apt-get install -y ros-crystal-examples-rclcpp-minimal-client] failed
  apt: command [apt-get install -y ros-crystal-examples-rclcpp-minimal-composition] failed
  apt: command [apt-get install -y ros-crystal-examples-rclcpp-minimal-publisher] failed
  apt: command [apt-get install -y ros-crystal-examples-rclcpp-minimal-service] failed
  apt: command [apt-get install -y ros-crystal-examples-rclcpp-minimal-subscriber] failed
  apt: command [apt-get install -y ros-crystal-examples-rclcpp-minimal-timer] failed
  apt: command [apt-get install -y ros-crystal-examples-rclpy-executors] failed
  apt: command [apt-get install -y ros-crystal-examples-rclpy-minimal-client] failed
  apt: command [apt-get install -y ros-crystal-examples-rclpy-minimal-publisher] failed
  apt: command [apt-get install -y ros-crystal-examples-rclpy-minimal-service] failed
  apt: command [apt-get install -y ros-crystal-examples-rclpy-minimal-subscriber] failed

Using the -r option seems to be a workaround but i would like to understand why rosdep is trying to find and install these dependencies, not necessary according to ROS REP 2001 ?

Contents of files:

ros2_core.install:

- git:
    local-name: ament/ament_cmake
    uri: https://github.com/ament/ament_cmake.git
    version: crystal
- git:
    local-name: ros2/ament_cmake_ros
    uri: https://github.com/ros2/ament_cmake_ros.git
    version: crystal
- git:
    local-name: ament/ament_index
    uri: https://github.com/ament/ament_index.git
    version: crystal
- git:
    local-name: ament/ament_lint
    uri: https://github.com/ament/ament_lint.git
    version: crystal
- git:
    local-name: ament/ament_package
    uri: https://github.com/ament/ament_package.git
    version: crystal
- git:
    local-name: ros/class_loader
    uri: https://github.com/ros/class_loader.git
    version: crystal
- git:
    local-name: ros2/common_interfaces
    uri: https://github ...
(more)
edit retag flag offensive close merge delete

Comments

Can you clarify whether you've seen ros2/cross_compile?


Edit: ah, I guess you did. Would appear the Dockerfiles are from there.

gvdhoorn gravatar image gvdhoorn  ( 2019-04-02 10:17:26 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2019-04-02 10:20:43 -0600

gvdhoorn gravatar image

updated 2019-04-02 11:43:35 -0600

You appear to have the variants repository in your .install file:

- git:
    local-name: variants
    uri: https://github.com/ros2/variants.git
    version: crystal

That repository contains package manifests for all ROS 2 variants (so: ros_base, ros_core and desktop). Those are probably pulling all those additional dependencies in.

I'm not sure, but I don't believe variants is part of any ROS 2 variant, so would you know how that entry got added to the list?


Edit:

I generated my .install with

rosinstall_generator ros_core --rosdistro crystal --upstream-development --deps > ros2_core.install

why do you add --upstream-development there? That will use the source repositories for all entries, instead of the release repositories. It will also cause complete checkouts of entire repositories instead of just one specific package.

That is most likely the cause of the variants entry there in your .rosinstall file.

With the following command:

rosinstall_generator --deps --tar --rosdistro=crystal ros_core

That specific entry becomes:

- tar:
    local-name: variants/ros_core
    uri: https://github.com/ros2-gbp/variants-release/archive/release/crystal/ros_core/0.6.1-0.tar.gz
    version: variants-release-release-crystal-ros_core-0.6.1-0

Which would cause the ros_core package to be placed in your workspace. That makes sense: you asked for ros_core and its dependencies.

By specifying --upstream-development, rosinstall_generator has no choice but to add an entry for the entire source repository containing ros_core (as that is the package you asked the .rosinstall file to be generated for), resulting in all metapackages defining ROS 2 variants to be placed in your workspace (as they are all hosted in the variants repository). This then results in rosdep trying to install dependencies for all those variants.

edit flag offensive delete link more

Comments

Oh it makes sense that rosdep tries to download the dependencies for ros_base and desktop. But ultimately it failed to apt-get install as they don't exist or it doesn't manage to locate them. How come ?

I generated my .install with

rosinstall_generator ros_core --rosdistro crystal --upstream-development --deps > ros2_core.install
William Bulle gravatar image William Bulle  ( 2019-04-02 11:09:09 -0600 )edit
1

I'm confused: you're ok with those additional dependencies?

gvdhoorn gravatar image gvdhoorn  ( 2019-04-02 11:28:09 -0600 )edit

I specified --upstream-development as I wanted to have some upstream package in order to use the -DFORCE_BUILD_VENDOR_PKG=ON as I want to minimize the number of dependencies on my target.

They seems to not be useful in what I'm trying to do but I wanted to know why it fails to locate the packages. My guess is they don't exist for armhf but in this case, rosdep would fail to resolve any ros dependencies in the case of my ros file install being incomplete.

William Bulle gravatar image William Bulle  ( 2019-04-02 12:12:48 -0600 )edit

should rosdep have a option to ignore all ros packages and just download built dependencies ?

ROS pkgs can be build dependencies as well, so such an option would need to discriminate between ROS pkgs and system dependencies in that case.

If you need only certain pkgs newer than the released version, perhaps those could be added manually to the file (you can always add an additional entry to the .rosinstall file by hand, it's a simple yaml list).

Can you perhaps restate/reformulate your question? Your initial question seemed to be:

i would like to understand why rosdep is trying to find and install these dependencies, not necessary according to ROS REP 2001 ?

The answer to that is: you're adding --upstream-development to rosinstall_generator and it downloads the entire variants repository, which contains manifests for all ROS 2 variants, hence the additional deps.

you're now asking "why it ...(more)

gvdhoorn gravatar image gvdhoorn  ( 2019-04-02 12:19:19 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2019-04-02 07:57:46 -0600

Seen: 399 times

Last updated: Apr 02 '19