ros-controls / ros2_control_demos

This repository aims at providing examples to illustrate ros2_control and ros2_controllers
https://control.ros.org
Apache License 2.0
412 stars 187 forks source link

Add guards for correct version of ros2_control #562

Closed christophfroehlich closed 2 months ago

christophfroehlich commented 2 months ago

We lately applied some breaking behavior changes of ros2_control to the demos (e.g., #502). The idea is now to check for the correct ros2_control version at compile-time

Starting >>> ros2_control_demo_example_1
--- stderr: ros2_control_demo_example_1                         
CMake Warning at CMakeLists.txt:20 (find_package):
  Could not find a configuration file for package "ros2_control" that is
  compatible with requested version "5.0.0".

  The following configuration files were considered but not accepted:

    /workspaces/ros2_rolling_ws/install/ros2_control/share/ros2_control/cmake/ros2_controlConfig.cmake, version: 4.13.0

CMake Error at CMakeLists.txt:23 (message):
  ros2_control version 5.0.0 or higher is required. Are you using the correct branch of the ros2_control_demos repository?