Rosanswers logo

I want to use the MoveIt! package on ROS indigo, and I am following the tutorial at http://docs.ros.org/hydro/api/pr2_moveit_tutorials/html/planning/src/doc/move_group_interface_tutorial.html.

As an example of how to use MoveIt! in C++, the tutorial provides the following line:

moveit::planning_interface::MoveGroup group("right_arm");

What I am trying to figure out, is how to actually compile this. So, I have built a new ROS package, and in the CMakeLists.txt file for that package, I need to specify where to look for header and library files. But how do I know the name of the package that is required for the above code?

If I look in /opt/ros/indigo/include, there are various directories such as moveit, moveit_msgs, moveit_planners_ompl, and similarly in /opt/ros/indigo/lib and /opt/ros/indigo/share. Is each of these directories a package, or is each one a node, or something else?

After doing a bit of research, I found that the moveit::planning_interface::MoveGroup class from the above code is defined in /opt/ros/indigo/include/moveit/move_group_interface/move_group.h. This suggests to me that I should be using the moveit or move_group_interface packages, but if I try either of these, then it fails. For example, in my CMakeLists.txt file, if I have:

find_package(catkin REQUIRED COMPONENTS roscpp rospy std_msgs genmsg moveit)

And then I try to build my package, it tells me:

Could not find a package configuration file provided by "moveit"

And similarly for move_group_interface.

So I'm obviously a bit confused as to what ROS packages actually are, where they are stored on my machine, and how to know which one I should be referencing in CMakeLists.txt. Any help? Thanks :)

Originally posted by Karnivaurus on ROS Answers with karma: 133 on 2015-05-25

Post score: 2

Original comments

Comment by gvdhoorn on 2015-05-26:
Isn't this a sort-of duplicate of Writing a simple CMakeLists.txt file for ROS?

Comment by Fleurmond on 2015-05-26:
That could be true. But I think the title of both questions are really evasive. Then, it could be hard to find is someone already asked this question. And theirs problems look different.


2 Answers 2


Rosanswers logo

I had same problem here : http://answers.ros.org/question/249354/how-to-install-move_group_interface-from-source/ The solution for move_group_interface is

find_package(catkin REQUIRED COMPONENTS

Originally posted by robbycandra with karma: 71 on 2016-12-04

This answer was ACCEPTED on the original site

Post score: 1


Rosanswers logo

In case it helps anyone else, I made a list of all the package names:

  • moveit_commander moveit_core
  • moveit_fake_controller_manager
  • moveit_msgs
  • moveit_planners_ompl
  • moveit_ros_benchmarks
  • moveit_ros_benchmarks_gui
  • moveit_ros_control_interface
  • moveit_ros_manipulation
  • moveit_ros_move_group
  • moveit_ros_perception
  • moveit_ros_planning
  • moveit_ros_planning_interface
  • moveit_ros_robot_interaction
  • moveit_ros_visualization
  • moveit_ros_warehouse
  • moveit_setup_assistant
  • moveit_simple_controller_manager
  • rqt_moveit

And includes are of the form:

#include <moveit/[namespace]/[header].h>


#include <moveit/robot_model_loader/robot_model_loader.h>

Originally posted by boone with karma: 21 on 2016-12-16

This answer was NOT ACCEPTED on the original site

Post score: 1

Original comments

Comment by gvdhoorn on 2016-12-18:
Note that this isn't really moveit specific: this is the regular include pattern for all ROS C++ packages.


Your Answer

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