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

add_dependencies called with incorrect number of arguments

asked 2016-06-27 20:24:15 -0500

daalt gravatar image

I tried to model my new C++ node as closely to the Actionlib Simple Action Server tutorial ( http://wiki.ros.org/actionlib_tutoria... ) but I keep getting the following error when running catkin_make:

CMake Error at robot_arm/CMakeLists.txt:20 (add_dependencies):
  add_dependencies called with incorrect number of arguments

What could be wrong with my add_dependencies statement?

Only thing I can think of is that ${robot_arm_EXPORTED_TARGETS} is not getting populated such that catkin_make may think this argument is missing. How can I confirm this?

My CMakeLists.txt is:

cmake_minimum_required(VERSION 2.8.3)
project(robot_arm)

find_package(catkin REQUIRED COMPONENTS roscpp actionlib actionlib_msgs)
find_package(Boost REQUIRED COMPONENTS system)

catkin_package(
  CATKIN_DEPENDS actionlib_msgs common
)

include_directories(include ${catkin_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS})

add_executable(ReceiveOrder ReceiveOrder.cpp)

target_link_libraries(
  ReceiveOrder
  ${catkin_LIBRARIES}
)

add_dependencies(
  ReceiveOrder
  ${robot_arm_EXPORTED_TARGETS}
)
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2016-06-27 22:44:27 -0500

Dirk Thomas gravatar image

The tutorial uses robot_arm_EXPORTED_TARGETS because the package robot_arm does also generate code for action files. Since your code doesn't generate any code for messages / services / actions / dynamic reconfigure the variable is not set. So you simply don't need this statement with your current CMake file.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2016-06-27 20:24:15 -0500

Seen: 6,649 times

Last updated: Jun 27 '16