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

Move to ws folder for rosdep command, fixes #876 #878

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dave992
Copy link

@dave992 dave992 commented Aug 20, 2024

Executing the rosdep command from the root of the repository results in multiple packages found with the same name when run from the CI on GitLab. (See #876 for more information)

I have been unable to find the root cause for this, but this fix seems to circumvent the issue by restricting the folders rosdep can search in. I believe functionally this should behave the same.

Executing the rosdep command from the root of repository (!= workspace),
results in multiple packages found with the same name when run from the
CI on GitLab.

Unable to reproduce this from inside the same container as the CI runs,
but this fix seems to circumvent the issue by restricting the folders
rosdep can search in. Functionally this should behave the same.
@@ -373,7 +373,7 @@ function ici_install_dependencies {
rosdep_opts+=(--skip-keys "$skip_keys")
fi

ROS_PACKAGE_PATH="$cmake_prefix_path${ROS_PACKAGE_PATH:-}" ici_cmd ici_quiet ici_filter "(executing command)|(Setting up)" ici_exec_in_workspace "$extend" "." rosdep install "${rosdep_opts[@]}"
ROS_PACKAGE_PATH="$cmake_prefix_path${ROS_PACKAGE_PATH:-}" ici_cmd ici_quiet ici_filter "(executing command)|(Setting up)" ici_exec_in_workspace "$extend" "$@" rosdep install "${rosdep_opts[@]}"
Copy link
Member

Choose a reason for hiding this comment

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

This will only work, if only one argument is passed.

I am not sure, why this fixes the issue.
This just changes the execution directory and not the discovery of packages.

Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
ROS_PACKAGE_PATH="$cmake_prefix_path${ROS_PACKAGE_PATH:-}" ici_cmd ici_quiet ici_filter "(executing command)|(Setting up)" ici_exec_in_workspace "$extend" "$@" rosdep install "${rosdep_opts[@]}"
ROS_PACKAGE_PATH="$cmake_prefix_path${ROS_PACKAGE_PATH:-}" ici_cmd ici_quiet ici_filter "(executing command)|(Setting up)" ici_exec_in_workspace "$extend" "${1:-.}" rosdep install "${rosdep_opts[@]}"

Should do the trick.
I still have to figure out why rosdep behaves that way

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