clion-2022.1.2tar -zxvf CLion-20xx.x.x.tar.gz解压cd clion-2016.2.2/bin/
./clion.sh
sudo gedit ~/.bashrc
#在bashrc文件底部中加入
export PATH="/home/bupo/CLion-2022.1.2/clion-2022.1.2/bin:$PATH" #地址根据自己改
#保存退出
source ~/.bashrc
cd ~/catkin_ws/src/ // 首先,进入工作空间的src【这里为你自己的项目空间】
clion.sh //打开新的终端,输入此命令,启动clion

2.
CMake选项(CMake options)为:-DCATKIN_DEVEL_PREFIX:PATH=/home/bupo/my_study/localization_in_auto_driving_renqian/localization_in_auto_driving_cap3/devel;构建目录(Generation path)为:/home/bupo/my_study/localization_in_auto_driving_renqian/localization_in_auto_driving_cap3/build/home/bupo/CLion-2022.1.2/clion-2022.1.2/bin/cmake/linux/bin/cmake --build /home/bupo/my_study/localization_in_auto_driving_renqian/localization_in_auto_driving_cap3/build --target test_frame_node -j 6


CMake Error at CMakeLists.txt:9 (find_package):
By not providing "Findcatkin.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "catkin", but
CMake did not find one.
Could not find a package configuration file provided by "catkin" with any
of the following names:
catkinConfig.cmake
catkin-config.cmake
Add the installation prefix of "catkin" to CMAKE_PREFIX_PATH or set
"catkin_DIR" to a directory containing one of the above files. If "catkin"
provides a separate development package or SDK, be sure it has been
installed.
在对应个CMakeLists.txt添加如下代码:
set(catkin_DIR /opt/ros/melodic/share/catkin/cmake) #DIR后面是catkinconfig路径
find_package(catkin REQUIRED)
include_directories(${catkin_DIR})