-
Notifications
You must be signed in to change notification settings - Fork 1
Collision with "drake" name for the ROS package #7
Comments
Name change is waiting to resolve #7 but this name change was required in order to make the examples to work when using the drake-extras.cmake. Signed-off-by: Jose Luis Rivero <[email protected]>
Running an example of the name conflict using a colcon workspace: https://github.com/RobotLocomotion/ros-drake-vendor/actions/runs/7711370534/job/21016603900 The
-- Found drake: 0.0.1 (/home/runner/work/ros-drake-vendor/ros-drake-vendor/ros_ws/install/share/drake/cmake)
-- Configuring done (1.1s)
CMake Error at src/CMakeLists.txt:4 (target_link_libraries):
Target "particle" links to:
drake::drake
but the target was not found. Possible reasons include:
* There is a typo in the target name.
* A find_package call is missing for an IMPORTED target.
* An ALIAS target is missing.
CMake Error at src/CMakeLists.txt:7 (target_link_libraries):
Target "particle_test" links to:
drake::drake
but the target was not found. Possible reasons include:
* There is a typo in the target name.
* A find_package call is missing for an IMPORTED target.
-- Generating done (0.0s)
* An ALIAS target is missing. |
Name change is waiting to resolve RobotLocomotion#7 but this name change was required in order to make the examples to work when using the drake-extras.cmake. Signed-off-by: Jose Luis Rivero <[email protected]>
Going a bit further into having the ROS package with name just "drake" (same than upstream package), we could try to add CMake code to the ROS package so it can act as a transparent wrapper on the upstream CMake. The idea would be that the Using a CONFIG_EXTRAS for injecting this code should be trivial. A quick pseudo-schema of where the files would be after build and installation:
Problem of drake_DIR cache variable For resolving this problem we can add an unset(drake_DIR)
find_package(drake PATHS "${drake_DIR}/../../../opt/drake") Problem of overriding
Problem is that setting that set(_extras "drake-extras.cmake;vendor_package_cmake_prefix.cmake")
foreach(_extra ${_extras})
include("${drake_DIR}/${_extra}")
endforeach() After the first include of drake-extras.cmake Fragile workaround: use GLOBAL_HOOK |
Signed-off-by: Jose Luis Rivero <[email protected]>
After the merge of #6 where this solution was implemented we can close this. |
The initial code submitted in #6 uses the name of "Drake" for the ROS package in this repository. While testing the installation I found that using the same "drake" name for the ROS package and the upstream code is going to generate conflicts when using CMake to resolve
find_package(drake)
since the ROS package is going to generate a cmake config file that has the exact name than the drake project:drake-config.cmake
. Although they won't conflict in the installation file path, the name conflict and resolution using CMake and the different configurations of precedence is going to be a problem.I just verified today with the OSRF infrastructure team that no other ROS "vendor-like" package is using the same name than original code that it ships and they have recommended to use
drake_vendor
orros_drake_vendor
.The text was updated successfully, but these errors were encountered: