Ask Your Question
0

[Crystal] rosdep cannot find all required resources

asked 2019-02-11 12:52:47 -0500

clyde gravatar image

updated 2019-02-11 18:58:38 -0500

I'm having trouble with rosdep check on 18.04 and Crystal. I've done this:

pip install -U rosdep
sudo rm /etc/ros/rosdep/sources.list.d/20-default.list
sudo rosdep init
rosdep update
cd ~/ros2/orca_ws
. /opt/ros/crystal/setup.bash
colcon build --event-handlers console_direct+
. install/setup.bash
rosdep check orca_base

The output of rosdep is:

ERROR: Rosdep cannot find all required resources to answer your query
Missing resource orca_base
ROS path [0]=/home/clyde/ros2/orca_ws/install/orca_topside/share

orca_topside is one of the packages in my workspace. But why doesn't rosdep know about all of them?

As a workaround, I set ROS_PACKAGE_PATH:

export ROS_PACKAGE_PATH=/home/clyde/ros2/orca_ws/install/orca_base/share
rosdep check orca_base

New output:

All system dependencies have been satisfied
ERROR[orca_base]: Cannot locate rosdep definition for [orca_msgs]
    rosdep key : orca_msgs
    OS name    : ubuntu
    OS version : bionic
    Data: <no data>

Do I need to manually maintain ROS_PACKAGE_PATH for my workspace?

Thanks.

Edit -- the results of colcon version-check

colcon-argcomplete 0.3.2: up-to-date
colcon-bash 0.3.1: up-to-date
colcon-cmake 0.2.7: newer version available (0.2.8)
colcon-core 0.3.17: up-to-date
colcon-defaults 0.2.1: up-to-date
colcon-devtools 0.2.1: up-to-date
colcon-library-path 0.2.1: up-to-date
colcon-metadata 0.2.1: up-to-date
colcon-notification 0.2.6: up-to-date
colcon-output 0.2.3: up-to-date
colcon-package-information 0.2.2: up-to-date
colcon-package-selection 0.2.3: up-to-date
colcon-parallel-executor 0.2.3: up-to-date
colcon-pkg-config 0.1.0: up-to-date
colcon-powershell 0.3.3: up-to-date
colcon-python-setup-py 0.2.1: up-to-date
colcon-recursive-crawl 0.2.0: up-to-date
colcon-ros 0.3.7: up-to-date
colcon-test-result 0.3.1: up-to-date
colcon-zsh 0.3.1: up-to-date
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2019-02-11 14:43:05 -0500

The ROS_PACKAGE_PATH needs to contain a list of the paths to all the packages. The way you're exporting a path to it you're not chaining onto the original value so you're losing all the other paths.

All of your exports need to have :$ROS_PACKAGE_PATH on the end of them so they are concatenated onto the original value as shown below:

export ROS_PACKAGE_PATH=/home/clyde/ros2/orca_ws/install/orca_base/share:$ROS_PACKAGE_PATH

If you create a new terminal and use this command it should hopefully fix things.

edit flag offensive delete link more

Comments

Sounds like I need to set & maintain ROS_PACKAGE_PATH by hand. Somehow I thought that Colcon would do this for me. Thanks for the answer.

clyde gravatar image clyde  ( 2019-02-11 18:04:41 -0500 )edit

Since ROS_PACKAGE_PATH is deprecated in favour of workspace chaining, colcon doesn't really do anything with it.

Geoff gravatar image Geoff  ( 2019-02-11 18:19:06 -0500 )edit

~~That is incorrect.~~ colcon-ros does extend the ROS_PACKAGE_PATH environment variable for you: https://github.com/colcon/colcon-ros/... Please check that you use the latest versions of all the colcon packages.

Dirk Thomas gravatar image Dirk Thomas  ( 2019-02-11 18:39:32 -0500 )edit

Today's new thing learned! (I did look through the colcon docs but didn't find anything; obviously I was looking in the wrong place.)

If it is not obsolete then that wiki page should be updated with how it is actually used and managed now.

Geoff gravatar image Geoff  ( 2019-02-11 18:50:15 -0500 )edit

I am sorry I missed the context of the question. The logic I referenced is only for ROS 1 / catkin packages. It would be good to open a ticket on rosdep for this.

Dirk Thomas gravatar image Dirk Thomas  ( 2019-02-11 19:04:40 -0500 )edit
clyde gravatar image clyde  ( 2019-02-11 19:26:00 -0500 )edit

I was referring to this repo: https://github.com/ros-infrastructure...

Dirk Thomas gravatar image Dirk Thomas  ( 2019-02-11 19:33:41 -0500 )edit

Ticket created: https://github.com/ros-infrastructure... . I will mark the question as "answered." Thanks, all.

clyde gravatar image clyde  ( 2019-02-12 18:24:43 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

3 followers

Stats

Asked: 2019-02-11 12:52:47 -0500

Seen: 1,667 times

Last updated: Feb 11 '19