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 "ros_control"

asked 2019-08-14 17:21:50 -0500

Tawfiq Chowdhury gravatar image

updated 2019-08-15 16:44:45 -0500

I am trying to catkin_make my workspace in ROS Kinetic in Ubuntu 16.04. I am getting the following error:

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

    ros_controlConfig.cmake
    ros_control-config.cmake

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


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

    ros_controlConfig.cmake
    ros_control-config.cmake

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

Here is my CMakeLists.txt:

cmake_minimum_required(VERSION 2.8.3)
project(test_test)

find_package(catkin REQUIRED COMPONENTS
  ros_control
  ros_controllers
  roscpp
  rospy
  std_msgs
)


catkin_package(
#  INCLUDE_DIRS include
#  LIBRARIES test_test
#  CATKIN_DEPENDS ros_control ros_controllers roscpp rospy std_msgs
#  DEPENDS system_lib
)

include_directories(
# include
  ${catkin_INCLUDE_DIRS}
)

I have tried the following but it did not help:

sudo apt-get install ros-kinetic-effort-controllers
sudo apt-get install ros-kinetic-joint-state-controller

Update:

I installed this package:

sudo apt-get install ros-kinetic-ros-control ros-kinetic-ros-controllers

The issue persists but now I am getting the following warning:

WARNING: package "test_test" should not depend on metapackage "ros_control" but on its packages instead
WARNING: package "test_test" should not depend on metapackage "ros_controllers" but on its packages instead
edit retag flag offensive close merge delete

Comments

How did you install ros_control?

jayess gravatar image jayess  ( 2019-08-14 17:58:43 -0500 )edit
1

I believe the issue is that OP is depending on a metapackage directly. That is not supported and should not be done.

gvdhoorn gravatar image gvdhoorn  ( 2019-08-15 04:29:54 -0500 )edit

@gvdhoorn Could you please elaborate?

Tawfiq Chowdhury gravatar image Tawfiq Chowdhury  ( 2019-08-15 16:27:40 -0500 )edit

Metapackage

[...] do not install files (other than their package.xml manifest) and they do not contain any tests, code, files, or other items usually found in packages.

and

A metapackage simply references one or more related packages which are loosely grouped together.

So, it's a package of packages and isn't meant to be depended on. You should depend on one of the packages that's contained in the metapackage, not the metapackage itself.

jayess gravatar image jayess  ( 2019-08-15 17:03:29 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
1

answered 2019-08-15 17:11:03 -0500

jayess gravatar image

Just to expand on my comment (I'll reiterate it first):

Metapackage

[...] do not install files (other than their package.xml manifest) and they do not contain any tests, code, files, or other items usually found in packages.

and

A metapackage simply references one or more related packages which are loosely grouped together.

So, it's a package of packages and isn't meant to be depended on. You should depend on one of the packages that's contained in the metapackage, not the metapackage itself.

Look at one of the tests in ros_control, for example the controller_manager_tests package. You'll notice that in its CMakeLists.txt file, it doesn't depend on the ros_control metapackage. Instead, it depends on the package that it's using (testing in this case).

So, you need to depend on the package that you're using not the metapackage.

edit flag offensive delete link more
1

answered 2019-08-15 02:36:03 -0500

pmuthu2s gravatar image

Hey,

I guess you are missing ROS-Control package.

Maybe try this,

sudo apt-get install ros-kinetic-ros-control ros-kinetic-ros-controllers
edit flag offensive delete link more

Comments

That did not fix it.

Tawfiq Chowdhury gravatar image Tawfiq Chowdhury  ( 2019-08-15 16:28:11 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2019-08-14 17:21:50 -0500

Seen: 10,311 times

Last updated: Aug 15 '19