2017-10-21 29 views
1

"std_msg"라는 종속성을 "std_msgs"라고 잘못 명명했습니다.ROS catkin_make : 패키지를 다시 작성하십시오

: catkin_make에게 --force-cmake를하고

<?xml version="1.0"?> 
<package format="2"> 
    <name>lawnbot_description</name> 
    <version>0.0.0</version> 
    <description>The lawnbot_description package</description>  

    <buildtool_depend>catkin</buildtool_depend> 
    <build_depend>roscpp</build_depend> 
    <build_depend>rospy</build_depend> 
    <build_depend>std_msgs</build_depend> 
    <build_export_depend>roscpp</build_export_depend> 
    <build_export_depend>rospy</build_export_depend> 
    <build_export_depend>std_msgs</build_export_depend> 
    <exec_depend>roscpp</exec_depend> 
    <exec_depend>rospy</exec_depend> 
    <exec_depend>std_msgs</exec_depend> 

오류 출력 : 그래서 내가 고정! 그러나 잠깐, 버들개지는 여전히 lawnbot_description 내가 종속성을 고정하더라도 종속성으로 "std_msg"를 원하는 것으로 인식

Base path: /home/josiah/PycharmProjects/lawnbot_ws 
Source space: /home/josiah/PycharmProjects/lawnbot_ws/src 
Build space: /home/josiah/PycharmProjects/lawnbot_ws/build 
Devel space: /home/josiah/PycharmProjects/lawnbot_ws/devel 
Install space: /home/josiah/PycharmProjects/lawnbot_ws/install 
#### 
#### Running command: "make cmake_check_build_system" in 
"/home/josiah/PycharmProjects/lawnbot_ws/build" 
#### 
-- Using CATKIN_DEVEL_PREFIX: /home/josiah/PycharmProjects/lawnbot_ws/devel 
-- Using CMAKE_PREFIX_PATH: /opt/ros/kinetic 
-- This workspace overlays: /opt/ros/kinetic 
-- Using PYTHON_EXECUTABLE: /usr/bin/python 
-- Using Debian Python package layout 
-- Using empy: /usr/bin/empy 
-- Using CATKIN_ENABLE_TESTING: ON 
-- Call enable_testing() 
-- Using CATKIN_TEST_RESULTS_DIR: /home/josiah/PycharmProjects/lawnbot_ws/build/test_results 
-- Found gtest sources under '/usr/src/gtest': gtests will be built 
-- Using Python nosetests: /usr/bin/nosetests-2.7 
-- catkin 0.7.6 
-- BUILD_SHARED_LIBS is on 
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
-- ~~ traversing 8 packages in topological order: 
-- ~~ - turtlebot3 (metapackage) 
-- ~~ - turtlebot3_bringup 
-- ~~ - turtlebot3_slam 
-- ~~ - lawnbot_description 
-- ~~ - lawnbot_gazebo 
-- ~~ - turtlebot3_navigation 
-- ~~ - turtlebot3_teleop 
-- ~~ - turtlebot3_description 
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
-- +++ processing catkin metapackage: 'turtlebot3' 
-- ==> add_subdirectory(turtlebot3/turtlebot3) 
-- +++ processing catkin package: 'turtlebot3_bringup' 
-- ==> add_subdirectory(turtlebot3/turtlebot3_bringup) 
-- +++ processing catkin package: 'turtlebot3_slam' 
-- ==> add_subdirectory(turtlebot3/turtlebot3_slam) 
-- +++ processing catkin package: 'lawnbot_description' 
-- ==> add_subdirectory(lawnbot_description) 
CMake Warning at /opt/ros/kinetic/share/catkin/cmake/catkinConfig.cmake:76 (find_package): 
    Could not find a package configuration file provided by "std_msg" with any 
    of the following names: 

    std_msgConfig.cmake 
    std_msg-config.cmake 

    Add the installation prefix of "std_msg" to CMAKE_PREFIX_PATH or set 
    "std_msg_DIR" to a directory containing one of the above files. If 
    "std_msg" provides a separate development package or SDK, be sure it has 
    been installed. 
Call Stack (most recent call first): 
    lawnbot_description/CMakeLists.txt:10 (find_package) 


-- Could not find the required component 'std_msg'. The following CMake error indicates that you either need to install the package with the same name or change your environment so that it can be found. 
CMake Error at /opt/ros/kinetic/share/catkin/cmake/catkinConfig.cmake:83 (find_package): 
    Could not find a package configuration file provided by "std_msg" with any 
    of the following names: 

    std_msgConfig.cmake 
    std_msg-config.cmake 

    Add the installation prefix of "std_msg" to CMAKE_PREFIX_PATH or set 
    "std_msg_DIR" to a directory containing one of the above files. If 
    "std_msg" provides a separate development package or SDK, be sure it has 
    been installed. 
Call Stack (most recent call first): 
    lawnbot_description/CMakeLists.txt:10 (find_package) 


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

여전히 lawnbot_description 패키지가 "std_msg"를 원한다고 생각합니다. 왜 그렇게 어려운거야? 패키지 정보를 수정하고 업데이트하는 것은 복잡하지 않습니다.

나는 catkin_tools clean이라는 패키지가 있지만, 단순히 작업 공간을 업데이트하기 위해 추가 패키지를 다운로드해야하는 이유는 무엇입니까? 내가 시도

:

-catkin_make 
-catkin_make --force-cmake 
- I have seen solutions that involve deleting entire build/devel directories which horrifies me. That seems like a ton of work just to add an 's' to the end of a name 

내가 버들개지 깨끗한 lawnbot_description 단지 전체 패키지를 삭제합니다 걱정입니다. 이것이 내 최선의 선택인가?

지역 lawnbot_description의 cmake 파일 :

cmake_minimum_required(VERSION 2.8.3) 
project(lawnbot_description) 

find_package(catkin REQUIRED COMPONENTS 
    roscpp 
    rospy 
    std_msg # I am not supposed to edit this right??? I tried editing and it still does not work 
) 

답변

1

나는 CMakeLists를 편집하면 문제가 해결 것으로 나타났다. 그러나 dependencies의 변화를 나타 내기 위해 package.xml과 CMakeList를 변경해야한다는 것은 짜증나게합니다.

나는 package.xml을 수정하면 CMakeLists가 업데이트 될 것이라고 생각했습니다.

나중에 패키지에 대한 변경 사항을 반영하여 패키지의 CMakeLists를 편집하십시오. catkin_make는 그렇게하지 않을 것입니다.

find_package(catkin REQUIRED COMPONENTS 
    roscpp 
    rospy 
    std_msg 
) 

은 다음과 같아야합니다

find_package(catkin REQUIRED COMPONENTS 
    roscpp 
    rospy 
    std_msgs 
) 

package.xml

+0

를 업데이트와 함께 나는 패키지 수정이 상황보다 더 극단적 인 경우에는 특히 더 우아한 해결책을 찾는 사람에게 개방입니다. –