open-rmf / rmf_traffic

Traffic management libraries for RMF
Apache License 2.0
28 stars 26 forks source link

Pure CMake package does not seemed to be discovered in the rosdep install #59

Closed Briancbn closed 2 years ago

Briancbn commented 2 years ago

Bug report

This is a series of issues wrt all the pure CMake packages in RMF.

After compiling all these repositories from source in workspace A and sourcing the workspace. The following behavior could be observed

  1. Package path exists in CMAKE_PREFIX_PATH

    echo $CMAKE_PREFIX_PATH | sed "s/:/\n/g" | grep rmf_utils

    And during CMake, the package can be autodiscovered through find_package.

  2. Package path doesn't exists in AMENT_PREFIX_PATH

    echo $AMENT_PREFIX_PATH | sed "s/:/\n/g" | grep rmf_utils
  3. Packages cannot be discovered by ros2pkg

    ros2 pkg list | grep rmf_utils
  4. When running rosdep in a new workspace with workspace A sourced, an older binary release version will installed.

    After creating a new workspace, which contains a package that depends on the aforementioned packages, (e.g. rmf_ros2 in a new workspace), and run the following command,

    source <path-to-workspace-A>/install//setup.bash
    rosdep install -q --from-paths src --ignore-src -y | grep -E '(executing command)|(Setting up)'

    The correct behavior is no output, since all the required dependencies are built in workspace A and sourced. However, an old version of the following repositories will be installed instead through apt

    executing command [apt-get install -y -qq ros-foxy-rmf-utils]
    Setting up ros-foxy-rmf-utils (1.3.0-1focal.20210909.172550) ...
    executing command [apt-get install -y -qq ros-foxy-rmf-traffic]
    Setting up ros-foxy-rmf-traffic (1.4.0-1focal.20210910.053721) ...
    executing command [apt-get install -y -qq ros-foxy-rmf-battery]
    Setting up ros-foxy-rmf-battery (0.1.1-1focal.20210910.165827) ...
    executing command [apt-get install -y -qq ros-foxy-rmf-task]
    Setting up ros-foxy-rmf-task (1.0.0-1focal.20210913.061628) ...

    Regarding potential solution, I think prepending the package path to AMENT_PREFIX_PATH may help. See discussion https://github.com/ros-industrial/industrial_ci/issues/475 and https://github.com/ros-infrastructure/rosdep/issues/724#issuecomment-641037499.

This is mainly breaking our CI and making setup instructions of our bootstrap development environment difficult due to the issue of rosdep. Otherwise, if everything is in the same workspace, this should not cause any problems.

Required information:

mxgrey commented 2 years ago

Thanks for the contributions! All relevant PRs are merged now.

Briancbn commented 2 years ago

@mxgrey Similar issue in task sequence;(