• 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.jsonpreLaunchTask属性的生成规则,此处定义的是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
    }
    

    更多c-cpp-properties.json参数解析
    ROS IDE: VSCode开发环境的搭建

  • 相关阅读:
    UIWindow简单介绍
    关于事件的小结
    iOS事件机制(二)
    iOS事件机制(一)
    深入浅出iOS事件机制
    关于UIBarItem和UINvigationController,UITabBarController关系
    动态加载实例NSSelectorFromString
    iOS-滑动显示广告效果
    自定义的TabBar
    iOS评论页面的简单思路
  • 原文地址:https://www.cnblogs.com/flyinggod/p/15843536.html
Copyright © 2020-2023  润新知