I run in the following error during the install_target_dependencies step when running the CI:
$ ( source /builds/ros_meta_pkg/workspaces/upstream_ws/install/setup.bash && rosdep install --from-paths /builds/ros_meta_pkg/workspaces/target_ws --ignore-src -y | grep -E '(executing command)|(Setting up)' ; )
ERROR: Rosdep experienced an error: Multiple packages found with the same name "ros_pkg_1":
- ros_pkg_1
- workspaces/target_ws/src/ros_meta_pkg/ros_pkg_1
Multiple packages found with the same name "ros_pkg_2":
- ros_pkg_2
- workspaces/target_ws/src/ros_meta_pkg/ros_pkg_2
I only run into this error when I set $BASEDIR inside of $CI_PROJECT_DIR. Using $BASEDIR: /workspaces does not result in this error.
Interestingly enough, if I manually log into the container created by the CI job (by keeping it alive after the failure) and run the same command and from the same directory, I do not get any errors.
I run in the following error during the
install_target_dependencies
step when running the CI:CI Configuration
The GitLab CI settings I use:
I took this config from #627
Observations
I only run into this error when I set
$BASEDIR
inside of$CI_PROJECT_DIR
. Using$BASEDIR: /workspaces
does not result in this error.Interestingly enough, if I manually log into the container created by the CI job (by keeping it alive after the failure) and run the same command and from the same directory, I do not get any errors.
The command:
The only way to replicate the same error is to run:
or
I do not understand why this behaves like this. Even printing the
$ROS_PACKAGE_PATH
shows no unexpected folders.Folder structure
The folder structure looks like this:
Commands get executed from the
ros_meta_pkg
folder.Possible solution
If I run the rosdep command from the
target_ws
I no longer run into any issues.Looking at the source code this can be achieved by removing the
/src
from the following line. This step can probably be skipped. https://github.com/ros-industrial/industrial_ci/blob/d23b9ad2c63bfad638a2b1fe3df34b8df9a2f17b/industrial_ci/src/workspace.sh#L396And replacing
ici_exec_in_workspace "$extend" "."
withici_exec_in_workspace "$extend" "$@"
so the command switches to thetarget_ws
folder before executing therosdep
command https://github.com/ros-industrial/industrial_ci/blob/d23b9ad2c63bfad638a2b1fe3df34b8df9a2f17b/industrial_ci/src/workspace.sh#L376