出现以下错误
CMake Error at /home/zh/catkin_ws/build/household_objects_database_msgs/cmake/household_objects_database_msgs-genmsg.cmake:250 (add_custom_target):
add_custom_target cannot create target
“household_objects_database_msgs_generate_messages_eus” because another
target with the same name already exists. The existing target is a custom
target created in source directory
经搜索,知道
CMakeLists.txt 和package.xml 要对应。
即:
CMakeLists.txt
find_package(catkin REQUIRED COMPONENTS
actionlib
control_msgs
diagnostic_msgs
geometry_msgs
manipulation_msgs
moveit_msgs
moveit_ros_perception
moveit_ros_planning_interface
roscpp
rospy
sensor_msgs
shape_msgs
std_msgs
std_srvs
tf
trajectory_msgs
)
对应的
package.xml
必须加入
<build_depend>actionlib</build_depend>
<build_depend>control_msgs</build_depend>
<build_depend>diagnostic_msgs</build_depend>
<build_depend>geometry_msgs</build_depend>
<build_depend>manipulation_msgs</build_depend>
<build_depend>moveit_msgs</build_depend>
<build_depend>roscpp</build_depend>
<build_depend>rospy</build_depend>
<build_depend>sensor_msgs</build_depend>
<build_depend>shape_msgs</build_depend>
<build_depend>std_msgs</build_depend>
<build_depend>std_srvs</build_depend>
<build_depend>tf</build_depend>
编译还是出错:
然后把其中这个注释掉:
<build_depend>geometry_msgs</build_depend>
编译通过