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

Which package should I use in CMakeLists.txt?

asked 2015-05-25 10:47:23 -0500

Karnivaurus gravatar image

updated 2015-05-25 10:58:34 -0500

I want to use the MoveIt! package on ROS indigo, and I am following the tutorial at http://docs.ros.org/hydro/api/pr2_mov... .

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 :)

edit retag flag offensive close merge delete

Comments

Isn't this a sort-of duplicate of Writing a simple CMakeLists.txt file for ROS?

gvdhoorn gravatar image gvdhoorn  ( 2015-05-26 02:14:00 -0500 )edit

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.

Fleurmond gravatar image Fleurmond  ( 2015-05-26 11:13:06 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
1

answered 2016-12-04 17:51:05 -0500

robbycandra gravatar image

I had same problem here : http://answers.ros.org/question/24935... The solution for move_group_interface is

find_package(catkin REQUIRED COMPONENTS
   moveit_ros_planning_interface
   ..... 
)
edit flag offensive delete link more
1

answered 2016-12-16 18:24:20 -0500

boone gravatar image

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>

E.g.:

#include <moveit/robot_model_loader/robot_model_loader.h>
edit flag offensive delete link more

Comments

Note that this isn't really moveit specific: this is the regular include pattern for all ROS C++ packages.

gvdhoorn gravatar image gvdhoorn  ( 2016-12-18 04:31:54 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2015-05-25 10:47:23 -0500

Seen: 2,648 times

Last updated: Dec 16 '16