VS Code ROS
Visual Studio Code 官方文档
visualstudio docs
visualstudio GCC on Linux docs
官方文档主要讲的配置内容是针对GCC/G++程序,不是针对VS Code ROS的,用来参考配置文件参数解析
VS Code 插件 ROS
ROS 插件文档
Attaching to a running ROS Node
Debugging all ROS Nodes in a launch file
launch.json
此文件主要配置debugger settings
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"preLaunchTask": "catkin_make: build",
"name": "ROS: Launch",
"type": "ros",
"request": "launch",
"target": "/home/ke/Desktop/Controller/ROS-TurtleBot-PID_WS/src/ROS-TurtleBot-PID/control.launch",
},
]
}
此处文件launch.json
声明通过.launch
文件启动Ros node
,预构建任务是生成对应的node
Attach模式调试文档参考:VS Code Attach Debug Mode
task.json
此文件主要是处理compiler build settings
{
"version": "2.0.0",
"tasks":
[
{
"type": "shell",
"command": "catkin_make -DCMAKE_BUILD_TYPE=Debug",
"problemMatcher": [
"$catkin-gcc"
],
"group": {
"kind": "test",
"isDefault": true
},
"label": "catkin_make: build"
}
]
}
或者如下形式
{
"version": "2.0.0",
"tasks":
[
{
"label": "catkin_make",
"type": "shell",
"command": "catkin_make",
"args": [
"-j4",
"-DCMAKE_BUILD_TYPE=Release",
"-DCMAKE_EXPORT_COMPILE_COMMANDS=1",
"-DCMAKE_CXX_STANDARD=14",
//"-DCATKIN_WHITELIST_PACKAGES=lattice_planner"
],
"problemMatcher": [
"$catkin-gcc"
],
"group": {
"kind": "build",
"isDefault": true
}
}
]
}
此文件主要是声明launch.json
中preLaunchTask
属性的生成规则,此处定义的是ROS
包生成形式
更多task.json
参数解析
setting.json
{
"python.autoComplete.extraPaths": [
"/home/ke/ros/catkin_ws/devel/lib/python2.7/dist-packages",
"/opt/ros/kinetic/lib/python2.7/dist-packages"
],
"python.analysis.extraPaths": [
"/home/ke/ros/catkin_ws/devel/lib/python2.7/dist-packages",
"/opt/ros/kinetic/lib/python2.7/dist-packages"
],
"cmake.sourceDirectory": "${workspaceFolder}/src/ROS-TurtleBot-PID"
}
通过添加文件/Open Folfer形式打开工作空间,默认生成文件
c_cpp_properities.json
此文件主要配置compiler path and IntelliSense settings
{
"configurations": [
{
"browse": {
"databaseFilename": "",
"limitSymbolsToIncludedHeaders": false
},
"includePath": [
"/home/ke/ros/catkin_ws/devel/include/**",
"/opt/ros/kinetic/include/**",
"/usr/include/**"
],
"name": "ROS",
"intelliSenseMode": "gcc-x64",
"compilerPath": "/usr/bin/gcc",
"cStandard": "gnu11",
"cppStandard": "c++14"
}
],
"version": 4
}
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 分享4款.NET开源、免费、实用的商城系统
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
· 上周热点回顾(2.24-3.2)
2018-01-25 旋转矩阵