No packages found in source space: /home/ubuntu/catkin_ws/src/navigation/move_base/src
时间: 2023-07-05 13:29:07 浏览: 123
这个问题可能是因为你的ROS工作空间中缺少了一些必要的包,导致找不到相关的源文件。你可以尝试使用以下命令更新ROS工作空间中的包:
```
cd /home/ubuntu/catkin_ws
rosdep install --from-paths src --ignore-src -r -y
catkin_make
```
这个命令会自动下载并安装工作空间中缺少的包,然后使用catkin_make重新编译整个工作空间。
如果问题仍然存在,可能需要检查你的工作空间的目录结构是否正确,以及包是否被正确地放置在src目录中。
相关问题
yahboom@Transbot:~/dev/catkin_ws$ catkin_make Base path: /home/yahboom/dev/catkin_ws Source space: /home/yahboom/dev/catkin_ws/src Build space: /home/yahboom/dev/catkin_ws/build Devel space: /home/yahboom/dev/catkin_ws/devel Install space: /home/yahboom/dev/catkin_ws/install #### #### Running command: "make cmake_check_build_system" in "/home/yahboom/dev/catkin_ws/build" #### #### #### Running command: "make -j6 -l6" in "/home/yahboom/dev/catkin_ws/build" ####
这段输出来自 `catkin_make` 命令,它用于编译 ROS packages。在这个例子中,`catkin_make` 在 `/home/yahboom/dev/catkin_ws` 目录下编译 ROS packages。输出中的信息表示:
- Base path: `/home/yahboom/dev/catkin_ws`:`catkin_make` 命令在这个路径下查找 ROS packages 的源代码和 build、devel、install 目录。
- Source space: `/home/yahboom/dev/catkin_ws/src`:ROS packages 的源代码目录。
- Build space: `/home/yahboom/dev/catkin_ws/build`:编译 ROS packages 时生成的中间文件和目标文件目录。
- Devel space: `/home/yahboom/dev/catkin_ws/devel`:编译 ROS packages 后生成的可执行文件和库文件目录。
- Install space: `/home/yahboom/dev/catkin_ws/install`:安装 ROS packages 后生成的可执行文件和库文件目录。
接下来的输出显示了 `catkin_make` 命令运行的步骤。首先运行 `make cmake_check_build_system` 命令检查 build 目录是否存在,以及 build 目录中是否存在 CMakeLists.txt 文件。然后运行 `make -j6 -l6` 命令编译 ROS packages。`-j6` 表示使用 6 个 CPU 核心并行编译,`-l6` 表示在编译过程中限制系统负载不超过 6。
Base path: /home/dama/demo02_ws Source space: /home/dama/demo02_ws/src Build space: /home/dama/demo02_ws/build Devel space: /home/dama/demo02_ws/devel Install space: /home/dama/demo02_ws/install #### #### Running command: "make cmake_check_build_system" in "/home/dama/demo02_ws/build" #### -- Using CATKIN_DEVEL_PREFIX: /home/dama/demo02_ws/devel -- Using CMAKE_PREFIX_PATH: /home/dama/demo02_ws/devel;/home/dama/demo01_ws/devel;/opt/ros/noetic -- This workspace overlays: /home/dama/demo02_ws/devel;/home/dama/demo01_ws/devel;/opt/ros/noetic -- Found PythonInterp: /usr/bin/python3 (found suitable version "3.8.10", minimum required is "3") -- Using PYTHON_EXECUTABLE: /usr/bin/python3 -- Using Debian Python package layout -- Using empy: /usr/lib/python3/dist-packages/em.py -- Using CATKIN_ENABLE_TESTING: ON -- Call enable_testing() -- Using CATKIN_TEST_RESULTS_DIR: /home/dama/demo02_ws/build/test_results -- Forcing gtest/gmock from source, though one was otherwise available. -- Found gtest sources under '/usr/src/googletest': gtests will be built -- Found gmock sources under '/usr/src/googletest': gmock will be built -- Found PythonInterp: /usr/bin/python3 (found version "3.8.10") -- Using Python nosetests: /usr/bin/nosetests3 -- catkin 0.8.10 -- BUILD_SHARED_LIBS is on -- BUILD_SHARED_LIBS is on -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- ~~ traversing 1 packages in topological order: -- ~~ - hello_vscode -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- +++ processing catkin package: 'hello_vscode' -- ==> add_subdirectory(hello_vscode) CMake Error at /opt/ros/noetic/share/catkin/cmake/catkin_install_python.cmake:86 (message): catkin_install_python() called with non-existing file '/home/dama/demo02_ws/src/hello_vscode/scripts/hello_vscode_p.py'. Call Stack (most recent call first): hello_vscode/CMakeLists.txt:162 (catkin_install_python) -- Configuring incomplete, errors occurred! See also "/home/dama/demo02_ws/build/CMakeFiles/CMakeOutput.log". See also "/home/dama/demo02_ws/build/CMakeFiles/CMakeError.log". make: *** [Makefile:544:cmake_check_build_system] 错误 1 Invoking "make cmake_check_build_system" failed
这段代码是ROS的编译过程中的错误信息,它指出在执行`catkin_install_python()`函数时,找不到指定的python文件`/home/dama/demo02_ws/src/hello_vscode/scripts/hello_vscode_p.py`。你可以检查一下这个文件路径是否正确,或者确认一下你的python文件是否存在。如果文件确实存在,那么可能是你的CMakeLists.txt文件中的配置有误导致的。你可以仔细检查一下CMakeLists.txt文件中与该python文件有关的部分是否正确,或者尝试重新生成一下CMakeLists.txt文件。另外,你也可以检查一下你的工作空间路径是否正确。希望我的回答能帮到你!