You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm working with WT901 module using docker image of ROS2 Iron and witmotion_ros (ros2 branch). witmotion_ros package works fine but when I try to specify witmotion_ros package as a dependency of my custom package I get an CMake error:
root@dc29fda62103:/ros2_ws# colcon build --packages-select test_dep
Starting >>> test_dep
--- stderr: test_dep
CMake Error at /ros2_ws/install/witmotion_ros/share/witmotion_ros/cmake/ament_cmake_export_dependencies-extras.cmake:21 (find_package):
Found package configuration file:
/ros2_ws/install/witmotion_ros/share/witmotion_ros/cmake/witmotion_rosConfig.cmake
but it set witmotion_ros_FOUND to FALSE so package "witmotion_ros" is
considered to be NOT FOUND.
Call Stack (most recent call first):
/ros2_ws/install/witmotion_ros/share/witmotion_ros/cmake/witmotion_rosConfig.cmake:41 (include)
CMakeLists.txt:10 (find_package)
CMake Error at CMakeLists.txt:10 (find_package):
Found package configuration file:
/ros2_ws/install/witmotion_ros/share/witmotion_ros/cmake/witmotion_rosConfig.cmake
but it set witmotion_ros_FOUND to FALSE so package "witmotion_ros" is
considered to be NOT FOUND.
---
Failed <<< test_dep [3.56s, exited with code 1]
Summary: 0 packages finished [5.05s]
1 package failed: test_dep
1 package had stderr output: test_dep
How to reproduce:
Run Docker ROS2 Iron image
Create ROS2 workspace directory /ros2_ws and src directory:
Modify CMakeLists.txt so it can be built with ROS2 Iron (hardcoded humble and it can not find tf2_geometry_msgs)
# (otherwise there will be fatal error:
# tf2_geometry_msgs/tf2_geometry_msgs.hpp: No such file or directory)
sed -i -e 's/include_directories(\/opt\/ros\/humble\/include\/tf2_geometry_msgs)/include_directories(\/opt\/ros\/iron\/include\/tf2_geometry_msgs)/' \
/ros2_ws/src/witmotion_ros/CMakeLists.txt
and build it
colcon build --packages-select witmotion_ros
Create custom package "test_dep" using witmotion as dependency:
cd /ros2_ws/src && ros2 pkg create test_dep --dependencies witmotion_ros
Build test_dep package
cd /ros2_ws
colcon build --packages-select test_dep
The text was updated successfully, but these errors were encountered:
I resolved the find_package(witmotion_ros REQUIRED) error by making necessary modifications to the CMakeLists.txt. This approach successfully addressed the issue without needing to refer to the changes in PR #40.
I still can reproduce the issue, using both original repo and PR #40 alternately with steps described above (except modifying CMakeLists.txt in step 4, it fixed). Am I doing something wrong?
I'm working with WT901 module using docker image of ROS2 Iron and witmotion_ros (ros2 branch). witmotion_ros package works fine but when I try to specify witmotion_ros package as a dependency of my custom package I get an CMake error:
How to reproduce:
and build it
The text was updated successfully, but these errors were encountered: