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

CMake warning has occurred.

asked 2018-10-12 04:22:00 -0600

saito gravatar image

updated 2018-10-12 04:36:56 -0600

gvdhoorn gravatar image

Hello. I am a ROS beginner. I am doing SLAM of turtlebot 3 (waffle) in the ubuntu 16.04, ros (kinetic) personal computer environment.I downloaded and built https://github.com/ros-planning/navig... to install the costmap _ 2 d package. Then, such an error came out.What should I do?

CMake Warning at /opt/ros/kinetic/share/catkin/cmake/catkinConfig.cmake:76 (find_package):
  Could not find a package configuration file provided by "tf2_sensor_msgs"
  with any of the following names:

    tf2_sensor_msgsConfig.cmake
    tf2_sensor_msgs-config.cmake

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


-- Could not find the required component 'tf2_sensor_msgs'. 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_sensor_msgs"
  with any of the following names:

    tf2_sensor_msgsConfig.cmake
    tf2_sensor_msgs-config.cmake

  Add the installation prefix of "tf2_sensor_msgs" to CMAKE_PREFIX_PATH or
  set "tf2_sensor_msgs_DIR" to a directory containing one of the above files.
  If "tf2_sensor_msgs" provides a separate development package or SDK, be
  sure it has been installed.
Call Stack (most recent call first):
  navigation/costmap_2d/CMakeLists.txt:4 (find_package)
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
9

answered 2018-10-12 04:34:17 -0600

Delb gravatar image

updated 2019-01-11 01:47:05 -0600

There are already some questions about this issue : #q138236, #q305359 for exemple.

It's just that you haven't installed the package tf2_sensor_msgs :

sudo apt-get install ros-kinetic-tf2-sensor-msgs

It should solve your issue.

edit flag offensive delete link more

Comments

thank you!!

saito gravatar image saito  ( 2018-10-13 12:42:18 -0600 )edit
1

It should be : sudo apt-get install ros-kinetic-tf2-sensor-msgs

dvc97 gravatar image dvc97  ( 2019-01-10 22:40:20 -0600 )edit

Yes, typo fixed.

Delb gravatar image Delb  ( 2019-01-11 01:47:24 -0600 )edit

E: Unable to locate package ros-kinetic-tf2-sensor-msgs

meng100 gravatar image meng100  ( 2021-06-10 23:44:23 -0600 )edit

Question Tools

2 followers

Stats

Asked: 2018-10-12 04:22:00 -0600

Seen: 13,502 times

Last updated: Jan 11 '19