Azure_Kinect_ROS_Driver
Azure_Kinect_ROS_Driver copied to clipboard
find_dependency(k4a) version format mismatch (contains 3, requested 2 components)
Running catkin_make to build Azure_Kinect_ROS_Driver results in the following CMake error:
Finding K4A SDK binaries
CMake Error at Azure_Kinect_ROS_Driver/cmake/Findk4a.cmake:22 (message):
Error: Azure Kinect SDK Version numbers contain exactly 3 components
(major.minor.rev). Requested number of components: 2
Call Stack (most recent call first):
/usr/local/share/cmake-3.18/Modules/CMakeFindDependencyMacro.cmake:47 (find_package)
/usr/lib/cmake/k4abt/k4abtConfig.cmake:3 (find_dependency)
Azure_Kinect_ROS_Driver/cmake/Findk4abt.cmake:35 (find_package)
Azure_Kinect_ROS_Driver/CMakeLists.txt:94 (find_package)
-- Configuring incomplete, errors occurred!
Looking into the file that seems to cause the problem cat /usr/lib/cmake/k4abt/k4abtConfig.cmake I see indeed only 2 components in the version number:
include(CMakeFindDependencyMacro)
find_dependency(k4a 1.3 REQUIRED)
# Add the targets file
include("${CMAKE_CURRENT_LIST_DIR}/k4abtTargets.cmake")
Changing this file manually to include 3 version number components:
find_dependency(k4a 1.3.0 REQUIRED)
fixes the problem and Azure_Kinect_ROS_Driver can be built successfully with catkin_make.
To Reproduce
- Install
k4a-toolspackage:sudo apt install k4a-tools=1.3.0 - Install Azure Kinect SDK:
sudo apt install libk4a1.3-dev - Install Azure Kinect Body Tracking SDK:
sudo apt install libk4abt1.0-dev - Prevent
k4a-toolsfrom updating with system update:sudo apt-mark hold k4a-tools - Get Azure Kinect ROS Driver:
git clone [email protected]:microsoft/Azure_Kinect_ROS_Driver.git catkin_ws/src - Go to catking workspace:
cd catkin_ws - Try to build:
catkin_make
Expected behavior
catkin_make allows to successfully build Azure_Kinect_ROS_Driver without the necessity to manually change /usr/lib/cmake/k4abt/k4abtConfig.cmake
Desktop:
I haven't experienced this issue with CMake, but I was facing issues with k4a-tools having a conflicting version with the libraries needed for this ROS driver, which is addressed in your reproduction steps.
Rather than downgrading k4a-tools and preventing its update with apt, I've found that I you can get by without using k4a-tools at all (at least in my use case). So just installing the Kinect Body Tracking SDK with sudo apt install libk4abt1.0-dev installs the correct libraries for use with this ROS wrapper. So steps 1 and 4 in your reproduction list could be eliminated.
That helps a lot! Thanks.
After having spent hours trying to understand what the problem could be, finally I've found this solution and solved it immediately. Thanks a lot!!
Good job, I have the same problem, that helps a lot!!!! Thank you .