Could not find configuration file provided by "opencv_calib3d" when building ros1_bridge (#10)

Posted by @destkk:

Operating System: Ubuntu 20.04
DDS Implementation CycloneDDS.

Hi there. I have tried building ros1_bridge based on the instructions but I am facing an issue (see issue below) after executing colcon build --packages-select ros1_bridge --cmake-force-configure.

I have git clone this repo into my ros1 workspace. And I want to bridge both ros1 and ros2 rmf msgs.

Steps to reproduce issue

Step 1: Git clone, colcon build ros2 workspace with RMF demos and RMF core rmf_demos/docs/installation.md at master · osrf/rmf_demos · GitHub

Step 2: mkdir catkin_ws and git clone GitHub - osrf/rmf_core_ros1_msgs and colcon build

Step 3: mkdir bridge_ws and git clone ros1_bridge GitHub - ros2/ros1_bridge: ROS 2 package that provides bidirectional communication between ROS 1 and ROS 2

This is my directory layout
.
├─ catkin_ws
│ └─ src
│ └─ rmf_core_ros1_msgs

├─ rmf_demos_ws
│ └─ src
│ └─ rmf_core
│ └─rmf_fleet_msgs

└─ bridge_ws
│ └─ src
│ └─ ros1_bridge

Step 4:

# Shell 1 (ROS 1)
. /opt/ros/noetic/setup.bash
# Or, on OSX, something like:
# . ~/catkin_ws/install_isolated/setup.bash
cd catkin_ws
catkin_make_isolated --install

Step 5:

# Shell 2 (ROS 2)
. /opt/ros/foxy/setup.bash
cd rmf_demos_ws
colcon build --packages-select rmf_fleet_msgs

Step 6:

# Shell 3 (ROS 1 and ROS 2)
. /opt/ros/noetic/setup.bash
. /opt/ros/foxy/setup.bash
. /catkin_ws/install_isolated/setup.bash
. /rmf_demos_ws/install/local_setup.bash
cd bridge_ws
colcon build --packages-select ros1_bridge

Note: Step 4 to 6 is followed by ros1_bridge installation guide: ros1_bridge/doc/index.rst at master · ros2/ros1_bridge · GitHub

Received the following error below,

Starting >>> ros1_bridge
--- stderr: ros1_bridge                         
CMake Error at /opt/ros/foxy/share/theora_image_transport/cmake/ament_cmake_export_dependencies-extras.cmake:21 (find_package):
  By not providing "Findopencv_calib3d.cmake" in CMAKE_MODULE_PATH this
  project has asked CMake to find a package configuration file provided by
  "opencv_calib3d", but CMake did not find one.

  Could not find a package configuration file provided by "opencv_calib3d"
  with any of the following names:

    opencv_calib3dConfig.cmake
    opencv_calib3d-config.cmake

  Add the installation prefix of "opencv_calib3d" to CMAKE_PREFIX_PATH or set
  "opencv_calib3d_DIR" to a directory containing one of the above files.  If
  "opencv_calib3d" provides a separate development package or SDK, be sure it
  has been installed.
Call Stack (most recent call first):
  /opt/ros/foxy/share/theora_image_transport/cmake/theora_image_transportConfig.cmake:41 (include)
  CMakeLists.txt:97 (find_package)


---
Failed   <<< ros1_bridge [2.92s, exited with code 1]

Summary: 0 packages finished [3.05s]
  1 package failed: ros1_bridge
  1 package had stderr output: ros1_bridge

Does anyone knows how to resolve this issue? I have checked ros1_bridge CMakeList and package.xml and it doesn’t contain opencv dependencies.


Edited by @destkk at 2021-03-23T05:24:32Z

Chosen answer

Answer chosen by @Yadunund at 2021-04-01T02:29:58Z.
Answered by @arjo129:

Hi @destkk, take a look at this issue: Failed to build from source: theora_image_transport unable to find opencv_calib3d dependency · Issue #276 · ros2/ros1_bridge · GitHub . As outlined in the thread, I recommend that you install image transport from source to satisfy the dependencies. This is not an RMF or ros1_bridge issue, but a problem with the theora image compression package.

Posted by @arjo129:

Hi @destkk, take a look at this issue: Failed to build from source: theora_image_transport unable to find opencv_calib3d dependency · Issue #276 · ros2/ros1_bridge · GitHub . As outlined in the thread, I recommend that you install image transport from source to satisfy the dependencies. This is not an RMF or ros1_bridge issue, but a problem with the theora image compression package.


Edited by @arjo129 at 2021-03-23T06:22:10Z


This is the chosen answer.