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

include move_group_interface

asked 2018-10-24 09:50:04 -0500

Squid gravatar image

I'm running ROS Kinetic on Ubuntu 16.04.

So I was trying to make my own MoveIt interface, after experimenting and getting comfortable with the demo.launch created by the moveit setup assistant.

But I immediatly ran into a problem, I can't figure out how to include the move group interface.
This is the line I'm using to try and include the move_group_interface:

#include <moveit/planning_interface/move_group_interface.h>

But whatever I try, I keep getting the following error:

fatal error: moveit/planning_interface/move_group_interface.h: No such file or directory

I'm guessing it has something to do with my CMakeLists.txt, but I don't know what I'm doing wrong.

cmake_minimum_required(VERSION 2.8.3)
project(robotarm_moveit)

## Compile as C++11, supported in ROS Kinetic and newer
add_compile_options(-std=c++11)

## Find catkin macros and libraries
## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
## is used, also find other catkin packages
find_package(catkin REQUIRED COMPONENTS
  roscpp
  moveit_ros_planning_interface
)

catkin_package(
  CATKIN_DEPENDS
    roscpp
    moveit_ros_planning_interface
)

include_directories(
)

## Declare a C++ library
add_library(${PROJECT_NAME}
  src/robotarm_moveit_interface.cpp
)

add_executable(${PROJECT_NAME}_node src/robotarm_moveit_interface.cpp)

add_dependencies(${PROJECT_NAME}_node ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})


install(DIRECTORY launch DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
  PATTERN "setup_assistant.launch" EXCLUDE)
install(DIRECTORY config DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})

Maybe somebody can spot what I'm doing wrong here?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2018-10-25 04:00:36 -0500

pcoenen gravatar image

Try

   #include <moveit/move_group_interface/move_group_interface.h>

The MoveGroupInterface is inside the planning_interface namespace, but its header is located in the above directory.

edit flag offensive delete link more

Comments

Doesn't seem to work, I get the same error.

Should I maybe just try and reinstall MoveIt? The demo is working fine so I'm not sure whether that could be the problem?

Squid gravatar image Squid  ( 2018-10-25 04:10:46 -0500 )edit

Did you remove #include <moveit/planning_interface/move_group_interface.h>?

pcoenen gravatar image pcoenen  ( 2018-10-25 05:21:01 -0500 )edit

Yup, what I mean by same error is that instead of

fatal error: moveit/planning_interface/move_group_interface.h: No such file or directory

I just get

fatal error: moveit/move_group_interface/move_group_interface.h: No such file or directory
Squid gravatar image Squid  ( 2018-10-25 05:22:52 -0500 )edit
1

Try that in CMakeLists.txt:

include_directories(
  include
  ${catkin_INCLUDE_DIRS}
)
pcoenen gravatar image pcoenen  ( 2018-10-25 05:26:21 -0500 )edit

That seemed to do the trick!

After I added that, I got some undefined references, but those where easily solvable by uncommeting the target_link_libraries() section in my CMakeLists.txt

Squid gravatar image Squid  ( 2018-10-25 06:12:35 -0500 )edit

Did you resolve it ,I also met the same error.

jack zhang gravatar image jack zhang  ( 2022-12-19 03:44:49 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2018-10-24 09:50:04 -0500

Seen: 1,897 times

Last updated: Oct 25 '18