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

Catkin_make error with geometry2 package

asked 2018-04-09 23:26:53 -0600

TheMilkman gravatar image

updated 2018-04-09 23:44:51 -0600

I'm attempting to use catkin_make to build the 'imu_tools' package found here. But when runnings catkin_make I get the error down below.

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

    tf2_geometry_msgsConfig.cmake
    tf2_geometry_msgs-config.cmake

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

-- Could not find the required component 'tf2_geometry_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.

My main issue is that I dont really understand what the error message is trying to tell me. I've found the package (geometery2) that I should install somewhere, but I'm struggling to figure out how to do it properly.

Sorry if this is a very basic question, I'm still very new to ROS, and programming in general. Feel free to ask for more information.

Thanks for your time

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2018-04-09 23:51:14 -0600

stevejp gravatar image

You are right in thinking that you are missing packages. You could manually install them, but this could be time consuming if you are missing a bunch of them. You can use rosdep to automatically install ros dependencies for a given package. Once you've installed rosdep (instructions in link above), you can move into the top level of your catkin workspace and run the command rosdep install --from-paths src --ignore-src -r -y, which will automatically install all of the deps that you need for imu_tools.

edit flag offensive delete link more

Comments

That worked!

I was trying to use rosdep to install the dependencies earlier except I was using rosdep install imu_tools which said it installed dependencies, but really didn't. Could you explain that command that worked?

TheMilkman gravatar image TheMilkman  ( 2018-04-09 23:57:55 -0600 )edit

@stevejp's answers is the correct one, but I just wanted to point to #q252478 as an example workflow that shows how to build packages from sources.

If you really must build things from sources (instead of using apt-get), that is.

gvdhoorn gravatar image gvdhoorn  ( 2018-04-10 03:03:23 -0600 )edit

That's a really informative answer, would be great if it was a part of the tutorial or something

TheMilkman gravatar image TheMilkman  ( 2018-05-28 00:19:47 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2018-04-09 23:26:53 -0600

Seen: 2,107 times

Last updated: Apr 09 '18