【发布时间】:2020-08-30 10:24:59
【问题描述】:
我想让 CLion 尝试使用 ROS 源代码。我创建了一个 ROS 工作区并具有以下文件夹结构:
joesan@joesan-InfinityBook-S-14-v5:~/Projects/Private/ros-projects$ cd catkin_ws/
drwxrwxr-x joesan joesan 4 KB Sun Aug 30 10:48:27 2020 .
drwxrwxr-x joesan joesan 4 KB Sun Aug 30 10:48:10 2020 ..
.rw-rw-r-- joesan joesan 98 B Sun Aug 30 10:48:27 2020 .catkin_workspace
drwxrwxr-x joesan joesan 4 KB Sun Aug 30 10:48:27 2020 build
drwxrwxr-x joesan joesan 4 KB Sun Aug 30 10:48:26 2020 devel
drwxrwxr-x joesan joesan 4 KB Sun Aug 30 12:13:50 2020 src
joesan@joesan-InfinityBook-S-14-v5:~/Projects/Private/ros-projects/catkin_ws$
我在 .bash_profile 中找到了这个位置,如下所示:
# Dynamically source all setup.bash files from multiple catkin ros workspaces
find /home/joesan/Projects/Private/ros-projects -wholename '*/devel/setup.bash' | xargs source
然后我从我的 .bashrc 中获取 .bash_profile
现在,当我尝试在 CLion 中打开项目时,我看到以下错误:
CMake Error at CMakeLists.txt:65 (message):
find_package(catkin) failed. catkin was neither found in the workspace nor
in the CMAKE_PREFIX_PATH. One reason may be that no ROS setup.sh was
sourced before.
我通过我创建的桌面快捷方式条目启动 CLion。如何让 CLion 知道这个 .bash_profile 以便它可以找到 catkin?
【问题讨论】: