DroidAITech / ROS-Academy-for-Beginners

中国大学MOOC《机器人操作系统入门》课程代码示例
2.31k stars 779 forks source link

melodic版本运行 catkin_make后报错 #67

Open Asber777 opened 5 years ago

Asber777 commented 5 years ago

因为之前貌似找不到navigation 所以我在src目录下git clone了官方的navigation 然后发现 -- +++ processing catkin package: 'amcl' -- ==> add_subdirectory(navigation/amcl) -- Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy -- Boost version: 1.65.1 CMake Error at /opt/ros/melodic/share/dynamic_reconfigure/cmake/dynamic_reconfigure-macros.cmake:80 (add_custom_target): add_custom_target cannot create target "amcl_gencfg" because another target with the same name already exists. The existing target is a custom target created in source directory "/home/asber/catkin_ws/src/ROS-Academy-for-Beginners/navigation_sim_demo". See documentation for policy CMP0002 for more details. Call Stack (most recent call first): navigation/amcl/CMakeLists.txt:28 (generate_dynamic_reconfigure_options)


-- +++ processing catkin package: 'costmap_2d' -- ==> add_subdirectory(navigation/costmap_2d) -- Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy -- Boost version: 1.65.1 -- Found the following Boost libraries: -- system -- thread -- chrono -- date_time -- atomic -- costmap_2d: 1 messages, 0 services CMake Error at /home/asber/catkin_ws/build/navigation/costmap_2d/cmake/costmap_2d-genmsg.cmake:46 (add_custom_target): add_custom_target cannot create target "costmap_2d_generate_messages_cpp" because another target with the same name already exists. The existing target is a custom target created in source directory "/home/asber/catkin_ws/src/ROS-Academy-for-Beginners/navigation_sim_demo". See documentation for policy CMP0002 for more details. Call Stack (most recent call first): /opt/ros/melodic/share/genmsg/cmake/genmsg-extras.cmake:307 (include) navigation/costmap_2d/CMakeLists.txt:44 (generate_messages) CMake Error at /home/asber/catkin_ws/build/navigation/costmap_2d/cmake/costmap_2d-genmsg.cmake:79 (add_custom_target): add_custom_target cannot create target "costmap_2d_generate_messages_eus" because another target with the same name already exists. The existing target is a custom target created in source directory "/home/asber/catkin_ws/src/ROS-Academy-for-Beginners/navigation_sim_demo". See documentation for policy CMP0002 for more details. Call Stack (most recent call first): /opt/ros/melodic/share/genmsg/cmake/genmsg-extras.cmake:307 (include) navigation/costmap_2d/CMakeLists.txt:44 (generate_messages)

CMake Error at /home/asber/catkin_ws/build/navigation/costmap_2d/cmake/costmap_2d-genmsg.cmake:112 (add_custom_target): add_custom_target cannot create target "costmap_2d_generate_messages_lisp" because another target with the same name already exists. The existing target is a custom target created in source directory "/home/asber/catkin_ws/src/ROS-Academy-for-Beginners/navigation_sim_demo". See documentation for policy CMP0002 for more details. Call Stack (most recent call first): /opt/ros/melodic/share/genmsg/cmake/genmsg-extras.cmake:307 (include) navigation/costmap_2d/CMakeLists.txt:44 (generate_messages)

CMake Error at /home/asber/catkin_ws/build/navigation/costmap_2d/cmake/costmap_2d-genmsg.cmake:145 (add_custom_target): add_custom_target cannot create target "costmap_2d_generate_messages_nodejs" because another target with the same name already exists. The existing target is a custom target created in source directory "/home/asber/catkin_ws/src/ROS-Academy-for-Beginners/navigation_sim_demo". See documentation for policy CMP0002 for more details. Call Stack (most recent call first): /opt/ros/melodic/share/genmsg/cmake/genmsg-extras.cmake:307 (include) navigation/costmap_2d/CMakeLists.txt:44 (generate_messages)

CMake Error at /home/asber/catkin_ws/build/navigation/costmap_2d/cmake/costmap_2d-genmsg.cmake:178 (add_custom_target): add_custom_target cannot create target "costmap_2d_generate_messages_py" because another target with the same name already exists. The existing target is a custom target created in source directory "/home/asber/catkin_ws/src/ROS-Academy-for-Beginners/navigation_sim_demo". See documentation for policy CMP0002 for more details. Call Stack (most recent call first): /opt/ros/melodic/share/genmsg/cmake/genmsg-extras.cmake:307 (include) navigation/costmap_2d/CMakeLists.txt:44 (generate_messages)

出现了这么多不知道为什么的错误,求解

anchuanxu commented 4 years ago

参考这个就可以解决了https://blog.csdn.net/qq_29573053/article/details/73880151