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

error when i run catkin_make

asked 2021-06-16 03:15:25 -0600

islemhm gravatar image

updated 2021-06-16 14:11:06 -0600

jayess gravatar image

hello ,i follow this tutoriel http://wiki.ros.org/navigation/Tutori... but when i run catkin_make after adding this lines

add_executable(tf_broadcaster src/tf_broadcaster.cpp)
add_executable(tf_listener src/tf_listener.cpp)
target_link_libraries(tf_broadcaster ${catkin_LIBRARIES})
target_link_libraries(tf_listener ${catkin_LIBRARIES})

i get this error :

-- Configuring incomplete, errors occurred!
See also "/home/is/catkin_ws/build/CMakeFiles/CMakeOutput.log".
See also "/home/is/catkin_ws/build/CMakeFiles/CMakeError.log".
Makefile:18814: recipe for target 'cmake_check_build_system' failed
make: *** [cmake_check_build_system] Error 1
Invoking "make cmake_check_build_system" failed

any one can help me


Update:

@Webadone the link you sent me is inaccessible, I did not understand you on the second sentence

-- Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy
CMake Error at navigation_tutorials/robot_setup_tf_tutorial/CMakeLists.txt:11 (add_executable):
  add_executable cannot create target "tf_broadcaster" because another target
  with the same name already exists.  The existing target is an executable
  created in source directory "/home/is/catkin_ws/src/robot_setup_tf".  See
  documentation for policy CMP0002 for more details.


CMake Error at navigation_tutorials/robot_setup_tf_tutorial/CMakeLists.txt:18 (target_link_libraries):
  Attempt to add link library "tf" to target "tf_broadcaster" which is not
  built in this directory.


CMake Error at navigation_tutorials/robot_setup_tf_tutorial/CMakeLists.txt:18 (target_link_libraries):
  Attempt to add link library "/opt/ros/melodic/lib/libtf2_ros.so" to target
  "tf_broadcaster" which is not built in this directory.


CMake Error at navigation_tutorials/robot_setup_tf_tutorial/CMakeLists.txt:18 (target_link_libraries):
  Attempt to add link library "/opt/ros/melodic/lib/libactionlib.so" to
  target "tf_broadcaster" which is not built in this directory.


CMake Error at navigation_tutorials/robot_setup_tf_tutorial/CMakeLists.txt:18 (target_link_libraries):
  Attempt to add link library "message_filters" to target "tf_broadcaster"
  which is not built in this directory.


CMake Error at navigation_tutorials/robot_setup_tf_tutorial/CMakeLists.txt:18 (target_link_libraries):
  Attempt to add link library "roscpp" to target "tf_broadcaster" which is
  not built in this directory.


CMake Error at navigation_tutorials/robot_setup_tf_tutorial/CMakeLists.txt:18 (target_link_libraries):
  Attempt to add link library
  "/usr/lib/x86_64-linux-gnu/libboost_filesystem.so" to target
  "tf_broadcaster" which is not built in this directory.


CMake Error at navigation_tutorials/robot_setup_tf_tutorial/CMakeLists.txt:18 (target_link_libraries):
  Attempt to add link library "xmlrpcpp" to target "tf_broadcaster" which is
  not built in this directory.


CMake Error at navigation_tutorials/robot_setup_tf_tutorial/CMakeLists.txt:18 (target_link_libraries):
  Attempt to add link library "/opt/ros/melodic/lib/libtf2.so" to target
  "tf_broadcaster" which is not built in this directory.


CMake Error at navigation_tutorials/robot_setup_tf_tutorial/CMakeLists.txt:18 (target_link_libraries):
  Attempt to add link library
  "/opt/ros/melodic/lib/libroscpp_serialization.so" to target
  "tf_broadcaster" which is not built in this directory.


CMake Error at navigation_tutorials/robot_setup_tf_tutorial/CMakeLists.txt:18 (target_link_libraries):
  Attempt to add link library "/opt/ros/melodic/lib/librosconsole.so" to
  target "tf_broadcaster" which is not built in this directory.


CMake Error at navigation_tutorials/robot_setup_tf_tutorial/CMakeLists.txt:18 (target_link_libraries):
  Attempt to add link library "/opt/ros/melodic/lib/librosconsole_log4cxx.so"
  to target "tf_broadcaster" which is not built in this directory.


CMake Error at navigation_tutorials/robot_setup_tf_tutorial/CMakeLists.txt:18 (target_link_libraries):
  Attempt to add link library
  "/opt/ros/melodic/lib/librosconsole_backend_interface.so" to target
  "tf_broadcaster" which is not built in this directory.


CMake Error at navigation_tutorials/robot_setup_tf_tutorial/CMakeLists ...
(more)
edit retag flag offensive close merge delete

Comments

Can you please paste the complete content of the console? - like in that post?

https://answers.ros.org/question/2374...

Moreover its much easier to read if you format the code parts. It can be done by selecting the lines and click the button with the 101 010 icon :)

Webadone gravatar image Webadone  ( 2021-06-16 05:17:45 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2021-06-17 03:24:15 -0600

Webadone gravatar image

This error message

CMake Error at navigation_tutorials/robot_setup_tf_tutorial/CMakeLists.txt:11 (add_executable):
  add_executable cannot create target "tf_broadcaster" because another target
  with the same name already exists.  The existing target is an executable
  created in source directory "/home/is/catkin_ws/src/robot_setup_tf".  See
  documentation for policy CMP0002 for more details.

indicates to me, that you have two packages in your workspace that are building the same target "tf_broadcaster": /home/is/catkin_ws/src/navigation_tutorials/robot_setup_tf_tutorial AND /home/is/catkin_ws/src/robot_setup_tf

So my initial suggestion would be to move one of the folders out of your src folder to avoid this conflict. I guess you are working on navigation_tutorials/robot_setup_tf_tutorial so the robot_setup_tf can be moved out like mv /home/is/catkin_ws/src/robot_setup_tf /home/is/robot_setup_tf

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2021-06-16 03:15:25 -0600

Seen: 286 times

Last updated: Jun 17 '21