ubuntu16.04 + Kdevelop + ROS开发和创建catkin_ws工作空间
https://blog.csdn.net/p942005405/article/details/75715288
https://blog.csdn.net/LOVE1055259415/article/details/79907466?utm_source=blogkpcl15
1. 安装gcc
1
2
|
sudo apt-get build-dep gcc sudo apt-get install build-essential |
2. 安装Kdevelop
1
|
sudo apt-get install Kdevelop |
3. 安装cmake等
1
|
sudo apt-get install automake autoconf g++ libtool cmake |
4. 配置(参考ros-wiki) http://wiki.ros.org/IDEs
1
2
3
|
cd ~ /Desktop touch kDevelop.desktop chmod +x kDevelop.desktop |
1
|
sudo gedit kDevelop.desktop |
添加如下文本:
1
2
3
4
5
6
|
[Desktop Entry] Type=Application Terminal= false Exec=bash -i -c "kdevelop" Name=kDevelop Icon=kdevelop |
保存退出,桌面就出现了kDevelop的图标啦
5. 创建catkin软件包
5.1 导入catkin顶层工作空间
首先清除掉catkin_ws文件夹下的build文件夹(下次编译的时候它会再次出现)
打开kDevelop,使用shell 或者桌面图标均可
点击“工程”->"打开工程" 找到catkin_ws/src 下的 CMakelists.txt,选中,点击“Next”, 将工程名称修改为自己的(默认为src)
选择“构建系统”为 "CMake Project Manager"
"Finish”
出现“配置构建目录”窗口
将“构建目录”改为 /home/user/catkin_ws/build/ (起初删除的那个)
选择合适的构建类型 “Debug/Release”
额外参数
1
|
-DCATKIN_DEVEL_PREFIX=../.. /devel -DCMAKE_INSTALL_PREFIX=../.. /install |
注意:对于嵌套的子目录结构,必须添加适当数量的 ../
6. 运行调试自己的可执行程序
点击“代码右侧向下箭头”->"调试启动 F9" 进行 “启动配置”
点击“Add New...” 选择要调试的可执行文件 e.g."~/catkin_ws/devel/lib/package/node_name"
"OK"
点击 “Execute” or "Debug" 即可
7. 注意事项
如果上述过程中出现了问题,可以将 "catkin_ws/src./" 下的 “*.kdve4” 文件删除,然后重复上述过程即可。
The "Build Type" selected during project import (e.g. "Debug", "Release", "RelWithDebInfo") can be changed by right-clicking on the project -> "Open Configuration...". Select CMake in the left menu and change the CMake variable "CMAKE_BUILD_TYPE" appropriately.
Note, if a package inside the catkin workspace specifies its own "Build Type", e.g. by adding set(CMAKE_BUILD_TYPE Release) to the underlying package "CMakeLists.txt", it will be used for that package instead of the global one defined in the top-level CMake project.
You may set up a project filter since kDevelop displays a lot of files and (ros) binaries in the source tree that are not really interesting for the developer and finding individual files could be really confusing. Right click on the project and select "Open Configuration...". Choose "Project Filter" in the left menu. The cleanest solution is to first exclude all files and then include only desired file types:
-
Click Add. Type in the pattern: "*" (just the star character) and select as "Target" only Files. Choose "Action" Exclude.
- Now add all files you want include into the project tree:
Click "Add" and type in your desired file pattern. Choose "Action" Include. Suggested file patterns are: ".h" ".cpp" ".hpp ".c" ".ipp" ".c" ".txt" ".launch" ".xml" ".md" ".cmake" ".cfg" ".py" ".yaml" ".urdf" ".sdf" ".xacro"
不想翻译了..
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· 开源Multi-agent AI智能体框架aevatar.ai,欢迎大家贡献代码
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· 没有Manus邀请码?试试免邀请码的MGX或者开源的OpenManus吧