ROS+vscode

  1. vscode安装ros插件
  2. mkdir -p ros_tes_wst/src
  3. 用vscode打开工作空间
  4. 右键src–>catkin_create–>打依赖
  5. 配置
  6. setting.json
{
  "configurations": [
    {
      "browse": {
        "databaseFilename": "",
        "limitSymbolsToIncludedHeaders": true
      },
      "includePath": [
        "/opt/ros/kinetic/include/**",
        "/usr/include/**"
      ],
      "name": "ROS"
    }
  ],
  "version": 4
}

  1. launch.json
{

    "version": "0.2.0",
    "configurations": [    
        
        {
            "name": "(gdb) 启动",
            "type": "cppdbg",
            "request": "launch",
            "program": "${workspaceFolder}/devel/lib/ros_test/listener_node",
            "args": [],
            "stopAtEntry": false,
            "cwd": "${workspaceFolder}",
            "environment": [],
            "externalConsole": false,
            "MIMode": "gdb",
            "preLaunchTask": "catkin_make: build",
            "setupCommands": [
                {
                    "description": "为 gdb 启用整齐打印",
                    "text": "-enable-pretty-printing",
                    "ignoreFailures": true
                }
            ],     
        }
    ]
}
  1. task.json
{
	"version": "2.0.0",
	"tasks": [
		{
			"type": "catkin_make",
			"command":"catkin_make",
			"args": [
				"-DCMAKE_BUILD_TYPE=Dubug"
			],
			"problemMatcher": [
				"$catkin-gcc"
			],
			"group": {
				"kind": "build",
				"isDefault": true
			},
			"label": "catkin_make: build"
		}
	]
}

10.CMakeList.txt中加入SET(CMAKE_BUILD_TYPE Debug)

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值