0
$\begingroup$

I'm trying to add gesture recognition capabilities in my ros2 humble C++ package, and I started out with trying to use the TensorFlow C++ API. However, I am unable to install TensorFlow for my ROS2 package.

I have tried this link: https://github.com/ika-rwth-aachen/tensorflow_cpp/tree/fix/cmake

However, following the instructions gives me the following error when trying to build:

CMake Error at CMakeLists.txt:11 (find_package):
   By not providing "FindTensorFlow.cmake" in CMAKE_MODULE_PATH this project
   has asked CMake to find a package configuration file provided by
   "TensorFlow", but CMake did not find one.

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

     TensorFlowConfig.cmake
     tensorflow-config.cmake

   Add the installation prefix of "TensorFlow" to CMAKE_PREFIX_PATH or set
   "TensorFlow_DIR" to a directory containing one of the above files.  If
   "TensorFlow" provides a separate development package or SDK, be sure it has
   been installed.

Any other links that would be helpful? Or even other approaches to gesture recognition?

Would appreciate your help.

Thanks.

$\endgroup$

1 Answer 1

0
$\begingroup$

CMake produces this error when it is trying to find a required resource (in this case, TensorFlow) but can't.

  • Do you have TensorFlow installed? If not, follow the installation instructions.
  • Do you have TensorFlow on your LD_LIBRARY_PATH? This environment variable is used by CMake to find available libraries, so if it isn't, you'll want to add it.
$\endgroup$
2
  • $\begingroup$ Ok. But would installing through pip, as is written in the TensorFlow instructions work for me? $\endgroup$
    – KK29
    Commented Sep 10, 2023 at 21:41
  • 2
    $\begingroup$ You are using C/C++, so you should follow the C/C++ instructions: tensorflow.org/install/lang_c $\endgroup$
    – cst0
    Commented Sep 11, 2023 at 13:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.