ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

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

asked 2020-02-25 21:38:19 -0600

AHJL001 gravatar image

I have downloaded the tf2 package recently and I am hoping to process the packages for my turtlebot 3 burger.

The error messages are:

Could not find the required component 'tf2'. The following CMake error indicates that you either need to install the package with the same name or change your environment so that it can be found.
CMake Error at /opt/ros/kinetic/share/catkin/cmake/catkinConfig.cmake:83 (find_package):
  Could not find a package configuration file provided by "tf2" with any of
  the following names:

    tf2Config.cmake
    tf2-config.cmake

  Add the installation prefix of "tf2" to CMAKE_PREFIX_PATH or set "tf2_DIR"
  to a directory containing one of the above files.  If "tf2" provides a
  separate development package or SDK, be sure it has been installed.
Call Stack (most recent call first):
  CMakeLists.txt:7 (find_package)


-- Configuring incomplete, errors occurred!
See also "/home/pi/catkin_ws/build_isolated/tf2_py/CMakeFiles/CMakeOutput.log".
See also "/home/pi/catkin_ws/build_isolated/tf2_py/CMakeFiles/CMakeError.log".
<== Failed to process package 'tf2_py': 
  Command '['/home/pi/catkin_ws/devel_isolated/test_rosservice/env.sh', 'cmake', '/home/pi/catkin_ws/src/geometry2/tf2_py', '-DCATKIN_DEVEL_PREFIX=/home/pi/catkin_ws/devel_isolated/tf2_py', '-DCMAKE_INSTALL_PREFIX=/home/pi/catkin_ws/install_isolated', '-G', 'Unix Makefiles']' returned non-zero exit status 1

Please advise.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-02-25 22:25:41 -0600

updated 2020-02-25 22:26:45 -0600

sudo apt install ros-<distro>-tf2*

In general, you should get familiar with rosdep & errors like this. That's just the canonical error for "yo, you're missing the package mate".

error indicates that you either need to install the package with the same name or change your environment so that it can be found.

This error is pretty straight forward but I agree all the text around it can be overwhelming if you're new to C++

edit flag offensive delete link more

Comments

Thank you for the prompt reply. However, after typing that command, trying ros-kinetic-tf2* , ros-kinetic-tf2 and also ros-indigo-tf2* , ros-indigo-tf2 . The result are similar to:

E: Unable to locate package ros-kinetic-tf2*
E: Couldn't find any package by glob 'ros-kinetic-tf2*'
E: Couldn't find any package by regex 'ros-kinetic-tf2*'

Side note: I have the tf2 package in my src folder of the workspace.

AHJL001 gravatar image AHJL001  ( 2020-02-26 00:25:31 -0600 )edit

Seeing as the OP has mentioned Raspbian, there is a good chance he's build ROS from source.

In that case you cannot use apt to install additional packages.

gvdhoorn gravatar image gvdhoorn  ( 2020-02-26 02:04:05 -0600 )edit

@gvdhoorn Yes, I am processing these packages from a Raspberry Pi 3B+ on my turtlebot. I have the tf2 package file in the src folder. The command I am using to process the packages is catkin_make_isolated. I am not sure if it will affect the processing, forgive me.

AHJL001 gravatar image AHJL001  ( 2020-02-26 02:09:20 -0600 )edit

nice, now how do we install packages ??

phil123456 gravatar image phil123456  ( 2020-03-05 15:26:13 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2020-02-25 21:38:19 -0600

Seen: 2,081 times

Last updated: Feb 25 '20