SuperDiodo / ur_ros_rtde

ROS2 Interface for Universal Robot CoBots Control with ur_rtde (Python, C++)
BSD 3-Clause "New" or "Revised" License
8 stars 2 forks source link

ur_ros_rtde/ur_ros_rtde/package.xml missing package dependencies #1

Closed nrsprs closed 1 month ago

nrsprs commented 1 month ago

System: Ubuntu 22.04 ros iron x86 platform ur_ros_rtde version: ea8feb8

Issue:

When trying to build ur_ros_rtde using colcon, colcon would throw an exception for:

By not providing "Findur_ros_rtde_msgs.cmake" in CMAKE_MODULE_PATH this
  project has asked CMake to find a package configuration file provided by
  "ur_ros_rtde_msgs", but CMake did not find one.
  Could not find a package configuration file provided by "ur_ros_rtde_msgs"
  with any of the following names:
    ur_ros_rtde_msgsConfig.cmake
    ur_ros_rtde_msgs-config.cmake

After successfully building ur_ros_rtde_msgs & ur_ros_rtde_simple_clients.

Validating ur_ros_rtde messages:

lab@rosie:~/workspace/ur_ros_rtde$ colcon list | grep ur_ros_rtde_msgs
ur_ros_rtde_msgs        ur_ros_rtde_msgs        (ros.ament_cmake)

Exported msgs to cmake path:

lab@rosie:~/workspace/ur_ros_rtde/install/ur_ros_rtde_msgs/share/ur_ros_rtde_msgs/cmake$ export CMAKE_PREFIX_PATH=~/workspace/ur_ros_rtde/install/ur_ros_rtde_msgs:$CMAKE_PREFIX_PATH

Re-ran and received new errors for ur_ros_rtde_simple_clientsConfig:

CMake Error at CMakeLists.txt:22 (find_package):
  By not providing "Findur_ros_rtde_simple_clients.cmake" in
  CMAKE_MODULE_PATH this project has asked CMake to find a package
  configuration file provided by "ur_ros_rtde_simple_clients", but CMake did
  not find one.
  Could not find a package configuration file provided by
  "ur_ros_rtde_simple_clients" with any of the following names:
    ur_ros_rtde_simple_clientsConfig.cmake
    ur_ros_rtde_simple_clients-config.cmake

Added it to path as well:

lab@rosie:~/workspace/ur_ros_rtde$ export CMAKE_PREFIX_PATH=install/ur_ros_rtde_simple_clients:$CMAKE_PREFIX_P
ATH

Failed with same error, again. I added the dependencies for ur_ros_rtde_msgs & ur_ros_rtde_simple_clients to ur_ros_rtde/ur_ros_rtde/package.xml:

<depend>ur_ros_rtde_msgs</depend>
<depend>ur_ros_rtde_simple_clients</depend>

This fixed the issue, allowed me to run the provided colcon build instructions and it builds as-intended.

SuperDiodo commented 1 month ago

Hi, thanks for the feedback.

Sometimes it is necessary to open a new terminal to compile some packages, but as you suggested the <depend> tags should avoid this problem.

I will update it asap.