ros2 / ros1_bridge

ROS 2 package that provides bidirectional communication between ROS 1 and ROS 2
Apache License 2.0
425 stars 275 forks source link

Suppress warning when packages aren't available #355

Closed mjcarroll closed 2 years ago

mjcarroll commented 2 years ago

ROS1 packages aren't available on all platforms. In order to keep ros1_bridge in ros2.repos without warnings turning CI yellow, we need to suppress this warning.

This is an alternative to https://github.com/ros2/ros2/pull/1256

This will require packing CI jobs to be updated with a new cmake arg -DROS1_PACKAGES_UNAVAILABLE=true for Jammy jobs.

$ colcon build --packages-select ros1_bridge
Starting >>> ros1_bridge
--- stderr: ros1_bridge                           
CMake Warning at CMakeLists.txt:36 (message):
  Failed to find ROS 1 roscpp, skipping...

---
Finished <<< ros1_bridge [2.30s]

vs

colcon build --packages-select ros1_bridge --cmake-args -DROS1_PACKAGES_UNAVAILABLE=1
Starting >>> ros1_bridge
Finished <<< ros1_bridge [2.36s]                  

Summary: 1 package finished [3.37s]

Signed-off-by: Michael Carroll michael@openrobotics.org