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

error while" catkin_make common_msgs"

asked 2013-11-11 17:27:27 -0500

doudoushuixiu gravatar image

i'm try to install the package : common_msgs.use wstool and catkin

i use catkin_make to make it,there is some wrong:

-- ==> add_subdirectory(common_msgs/sensor_msgs)
-- sensor_msgs: 26 messages, 1 services
CMake Error at /home/shuixiu/catkin_ws/build/common_msgs/sensor_msgs/cmake/sensor_msgs-genmsg.cmake:191 (add_custom_target):
  add_custom_target cannot create target "sensor_msgs_generate_messages_cpp"
  because another target with the same name already exists.  The existing
  target is a custom target created in source directory
  "/home/shuixiu/catkin_ws/src/nao_robot/nao_description".  See documentation
  for policy CMP0002 for more details.
Call Stack (most recent call first):
  /opt/ros/hydro/share/genmsg/cmake/genmsg-extras.cmake:288 (include)
  common_msgs/sensor_msgs/CMakeLists.txt:47 (generate_messages)


CMake Error at /home/shuixiu/catkin_ws/build/common_msgs/sensor_msgs/cmake/sensor_msgs-genmsg.cmake:376 (add_custom_target):
  add_custom_target cannot create target "sensor_msgs_generate_messages_lisp"
  because another target with the same name already exists.  The existing
  target is a custom target created in source directory
  "/home/shuixiu/catkin_ws/src/nao_robot/nao_description".  See documentation
  for policy CMP0002 for more details.
Call Stack (most recent call first):
  /opt/ros/hydro/share/genmsg/cmake/genmsg-extras.cmake:288 (include)
  common_msgs/sensor_msgs/CMakeLists.txt:47 (generate_messages)


CMake Error at /home/shuixiu/catkin_ws/build/common_msgs/sensor_msgs/cmake/sensor_msgs-genmsg.cmake:561 (add_custom_target):
  add_custom_target cannot create target "sensor_msgs_generate_messages_py"
  because another target with the same name already exists.  The existing
  target is a custom target created in source directory
  "/home/shuixiu/catkin_ws/src/nao_robot/nao_description".  See documentation
  for policy CMP0002 for more details.
Call Stack (most recent call first):
  /opt/ros/hydro/share/genmsg/cmake/genmsg-extras.cmake:288 (include)
  common_msgs/sensor_msgs/CMakeLists.txt:47 (generate_messages)

if you know why,plz tell me,thank u

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
4

answered 2013-11-13 12:04:14 -0500

Dirk Thomas gravatar image

updated 2013-11-13 12:04:39 -0500

nao_description uses sensor_msgs but does not declare that dependency in its package.xml. I filled a ticket for that: https://github.com/ahornung/nao_robot/issues/17

edit flag offensive delete link more

Comments

Where does sensor_msgs actually come in? I couldn't see any reference in the CMakeLists.txt

fergs gravatar image fergs  ( 2013-11-13 12:11:54 -0500 )edit

It is implicitly used in the one of the headers, @Dirk Thomas's issue links to it.

William gravatar image William  ( 2013-11-13 12:15:13 -0500 )edit
1

answered 2013-11-11 19:19:12 -0500

fergs gravatar image

Typically this a dependency issue. For some reason, catkin/cmake is configuring nao_description before configuring sensor_msgs.

Looking at https://github.com/ahornung/nao_robot I can't see where nao_description would be creating a dependency on sensor_msgs, so my assumption is that you have common_msgs and nao_robot in your workspace, but not tf (and nao_description depends on tf, tf depends on sensor_msgs, but you lack the cmake configuration for tf to find that dependency on sensor_msgs). My recommendation would be to do a source checkout of tf into your workspace, or stop building common_msgs in your workspace.

edit flag offensive delete link more

Comments

thank you very much .i install tf.and there is no errer now.thanks

doudoushuixiu gravatar image doudoushuixiu  ( 2013-11-11 20:36:48 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2013-11-11 17:27:27 -0500

Seen: 2,502 times

Last updated: Nov 13 '13