1.ros_python launch.json
主要看上面链接
{
// 使用 IntelliSense 了解相关属性。
// 悬停以查看现有属性的描述。
// 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Python: 当前文件",
"type": "python",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal",
"justMyCode": true
}
]
}
2.Ros_cpp
launch.json
{
// 使用 IntelliSense 了解相关属性。
// 悬停以查看现有属性的描述。
// 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name":"(gdb)Launch", //配置名称,将会在调试配置下拉列表中显示
"type":"cppdbg", //调试器类型 该值自动生成
"request": "launch", // 调试方式,还可以选择attach
"program": "${workspaceFolder}/devel/lib/salsanext/salsanext_trt_ros", //要调试的程序(完整路径,支持相对路径)
"args":[], //传递给上面程序的参数,没有参数留空即可
"stopAtEntry": false, //是否停在程序入口点(停在main函数开始)
"cwd":"${workspaceFolder}", //调试程序时的工作目录
"environment": [], //针对调试的程序,要添加到环境中的环境变量,例如:[{"name":"squid","value":"clam"}]
"externalConsole": false, //如果设置为true,则为应用程序启动外部控制台。如果为false,则不会启动控制台,并使用VS Code的内置调试控制台
"MIMode": "gdb", //VSCode要使用的调试工具名称
"preLaunchTask": "catkin_make", // 这个重要,需要与task中的label相同
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
],
}
]
}
tasks.json
{
"version": "2.0.0",
"tasks": [
{
"label": "catkin_make",
"type": "shell",
"command": "catkin_make",
"args": [],
"group": "build",
"presentation": {
"reveal": "always"
},
"problemMatcher": "$msCompile"
},
]
}
3.Ros_launch launch.json
{
// 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": [
{
"name": "ROS: Launch",
"request": "launch",
"target": "/home/ms/detection/ros_train/cplus_ws/src/cplus_pub_sub/launch/pub_sub.launch",
"launch":[
"rviz",
"gz",
"gzclient",
"gzserver"
],
"type":"ros"
}
]
}
总结
最重要的,拥有跟随内心与直觉的勇气,你的内心与直觉多少已经知道你真正想要成为什么样的人。任何其他事物都是次要的。